leakagelib_cxo API documentation#
This code rescales Chandra event data to the IXPE effective area, so that it can be used to fit for source polarizations. Please see Generating a Chandra image for instructions on the command line interface for this code. This documentation describes the python API for loading it into your code.
Once you have created the rescaled image, it is very simple to import it into LeakageLib. To create a source object suitable for loading into your fitter, use leakagelib_cxo.cxo_source() to load the image you created. It will return a leakagelib.Source object, which you can load in the usual way (see the Fitting for an extended source polarization with LeakageLib example)
leakagelib_cxo module#
- leakagelib_cxo.cxo_source(filename, data, offset=None)#
Loads an image generated by leakagelib_cxo for use in LeakageLib fitting. If you applied any offsets to the data set, these offsets are applied to the image (that’s why data is an argument). You can apply additional offsets too (units: IXPE pixels).
- Parameters:
filename (str) – File name of the CXO image. This should have been created with leakagelib_cxo
data (
leakagelib.IXPEData) – IXPE data set to create a source for. The offset is taken from this data setoffset ((float, float)) – Additional offset in units of arcseconds
- Return type:
A Source object with the correct pixel scale for images generated by leakagelib_cxo