Extract NuSTAR Data (extract-nustar
)#
Pipeline module to run NuSTAR reduction and spectral extraction in one step.
- Automates the standard HEASoft workflow for NuStar:
Execute nupipeline for a given
OBSID
, producing cleanedFPMA
andFPMB
events.Run nuproducts to generate source and background spectra plus response files (ARFs/RMFs).
Optionally reuse pre-cleaned events (skip pipeline).
- Positional arguments:
OBSID
: 11-digit NuSTAR observation ID.SRC_REG
: Source region file or literal DS9 region string.BKG_REG
: Background region file or literal DS9 region string.
- Options:
- --indir
Directory containing raw event files (default:
./sources/<OBSID>
).- --outdir
Output root for products (default:
./products/<OBSID>
).- --ra
Source right ascension (RA) coordinates in ICRS (decimal degrees)
- --dec
Source declination (dec) coordinates in ICRS (decimal degrees)
- --no-pipe
Skip nupipeline; assume cleaned events already exist.
- --help
Show help message
- Usage formula:
>>> extract-nustar <OBSID> <SRC_REG> <BKG_REG> \ ... [--indir DIR] [--outdir DIR] [--ra RA --dec DEC] [--no-pipe]
- Usage examples:
>>> extract-nustar 80902505002 source.reg bkg.reg >>> extract-nustar 80902505002 source.reg bkg.reg --ra 178.231 --dec 15.572
- Outputs:
Same outputs as nupipeline (in
./output/<OBSID>
directory) and nuproducts (in./products/<OBSID>
directory)Inside
./products/<OBSID>
directory, there will beFPMA/
andFPMB/
sub-directories with spectrum files that will be used inSpectrumFit
, i.e.nu<OBSID>A01_sr.pha
andnu<OBSID>B01_sr.pha
- Requirements:
HEASoft with NuSTAR CALDB files installed