aztools.data

Data Tools

Attributes

process_nicer_obsids

process_nustar_obsids

process_suzaku_obsids

process_xmm_obsids

filter_xmm_obsids

extract_xmm_specs

extract_xmm_lcs

extract_nustar_specs

extract_nustar_lcs

extract_nicer_specs

Functions

process_nicer_obsid(obsid, **kwargs)

Process NICER obsid with nicerl2

process_nustar_obsid(obsid, **kwargs)

Process NuSTAR obsid with nupipeline

process_suzaku_obsid(obsid, **kwargs)

Process SUZAKU XIS obsid with aepipeline

process_xmm_obsid(obsid, **kwargs)

Process XMM obsid with xmm sas

filter_xmm_obsid(obsid, **kwargs)

Filter XMM pn or mos obsid with xmm sas

extract_xmm_spec(obsid, **kwargs)

Extract XMM pn or mos spectrum with xmm sas

extract_xmm_lc(obsid, **kwargs)

Extract XMM pn or mos light curves with xmm sas

extract_nustar_spec(obsid, **kwargs)

Extract NuSTAR spectra for obsid with nuproducts

extract_nustar_lc(obsid, **kwargs)

Extract NuSTAR light curve for obsid with nuproducts

extract_nicer_spec(obsid, **kwargs)

Extract NICER spectra for obsid with nicerl3-spect

Module Contents

process_nicer_obsid(obsid: str, **kwargs)[source]

Process NICER obsid with nicerl2

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed

  • Keywords

  • --------

  • pipeline (Any parameters to be passed to the reduction)

Return type:

0 if successful, and a heasoft error code otherwise

process_nicer_obsids[source]
process_nustar_obsid(obsid: str, **kwargs)[source]

Process NuSTAR obsid with nupipeline

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed

  • Keywords

  • --------

  • pipeline (Any parameters to be passed to the reduction)

Return type:

0 if successful, and a heasoft error code otherwise

process_nustar_obsids[source]
process_suzaku_obsid(obsid: str, **kwargs)[source]

Process SUZAKU XIS obsid with aepipeline

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed

  • Keywords

  • --------

  • pipeline (Any parameters to be passed to the reduction)

Return type:

0 if successful, and a heasoft error code otherwise

process_suzaku_obsids[source]
process_xmm_obsid(obsid: str, **kwargs)[source]

Process XMM obsid with xmm sas

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed

  • Keywords

  • --------

  • instr (str) – Instrument or instrument mode: pn|mos|rgs|omi|omf|omg

  • odfingest (bool) – run odfingest? This should be True for the first run and False subsequently

  • allow_fail (bool) – Allow task to fail without raising an exception. May be useful during paralleization. Default: False

  • pipeline (Any parameters to be passed to the reduction)

process_xmm_obsids[source]
filter_xmm_obsid(obsid: str, **kwargs)[source]

Filter XMM pn or mos obsid with xmm sas

Run from top level containing obsid folder. This assumes process_xmm_obsid was called first. By default, do standard filtering; R<0.4 in pn or R<0.35 for mos

Parameters:
  • obsid (str) – Obsid to be processed

  • Keywords

  • --------

  • instr (str) – Instrument or instrument mode: pn|mos1|mos2

  • gtiexpr (str) – GTI selection expression if selection based on rate is not desired. It should be of the form: TIME < VAL or TIME IN [LOW:HI]

  • extra_expr (str) – Extra filtering expression for evselect. e.g ‘&&(PI>4000)’. Note the &&.

  • barycorr (bool) – Apply barycenter correction to the filtered event file

  • region (bool) – If True, create an image from the filtered file and launch ds9 to create a region file

  • use_raw (bool) – If True, use RAWX, RAWY instead of X, Y

  • allow_fail (bool) – Allow task to fail without raising an exception. May be useful during paralleization. Default: False

filter_xmm_obsids[source]
extract_xmm_spec(obsid: str, **kwargs)[source]

Extract XMM pn or mos spectrum with xmm sas

Run from top level containing obsid folder This assumes filter_xmm_obsid was called first.

Parameters:
  • obsid (str) – Obsid to be processed; or {obsid}:{label} where output is spec_{label}*

  • Keywords

  • --------

  • instr (str) – Instrument or instrument mode: pn|mos1|mos2

  • regfile (str) – name of region file. It should under: obsid/{instr}/; where instr is pn|mos1|mos2. Default is ds9.reg.

  • use_raw (bool) – if True, region files uses RAWX, RAWY instead of X, Y; used in timing mode

  • extra_expr (str) – Extra filtering expression for evselect. e.g ‘&&gti(“gtifile.gti”,TIME)’. Note the &&.

  • genrsp (bool) – Generate rmf and arf files.

  • allow_fail (bool) – Allow task to fail without raising an exception. May be useful during paralleization. Default: False

  • irun (int) – name suffix, so the output is spec_{irun}*

extract_xmm_specs[source]
extract_xmm_lc(obsid: str, **kwargs)[source]

Extract XMM pn or mos light curves with xmm sas

Run from top level containing obsid folder This assumes @filter_xmm_obsid was called first.

Parameters:
  • obsid (str) – Obsid to be processed; or {obsid}:{label} where output is lc_{label}*

  • Keywords

  • --------

  • instr (str) – Instrument or instrument mode: pn|mos1|mos2

  • ebins (str) – Space-separated string of the energy bin boundaries in keV. Default is ‘0.3 10’

  • tbin (float) – The time bin, negative means 2**tbin

  • regfile (str) – name of region file. It should under: obsid/{instr}/; where instr is pn|mos1|mos2. Default is ds9.reg.

  • use_raw (bool) – if True, use RAWX, RAWY instead of X,Y (used in timing mode)

  • extra_expr (str) – Extra filtering expression for evselect. e.g ‘&&gti(“gtifile.gti”,TIME)’. Note the &&.

  • lccorr (bool) – Run epiclccorr. Default is True.

  • outdir (str) – output folder name under {obsid}/{instr}/. Default is lc.

  • allow_fail (bool) – Allow task to fail without raising an exception. May be useful during paralleization. Default: False

  • irun (int) – name suffix so the output file is lc_{irun}*

extract_xmm_lcs[source]
extract_nustar_spec(obsid: str, **kwargs)[source]

Extract NuSTAR spectra for obsid with nuproducts

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed; or {obsid}:{label} where output is spec_{label}*

  • Keywords

  • --------

  • processed_obsid (str) – The name of the processed obsid folder. Default: {obsid}_p

  • irun (int) – name suffix so the output is spec_{irun}*

  • pipeline (Any parameters to be passed to the reduction)

Return type:

0 if successful, and a heasoft error code otherwise

extract_nustar_specs[source]
extract_nustar_lc(obsid: str, **kwargs)[source]

Extract NuSTAR light curve for obsid with nuproducts

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed; or {obsid}:{label} where output is lc_{label}*

  • Keywords

  • --------

  • processed_obsid (str) – The name of the processed obsid folder. Default: {obsid}_p

  • ebins (str) – Space-separated string of the energy bin boundaries in keV. Default is ‘3 79’

  • tbin (float) – The time bin, negative means 2**tbin

  • lccorr (bool) – Correct light curves. Default is True.

  • barycorr (bool) – Barycenter the light curve (assume gti if used is bary-centered). Default is False.

  • outdir (str) – output folder name under {processed_obsid}/. Default is lc.

  • irun (int or str) – name suffix so that the output is lc_{irun}*

Any parameters to be passed to the reduction nuproduct. e.g usrgtifile=”somefile.gti”

Return type:

0 if successful, and a heasoft error code otherwise

extract_nustar_lcs[source]
extract_nicer_spec(obsid: str, **kwargs)[source]

Extract NICER spectra for obsid with nicerl3-spect

Run from top level containing obsid folder

Parameters:
  • obsid (str) – Obsid to be processed; or {obsid}:{label} where output is spec_{label}*

  • Keywords

  • --------

  • irun (int or str) – name suffix so the output is spec_{irun}*

  • pipeline (Any parameters to be passed to the reduction)

Return type:

0 if successful, and a heasoft error code otherwise

extract_nicer_specs[source]