0% found this document useful (0 votes)
70 views3 pages

NuSTAR Data Analysis

The document outlines a series of commands and procedures for processing astronomical data, including initializing software, extracting light curves, and performing spectral fitting. It details the steps for selecting source and background regions, generating light curves, and modeling spectral data using specific commands. Additionally, it provides information on converting PI channel values to energy ranges for customized light curve extraction.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views3 pages

NuSTAR Data Analysis

The document outlines a series of commands and procedures for processing astronomical data, including initializing software, extracting light curves, and performing spectral fitting. It details the steps for selecting source and background regions, generating light curves, and modeling spectral data using specific commands. Additionally, it provides information on converting PI channel values to energy ranges for customized light curve extraction.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Heainit

caldbinit

nupipeline indir=60002023031/ steminputs=nu60002023031 outdir=output1

ls

cd output1/
ls
ds9 nu60002023031A01_cl.evt&

********************************* In ds9************************
// The the Image opens in ds9
To extract count number, first aperture on the source and background has to be selected//

click on the image a ring will appear


provide the coordinate for the centroid using the information from NED
Go to WCS and click whether the coordinates are in degrees or hours
Go to Region and save the image region as scr.** and background region as bkgrnd.**

***************back to the terminal**********************************

ls
cd ..
ls
nuproducts indir=output1 instrument=FPMA steminputs=nu60002023031 outdir=output2
srcregionfile=output1/src.reg bkgregionfile=output1/bkgrnd.reg bkgextract=yes
bkglcfile=bkgrnd_A01.lc binsize=300 pilow=35 pihigh=1910 clobber=yes

*******************Extract light curves*******************************


cd output2
fv nu60002023031A01_sr.lc& // from there we can export the count rate in table

**/ Adding light curves from FPMA and FPMB

lcmath nu60002023024A01_sr.lc nu60002023024B01_sr.lc added_source.lc addsubr=yes multi=1


multb=1
(The above command will add source light curves both for FPMA & FPMB)

lcmath bkgrnd_A01.lc bkgrnd_B01.lc added_bkg.lc addsubr=yes multi=1 multb=1


(The above command will add background light curves both for FPMA & FPMB)

lcmath added_source.lc added_bkg.lc nu60002023024_LC.lc addsubr=no multi=1 multb=factor

While subtracting backgrounds for the light curves the scaling factor for the back ground must be scaled
by the factor of ''pixels in the aperture of the source/pixels in the aperture in the background'' or
src_r^2/bkg_r^2
(The above command will subtract added background light curve from added source light curves and
the final light curve will be nu60002023024_LC.lc)

**************spectral Fitting*************************

heainit
grppha
** it will ask input file then give
nu60002023031A01_sr.pha
then name of output spectrum can be as ... output_A.pha
then
a big list will come
next u type ...
group min 20
exit

***Now load xspec and load new output file


xspec
data output_A.pha
cpd /xw
plot
ig bad
ig **-3.0,79.0-**
pl
setpl ene
pl ld

*******modeling begins**************

mod powerlaw
(Enter spectral index 1.5, and norm. =1)
show par
fit 100
show par

pl ld resid
pl eeufspec

setpl rebin 50 50
pl

********** To get the PSD text file******************

iplot
we 'any name'
exit

***********The text file will have data in the format Nu, eNu, flux, eFlux, mod_flux********
Notes

The 'nuproducts' module by default generates source and background light-curves in the 35-1909 PI
energy channels, i.e. 3-78 keV. It is possible to extract the light-curves in user defined energy range
through the input parameters ‘pilow’ and ‘pihigh’. In the following example the light-curves are
generated in the energy range 10- 60 keV

nuproducts indir=./pipeline_out instrument=FPMA steminputs=nu10012001002 outdir=./products


srcregionfile=source.reg bkgregionfile=background.reg pilow=210 pihigh=1459

**/ Adding light curves from FPMA and FPMB

lcmath nu60002023024A01_sr.lc nu60002023024B01_sr.lc added_source.lc addsubr=yes multi=1 multb=1


(The above command will add source light curves both for FPMA & FPMB)

lcmath bk grnd_A01.lc bk grnd_B01.lc added_bk g.lc addsubr=yes multi=1 multb=1


(The above command will add back ground light curves both for FPMA & FPMB)

lcmath added_source.lc added_bk g.lc nu60002023024_LC.lc addsubr=no multi=1 multb=1

(The above command will subtract added background light curve from added source light curves and the
final light curve will be nu60002023024_LC.lc)

While subtracting backgrounds for the light curves the scaling factor for the back ground must be scaled
by the factor of ''pixels in the aperture of the source/pixels in the aperture in the background'' or
src_r^2/bkg_r^2

Q: I want to construct a light curve in a limited energy range but the software needs the PI channel range ('pilow' and
'pihigh'): what is the conversion from PI channel to energy?
A: The channel to energy conversion is linear: E = Channel Number * 0.04 keV + 1.6 keV (lower energy range of bin)
Channel 0 corresponds to 1.60-1.64 keV, channel 1 corresponds to 1.64-1.68 keV, etc. You can also check the ebounds
extension of RMF files (with the 'fv' command) to confirm the relationship between PI value and energy.

You might also like