deproject_from_xflt

deproject.deproject.deproject_from_xflt(pat, rscale, rinner=0, angdist=None, cosmology=None)

Set up the projection object from XFLT keywords in the PHA files.

When using the XSPEC projct model, values are read from XFLT keywords (as used by the XSPEC deprojection code [1]) rather than being specified manually. This function creates a Deproject object and loads in a set of PHA files matching a pattern, using the XFLT keywords to set radii and theta values. The annuli must be circular.

Parameters:
  • pat (str) – The pattern representing the files to read in. If the stk module, provided by CIAO, is available then CIAO stack syntax [2] can be used. The order of the files does not matter, but it is currently assumed that there is only one file per annulus.

  • rscale (AstroPy quantity) – The scaling factor used to convert the XFLT radii (XFLT001 and XFLT002 keywords) to an angle. If the values are in arcseconds then rscale would be set to 1 * u.arcsec.

  • rinner (float, optional) – The inner radius of the central annulus, in the same system as the XFLT0001 and XFLT002 keyword values (this is a unitless value).

  • angdist (None or AstroPy.Quantity, optional) – The angular-diameter distance to the source. If not given then it is calculated using the source redshift along with the cosmology attribute.

  • cosmology (None or astropy.cosmology object, optional) – The cosmology used to convert redshift to an angular-diameter distance. This is used when angdist is None. If cosmology is None then the astropy.cosmology.Planck15 Cosmology object is used.

Returns:

dep – The deproject instance with the files loaded and associated with the correct annuli.

Return type:

Deproject instance

Notes

This currently is not guaranteed to support multiple data sets in the same annulus. There is no check that the annuli are touching and do not overlap.

References

Examples

Create a Deproject instance from the files matching the pattern “src*.pi”, whose XFLT radii are in ACIS pixels:

>>> dep = deproject_from_xflt('src*.pi', 0.492 * u.arcsec)

When used in CIAO, the stack syntax can be used to specify the files, so if the file clus.stk contains the file names, one per line, then the following will read them in and create a Deproject instance. In this case the XFLT radii are in arcminutes:

>>> dep = deproject_from_xflt('@clus.stk', 1 * u.arcmin)