esass ===
esass.phot module
- xga.generate.esass.phot.evtool_image(sources, lo_en=<Quantity 0.2 keV>, hi_en=<Quantity 10. keV>, combine_obs=False, num_cores=1, disable_progress=False)[source]
A convenient Python wrapper for a configuration of the eSASS evtool command that makes images. Images will be generated for every observation associated with every source passed to this function. If images in the requested energy band are already associated with the source, they will not be generated again.
- Parameters:
sources (BaseSource/NullSource/BaseSample) – A single source object, or a sample of sources.
lo_en (Quantity) – The lower energy limit for the image, in astropy energy units.
hi_en (Quantity) – The upper energy limit for the image, in astropy energy units.
combine_obs (bool) – Setting this to False will generate an image for each associated observation, instead of for one combined observation.
num_cores (int) – The number of cores to use, default is set to 90% of available.
disable_progress (bool) – Setting this to true will turn off the SAS generation progress bar.
- xga.generate.esass.phot.expmap(sources, lo_en=<Quantity 0.2 keV>, hi_en=<Quantity 10. keV>, combine_obs=False, num_cores=1, disable_progress=False)[source]
A convenient Python wrapper for the eSASS expmap command. Expmaps will be generated for every observation associated with every source passed to this function. If expmaps in the requested energy band are already associated with the source, they will not be generated again.
- Parameters:
sources (BaseSource/NullSource/BaseSample) – A single source object, or sample of sources.
lo_en (Quantity) – The lower energy limit for the expmap, in astropy energy units.
hi_en (Quantity) – The upper energy limit for the expmap, in astropy energy units.
combine_obs (bool) – Setting this to False will generate an exposure map for each associated observation, instead of for one combined observation.
num_cores (int) – The number of cores to use (if running locally), default is set to 90% of available.
disable_progress (bool) – Setting this to true will turn off the eSASS generation progress bar.
- xga.generate.esass.phot.combine_phot_prod(sources, to_combine, lo_en=<Quantity 0.2 keV>, hi_en=<Quantity 10. keV>, num_cores=1, disable_progress=False)[source]
A convenient Python wrapper for the eSASS evtool and expmap commands. Combined images or exposure maps will be generated from all skytiles associated with the source (duplicate events are removed).
This only exists as an analogy to XGA-XMM’s ‘emosaic’ function, you could just as easily use xga.generate.esass.phot.evtool_image/expmap directly, with ‘combine_obs=True’ as an argument.
- Parameters:
sources (BaseSource/NullSource/BaseSample) – A single source object, or sample of sources
to_combine (str) – The data type to produce, can be either image or expmap.
lo_en (Quantity) – The lower energy limit for the image or expmap, in astropy energy units.
hi_en (Quantity) – The upper energy limit for the image or expmap, in astropy energy units.
num_cores (int) – The number of cores to use (if running locally), default is set to 90% of available.
disable_progress (bool) – Setting this to true will turn off the eSASS generation progress bar.
esass.spec module
- xga.generate.esass.spec.srctool_spectrum(sources, outer_radius, inner_radius=<Quantity 0. arcsec>, group_spec=True, min_counts=5, min_sn=None, num_cores=1, disable_progress=False, combine_tm=True, combine_obs=True, force_gen=False)[source]
A wrapper for all the eSASS and Heasoft processes necessary to generate an eROSITA spectrum that can be analysed in XSPEC. Every observation associated with this source, and every instrument associated with that observation, will have a spectrum generated using the specified outer and inner radii as a boundary. The default inner radius is zero, so by default this function will produce circular spectra out to the outer_radius. It is possible to generate both grouped and ungrouped spectra using this function, with the degree of grouping set by the min_counts and min_sn parameters.
NOTE: We do yet allow the user to specify their desired values for ‘tstep’ and ‘xgrid’, though this will be supported in a future release. We currently set default value of ‘tstep=0.5’ for survey observations, and ‘tstep=100.0’ for pointed observations; the ‘tstep’ values used for background spectrum generation are four times larger. The default evtool value for ‘xgrid’ is used.
- Parameters:
sources (BaseSource/BaseSample) – A single source object, or a sample of sources.
outer_radius (str/Quantity) – The name or value of the outer radius to use for the generation of the spectrum (for instance ‘r200’ would be acceptable for a GalaxyCluster, or Quantity(1000, ‘kpc’)). If ‘region’ is chosen (to use the regions in region files), then any inner radius will be ignored.
inner_radius (str/Quantity) – The name or value of the inner radius to use for the generation of the spectrum (for instance ‘r500’ would be acceptable for a GalaxyCluster, or Quantity(300, ‘kpc’)). By default this is zero arcseconds, resulting in a circular spectrum.
group_spec (bool) – A boolean flag that sets whether generated spectra are grouped or not.
min_counts (float) – If generating a grouped spectrum, this is the minimum number of counts per channel. To disable minimum counts set this parameter to None.
min_sn (float) – If generating a grouped spectrum, this is the minimum signal-to-noise in each channel. To disable minimum signal-to-noise set this parameter to None.
num_cores (int) – The number of cores to use, default is set to 90% of available.
disable_progress (bool) – Setting this to true will turn off the eSASS generation progress bar.
combine_tm (bool) – Create spectra for individual ObsIDs that are a combination of the data from all the telescope modules utilized for that ObsID. This can help to offset the low signal-to-noise nature of the survey data eROSITA takes. Default is True.
combine_obs (bool) – Combine observations for multi-ObsID sources to create single combined spectra per instrument (or combined instrument if combine_tm=True). Default is True.
force_gen (bool) – This boolean flag will force the regeneration of spectra, even if they already exist.
- xga.generate.esass.spec.esass_spectrum_set(sources, radii, group_spec=True, min_counts=5, min_sn=None, num_cores=1, force_regen=False, disable_progress=False, combine_tm=False)[source]
This function can be used to produce ‘sets’ of XGA Spectrum objects, generated in concentric circular annuli, specifically using data from the eROSITA telescope. Such spectrum sets can be used to measure projected spectroscopic quantities, or even be de-projected to attempt to measure spectroscopic quantities in a three dimensional space.
NOTE: We do yet allow the user to specify their desired values for ‘tstep’ and ‘xgrid’, though this will be supported in a future release. We currently set default value of ‘tstep=0.5’ for survey observations, and ‘tstep=100.0’ for pointed observations; the ‘tstep’ values used for background spectrum generation are four times larger. The default evtool value for ‘xgrid’ is used.
- Parameters:
sources (BaseSource/BaseSample) – A single source object, or a sample of sources.
radii (List[Quantity]/Quantity) – A list of non-scalar quantities containing the boundary radii of the annuli for the sources. A single quantity containing at least three radii may be passed if one source is being analysed, but for multiple sources there should be a quantity (with at least three radii), PER source.
group_spec (bool) – A boolean flag that sets whether generated spectra are grouped or not.
min_counts (float) – If generating a grouped spectrum, this is the minimum number of counts per channel. To disable minimum counts set this parameter to None.
min_sn (float) – If generating a grouped spectrum, this is the minimum signal-to-noise in each channel. To disable minimum signal-to-noise set this parameter to None.
num_cores (int) – The number of cores to use, default is set to 90% of available.
force_regen (bool) – This will force all the constituent spectra of the set to be regenerated, use this if your call to this function was interrupted and an incomplete AnnularSpectrum is being read in.
disable_progress (bool) – Setting this to true will turn off the eSASS generation progress bar.
combine_tm (bool) – Create annular spectra for individual ObsIDs that are a combination of the data from all the telescope modules utilized for that ObsID. This can help to offset the low signal-to-noise nature of the survey data eROSITA takes. Default is True.
esass.lightcurve module
- xga.generate.esass.lightcurve.srctool_lightcurve(sources, outer_radius, inner_radius=<Quantity 0. arcsec>, lo_en=<Quantity 0.5 keV>, hi_en=<Quantity 2. keV>, time_bin_size=<Quantity 100. s>, patt=15, num_cores=1, disable_progress=False, combine_tm=True, combine_obs=True, force_gen=False)[source]
- A wrapper for all the SAS processes necessary to generate eROSITA light curves for a specified region.
Every observation associated with this source, and every instrument associated with that
observation, will have a light curve generated using the specified outer and inner radii as a boundary. The default inner radius is zero, so by default this function will produce light curves in a circular region out to the outer_radius. The light curves are corrected for background, vignetting, and PSF concerns using the eSASS ‘srctool’ tool.
- Parameters:
sources (BaseSource/BaseSample) – A single source object, or a sample of sources.
outer_radius (str/Quantity) – The name or value of the outer radius to use for the generation of the light curve (for instance ‘point’ would be acceptable for a Star or PointSource). If ‘region’ is chosen (to use the regions in region files), then any inner radius will be ignored. If you are generating for multiple sources then you can also pass a Quantity with one entry per source.
inner_radius (str/Quantity) – The name or value of the inner radius to use for the generation of the light curve. By default this is zero arcseconds, resulting in a light curve from a circular region. If you are generating for multiple sources then you can also pass a Quantity with one entry per source.
lo_en (Quantity) – The lower energy boundary for the light curve, in units of keV. The default is 0.5 keV.
hi_en (Quantity) – The upper energy boundary for the light curve, in units of keV. The default is 2.0 keV.
time_bin_size (Quantity) – The bin size to be used for the creation of the light curve, in seconds. The default is 100 s.
patt (int) – An integer representation of a bitmask specifying which event patterns should be included. The default is 15 (i.e. all valid patterns).
num_cores (int) – The number of cores to use (if running locally), default is set to 90% of available.
disable_progress (bool) – Setting this to true will turn off the SAS generation progress bar.
combine_tm (bool) – Create lightcurves for individual ObsIDs that are a combination of the data from all the telescope modules utilized for that ObsID. This can help to offset the low signal-to-noise nature of the survey data eROSITA takes. Default is True.
combine_obs (bool) – Setting this to False will generate an lightcurve for each associated observation, instead of for one combined observation.
force_gen (bool) – This boolean flag will force the regeneration of lightcurves, even if they already exist.
esass.misc module
- xga.generate.esass.misc.evtool_combine_evts(sources, num_cores=1, disable_progress=False)[source]
A convenient Python wrapper for the eSASS evtool command that combines event lists. In eRASS data releases, observations contain duplicate events. For sources that lie in this area that appears in multiple observations, it is best to merge these observations and create one combined observation that removes duplicates. This function will create this combined observation from all observations associated to a source.
- Parameters:
sources (BaseSource/NullSource/BaseSample) – A single source object, or a sample of sources.
num_cores (int) – The number of cores to use, default is set to 90% of available.
disable_progress (bool) – Setting this to true will turn off the eSASS generation progress bar.
esass.run module
- xga.generate.esass.run.esass_call(esass_func)[source]
This is used as a decorator for functions that produce eSASS command strings. Depending on the system that XGA is running on (and whether the user requests parallel execution), the method of executing the eSASS command will change. This supports both simple multi-threading. :return: