---
title: "Recalculate magnetar polarization from IXPE events"
description: "Select the source and background, correct event Stokes values and recover the two measured directions."
canonical_url: "https://sandboxphysics.com/stories/magnetar-polarization/reduce-ixpe-events/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/magnetar-polarization/reduce-ixpe-events/"
last_modified: "2026-11-22"
---

[Magnetars and X-ray polarization](https://sandboxphysics.com/stories/magnetar-polarization/)

# Recalculate magnetar polarization from IXPE events

The low and high energy bands in this replay favor directions 83 degrees apart. To see the change, add up calibrated events before taking either angle.

## Start from the three sky event lists

Download the Level 2 v03 lists for 01003299 and the unweighted modulation curves valid in early 2022. The script checks the six SHA-256 values. In each detector, take events within 46 arcseconds of the target and a separate background annulus from 106 to 293 arcseconds. Read the energy at the center of each PI channel.

Divide each event’s Q and U by the calibration’s modulation factor at that energy. An instrument with a smaller factor responds less strongly to a fixed polarization. Add the corrected components over each region. Subtract the background totals after multiplying by the ratio of solid angles.

$$
\boldsymbol S_{\rm net}=\boldsymbol S_{\rm source}-f_{\Omega}\boldsymbol S_{\rm bg},\qquad f_{\Omega}=\frac{\Omega_{\rm source}}{\Omega_{\rm bg}}
$$

## Work through the hard-energy band

In 5.5–8 keV, the source circle holds 2,826 events and the background annulus holds 17,206. The area ratio is 0.02836. After subtraction the estimated signal is 2,338 events. The two net Stokes sums are approximately 407 and −801. Their vector has a length of about 899, giving 38.43 percent polarization at −31.53 degrees.

In 2–4 keV the replay gives 16.14 percent at 51.53 degrees. The middle two bands fail the 99 percent two-component detection test. Their finite sample estimates still appear in the plot. An angle measured on a tiny vector can change widely under a small event fluctuation.

![Net measured Stokes directions in four energy bands. The soft and hard bands point in nearly opposite directions.](https://sandboxphysics.com/_astro/ixpe-polarization.en.PmIZ3wm6.png)

Polarization varies by energy in the public IXPE events. The two middle bands are below the 99% detection threshold.

## Keep the discrepancy with the paper

Taverna and colleagues published about 12 percent in the full 2–8 keV band. The same band here gives 15.56 percent. Our event version and exposure differ. Including rows with quality bits set gives 15.61 percent, so that choice makes little difference to this particular gap.

The angle swing survives those choices. Matching the published full-band value would require their original exposure, calibration and event treatment. The benchmark gives separate results for the three detectors. Start with those if a new calibration shifts the full-band value.

```
python fetch_ixpe.py inputs
python reduce_ixpe.py --source inputs --out rerun.json
python reduce_ixpe.py --source inputs --include-flagged --out rerun-flagged.json
python test_transfer.py rerun-transfer.json
```

## Download the replay and source checksums

[IXPE replay scripts and frozen results](https://sandboxphysics.com/stories/magnetar-polarization/materials/ixpe-magnetar-replay.zip) · 128,565 B

SHA-256 `c88f4996591f3a45b8ff89f7bd65e45a4b12c0a1e5369df074ed8dc3f21f9a79`

## Work it out

Should you average the high and low energy position angles to get the full-band angle?

Answer and explanation

Add net Q and U across the contributing bands, then take the angle of that sum. Here the lower band contains far more events. The total angle stays close to the low-energy direction because that band contributes the longer vector.

[Follow Stokes parameters along one ray](https://sandboxphysics.com/stories/magnetar-polarization/track-stokes-on-one-ray/) [Read a magnetar atmosphere’s vacuum resonance](https://sandboxphysics.com/stories/magnetar-polarization/read-the-vacuum-resonance/)

[Open the magnetar ray Lab](https://sandboxphysics.com/labs/magnetar-x-ray-polarization/)

## Sources

1. [Taverna et al., Polarized x-rays from a magnetar](https://arxiv.org/pdf/2205.08898v1)

   Figures 1–2 and Table S2 give the measured energy dependence. Figure S1 specifies the source and background regions.

2. [HEASARC IXPE observation 01003299](https://heasarc.gsfc.nasa.gov/FTP/ixpe/data/obs/01/01003299/event_l2/)

   The public Level 2 files contain sky positions and calibrated event Stokes values for the three detectors.

3. [IXPE modulation-factor calibration files](https://heasarc.gsfc.nasa.gov/FTP/caldb/data/ixpe/gpd/cpf/modfact/)

   Use the unweighted 2021-12-09 response files valid during these observations.

4. [Kislat et al., Analyzing the Data from X-ray Polarimeters with Stokes Parameters](https://arxiv.org/abs/1409.6214v2)

   Sections 2–4 explain the doubled angle in the event estimator and the subtraction of background vectors.

## Keep reading

Magnetars and X-ray polarization · Reading path

### From the polarization ellipse to IXPE events

1. [Article **How a magnetar changes the polarization of X-rays**](https://sandboxphysics.com/stories/magnetar-polarization/a-magnetic-vacuum/)
2. [Article **Calculate the phase delay in a magnetic vacuum**](https://sandboxphysics.com/stories/magnetar-polarization/calculate-the-phase-delay/)
3. [Article **Follow Stokes parameters along one ray**](https://sandboxphysics.com/stories/magnetar-polarization/track-stokes-on-one-ray/)
4. [You are here **Recalculate magnetar polarization from IXPE events**](https://sandboxphysics.com/stories/magnetar-polarization/reduce-ixpe-events/)
5. [Article **Read a magnetar atmosphere’s vacuum resonance**](https://sandboxphysics.com/stories/magnetar-polarization/read-the-vacuum-resonance/)
