Difference between revisions of "Nustar"

From Remeis-Wiki
Jump to navigation Jump to search
Line 51: Line 51:
 
   fdump <fits_file_of_interest> page=no | grep -i caldb
 
   fdump <fits_file_of_interest> page=no | grep -i caldb
  
 +
 +
===== Known Issues =====
 +
 +
Very long file and directory names can cause crashes in nuextract.
  
 
[[Category:Data Extraction]]
 
[[Category:Data Extraction]]

Revision as of 16:11, 24 January 2023

NuSTAR data extraction

Preparation: This step unpacks the data of both FPM to the specified 'prepdir'. The example observation is of Mrk 335.

#!/bin/csh
   
set revolution = '6'
set obsid = '60001041005'
set datadir = /data/X-ray/NuSTAR/data/$revolution/$obsid
set prepdir = /userdata/data/$user/whereever/you/want

nuprepare --datadir=$datadir --prepdir=$prepdir --all

Spectrum and Lightcurve Extraction: Now you can take a look at the raw images in prepdir/reprocessed/nu-obsid-A-or-B-01_cl.evt using ds9. Create a region by clicking at the source and choose a circular region between 50 and 120'' radius centered on the source. You can save the coordinates under Region->Save Regions... as .reg-file use the default coordinate system.
Choose and save another region for the background spectrum that does not contain any sources and make it as large as possible. Be careful that it is still within NuSTAR's FOV.
Now we can extract the spectrum using nuextract:


#!/bin/csh
   
set revolution = '6'
set obsid = '60001041005'
set prepdir = /userdata/data/$user/whereever/you/want

set name = extraction_a
set bkg = $prepdir/reprocessed/fpma_bkg.reg
set src = $prepdir/reprocessed/fpma_src.reg

nuextract --prepdir=$prepdir --name=$name --srcreg=$src --bkgreg=$bkg --fpm='A'

set name = extraction_b
set bkg = $prepdir/reprocessed/fpmb_bkg.reg
set src = $prepdir/reprocessed/fpmb_src.reg

nuextract --prepdir=$prepdir --name=$name --srcreg=$src --bkgreg=$bkg --fpm='B'

For time- or energy-limited extractions take a look at:

nuextract --help
Version information

In order to find out the version of the NuSTARDAS and CALDB your data were extracted with, you can use the following commands:

 fdump <fits_file_of_interest> page=no | grep -i nustardas
 fdump <fits_file_of_interest> page=no | grep -i caldb


Known Issues

Very long file and directory names can cause crashes in nuextract.