cd /home/md/chandra
mkdir spectroscopy
cd spectroscopy
cp ../mosaic/abell426.fits .
ciao
ds9 abell426.fits

; Creating 5 annuli

; Aspect history

punlearn asphist
pset asphist infile=/home/md/chandra/11714/new/pcadf376598961N001_asol1.fits
pset asphist outfile=asphist11714.fits
pset asphist evtfile=/home/md/chandra/11714/new/acisf11714_000N001_repro_evt2.fits
asphist clobber+

punlearn asphist
pset asphist infile=/home/md/chandra/11716/new/pcadf371565034N001_asol1.fits
pset asphist outfile=asphist11716.fits
pset asphist evtfile=/home/md/chandra/11716/new/acisf11716_000N001_repro_evt2.fits
asphist

punlearn asphist
pset asphist infile=/home/md/chandra/12037/new/pcadf376424703N001_asol1.fits
pset asphist outfile=asphist12037.fits
pset asphist evtfile=/home/md/chandra/12037/new/acisf12037_000N001_repro_evt2.fits
asphist

; Extracting spectra

;11714

punlearn specextract
pset specextract infile=/home/md/chandra/11714/new/acisf11714_000N001_repro_evt2.fits"[sky=region(annulus_1.reg)]"
pset specextract outroot=11714_annulus_1
pset specextract pbkfile=/home/md/chandra/11714/new/acisf376598038N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11714.fits
pset specextract mskfile=/home/md/chandra/11714/new/acisf11714_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11714/new/acisf11714_000N001_repro_evt2.fits"[sky=region(annulus_2.reg)]"
pset specextract outroot=11714_annulus_2
pset specextract pbkfile=/home/md/chandra/11714/new/acisf376598038N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11714.fits
pset specextract mskfile=/home/md/chandra/11714/new/acisf11714_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11714/new/acisf11714_000N001_repro_evt2.fits"[sky=region(annulus_3.reg)]"
pset specextract outroot=11714_annulus_3
pset specextract pbkfile=/home/md/chandra/11714/new/acisf376598038N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11714.fits
pset specextract mskfile=/home/md/chandra/11714/new/acisf11714_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11714/new/acisf11714_000N001_repro_evt2.fits"[sky=region(annulus_4.reg)]"
pset specextract outroot=11714_annulus_4
pset specextract pbkfile=/home/md/chandra/11714/new/acisf376598038N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11714.fits
pset specextract mskfile=/home/md/chandra/11714/new/acisf11714_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11714/new/acisf11714_000N001_repro_evt2.fits"[sky=region(annulus_5.reg)]"
pset specextract outroot=11714_annulus_5
pset specextract pbkfile=/home/md/chandra/11714/new/acisf376598038N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11714.fits
pset specextract mskfile=/home/md/chandra/11714/new/acisf11714_000N001_msk1.fits
pset specextract clobber+
specextract

;11716

punlearn specextract
pset specextract infile=/home/md/chandra/11716/new/acisf11716_000N001_repro_evt2.fits"[sky=region(annulus_1.reg)]"
pset specextract outroot=11716_annulus_1
pset specextract pbkfile=/home/md/chandra/11716/new/acisf371564623N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11716.fits
pset specextract mskfile=/home/md/chandra/11716/new/acisf11716_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11716/new/acisf11716_000N001_repro_evt2.fits"[sky=region(annulus_2.reg)]"
pset specextract outroot=11716_annulus_2
pset specextract pbkfile=/home/md/chandra/11716/new/acisf371564623N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11716.fits
pset specextract mskfile=/home/md/chandra/11716/new/acisf11716_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11716/new/acisf11716_000N001_repro_evt2.fits"[sky=region(annulus_3.reg)]"
pset specextract outroot=11716_annulus_3
pset specextract pbkfile=/home/md/chandra/11716/new/acisf371564623N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11716.fits
pset specextract mskfile=/home/md/chandra/11716/new/acisf11716_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11716/new/acisf11716_000N001_repro_evt2.fits"[sky=region(annulus_4.reg)]"
pset specextract outroot=11716_annulus_4
pset specextract pbkfile=/home/md/chandra/11716/new/acisf371564623N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11716.fits
pset specextract mskfile=/home/md/chandra/11716/new/acisf11716_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/11716/new/acisf11716_000N001_repro_evt2.fits"[sky=region(annulus_5_point.reg)]"
pset specextract outroot=11716_annulus_5
pset specextract pbkfile=/home/md/chandra/11716/new/acisf371564623N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist11716.fits
pset specextract mskfile=/home/md/chandra/11716/new/acisf11716_000N001_msk1.fits
pset specextract clobber+
specextract

;12037

punlearn specextract
pset specextract infile=/home/md/chandra/12037/new/acisf12037_000N001_repro_evt2.fits"[sky=region(annulus_1.reg)]"
pset specextract outroot=12037_annulus_1
pset specextract pbkfile=/home/md/chandra/12037/new/acisf376424292N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist12037.fits
pset specextract mskfile=/home/md/chandra/12037/new/acisf12037_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/12037/new/acisf12037_000N001_repro_evt2.fits"[sky=region(annulus_2.reg)]"
pset specextract outroot=12037_annulus_2
pset specextract pbkfile=/home/md/chandra/12037/new/acisf376424292N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist12037.fits
pset specextract mskfile=/home/md/chandra/12037/new/acisf12037_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/12037/new/acisf12037_000N001_repro_evt2.fits"[sky=region(annulus_3.reg)]"
pset specextract outroot=12037_annulus_3
pset specextract pbkfile=/home/md/chandra/12037/new/acisf376424292N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist12037.fits
pset specextract mskfile=/home/md/chandra/12037/new/acisf12037_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/12037/new/acisf12037_000N001_repro_evt2.fits"[sky=region(annulus_4.reg)]"
pset specextract outroot=12037_annulus_4
pset specextract pbkfile=/home/md/chandra/12037/new/acisf376424292N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist12037.fits
pset specextract mskfile=/home/md/chandra/12037/new/acisf12037_000N001_msk1.fits
pset specextract clobber+
specextract
punlearn specextract
pset specextract infile=/home/md/chandra/12037/new/acisf12037_000N001_repro_evt2.fits"[sky=region(annulus_5.reg)]"
pset specextract outroot=12037_annulus_5
pset specextract pbkfile=/home/md/chandra/12037/new/acisf376424292N001_pbk0.fits
pset specextract energy_wmap=7000:11000
pset specextract energy=0.3:11.0:0.01
pset specextract verbose=1
pset specextract asp=asphist12037.fits
pset specextract mskfile=/home/md/chandra/12037/new/acisf12037_000N001_msk1.fits
pset specextract clobber+
specextract

punlearn combine_spectra
pset combine_spectra src_spectra="11714_annulus_1.pi,11716_annulus_1.pi,12037_annulus_1.pi"
pset combine_spectra outroot=combine_1
pset combine_spectra src_rmfs="11714_annulus_1.wrmf,11716_annulus_1.wrmf,12037_annulus_1.wrmf"
pset combine_spectra src_arfs="11714_annulus_1.warf,11716_annulus_1.warf,12037_annulus_1.warf"
pset combine_spectra clobber+
combine_spectra
punlearn combine_spectra
pset combine_spectra src_spectra="11714_annulus_2.pi,11716_annulus_2.pi,12037_annulus_2.pi"
pset combine_spectra outroot=combine_2
pset combine_spectra src_rmfs="11714_annulus_2.wrmf,11716_annulus_2.wrmf,12037_annulus_2.wrmf"
pset combine_spectra src_arfs="11714_annulus_2.warf,11716_annulus_2.warf,12037_annulus_2.warf"
pset combine_spectra clobber+
combine_spectra
punlearn combine_spectra
pset combine_spectra src_spectra="11714_annulus_3.pi,11716_annulus_3.pi,12037_annulus_3.pi"
pset combine_spectra outroot=combine_3
pset combine_spectra src_rmfs="11714_annulus_3.wrmf,11716_annulus_3.wrmf,12037_annulus_3.wrmf"
pset combine_spectra src_arfs="11714_annulus_3.warf,11716_annulus_3.warf,12037_annulus_3.warf"
pset combine_spectra clobber+
combine_spectra
punlearn combine_spectra
pset combine_spectra src_spectra="11714_annulus_4.pi,11716_annulus_4.pi,12037_annulus_4.pi"
pset combine_spectra outroot=combine_4
pset combine_spectra src_rmfs="11714_annulus_4.wrmf,11716_annulus_4.wrmf,12037_annulus_4.wrmf"
pset combine_spectra src_arfs="11714_annulus_4.warf,11716_annulus_4.warf,12037_annulus_4.warf"
pset combine_spectra clobber+
combine_spectra
punlearn combine_spectra
pset combine_spectra src_spectra="11714_annulus_5.pi,11716_annulus_5.pi,12037_annulus_5.pi"
pset combine_spectra outroot=combine_5
pset combine_spectra src_rmfs="11714_annulus_5.wrmf,11716_annulus_5.wrmf,12037_annulus_5.wrmf"
pset combine_spectra src_arfs="11714_annulus_5.warf,11716_annulus_5.warf,12037_annulus_5.warf"
pset combine_spectra clobber+
combine_spectra