  Axion-like particles (ALPs) produced in the core of a magnetar will convert
to photons in the magnetosphere, leading to possible signatures in the hard
X-ray band. We perform a detailed calculation of the ALP-to-photon conversion
probability in the magnetosphere, recasting the coupled differential equations
that describe ALP-photon propagation into a form that is efficient for large
scale numerical scans. We show the dependence of the conversion probability on
the ALP energy, mass, ALP-photon coupling, magnetar radius, surface magnetic
field, and the angle between the magnetic field and direction of propagation.
Along the way, we develop an analytic formalism to perform similar calculations
in more general $n$-state oscillation systems. Assuming ALP emission rates from
the core that are just subdominant to neutrino emission, we calculate the
resulting constraints on the ALP mass versus ALP-photon coupling space, taking
SGR 1806-20 as an example. In particular, we take benchmark values for the
magnetar radius and core temperature, and constrain the ALP parameter space by
the requirement that the luminosity from ALP-to-photon conversion should not
exceed the total observed luminosity from the magnetar. The resulting
constraints are competitive with constraints from helioscope experiments in the
relevant part of ALP parameter space.
