/home/cohen/doar21/200231/secondary/reproc/2008/ New chandra data directory, with evt1 etc. files downloaded and analyzed in summer 2005 [cohen@ruby chandra]$ cp reprocessHETG.script /home/cohen/doar21/200231/secondary/reproc/2008/. [cohen@ruby 2008]$ ll total 365680 -rwxr-xr-x 1 cohen cohen 129600 Aug 7 16:27 acisf03761_000N001_bpix1.fits -r-xr-xr-x 1 cohen cohen 329310720 Aug 7 16:30 acisf03761_000N001_evt1.fits -rw-r--r-- 1 cohen cohen 100800 Aug 7 16:38 acisf03761_000N001_flt1.fits -rwxr-xr-x 1 cohen cohen 44755200 Aug 7 16:37 pcadf168496624N001_asol1.fits -rwxr-xr-x 1 cohen cohen 4521 Aug 7 16:26 reprocessHETG.script ** with Marc, looking with Prism at the destreaked evt2 file made a few years ago. Looked at GTI7 table - first good time interval is at spacecraft time: 168496631.54 s [cohen@ruby reproc]$ dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168496631.54:168544631.54)]" new_dstrk_preflare_evt2.fits that's 48 ksec OK, now split off others... dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168544631.54:168566631.54)]" new_dstrk_flare_evt2.fits that's 22 ksec dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168566631.54:168588986.74)]" new_dstrk_postflare_evt2.fits and that's the rest, about 22.3 ks Now, go back and make two subsets of the flare: sub1 and sub2, 10 and 12 ksec [cohen@ruby reproc]$ dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168544631.54:168554631.54)]" new_dstrk_flare_sub1_evt2.fits [cohen@ruby reproc]$ dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168554631.54:168566631.54)]" new_dstrk_flare_sub2_evt2.fits OK, have five new destreaked evt2 files Making pha2 files from each one using tgextract: [cohen@ruby reproc]$ ciao CIAO configuration is complete... The CIAO setup for this window has changed from CIAO version : CIAO 3.3 Wednesday, November 16, 2005 Proposal Toolkit version : Cycle 8 Wednesday, November 16, 2005 bin dir : /amundsen/opt/ciao_3.3/bin To: CIAO version : CIAO 3.3 Wednesday, November 16, 2005 Proposal Toolkit version : Cycle 8 Wednesday, November 16, 2005 bin dir : /amundsen/opt/ciao_3.3/bin [cohen@ruby reproc]$ punlearn tgextract [cohen@ruby reproc]$ pset tgextract infile=new_dstrk_flare_evt2.fits [cohen@ruby reproc]$ pset tgextract outfile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ tgextract Input event file (output event file from L1.5 processing) (new_dstrk_flare_evt2.fits): If typeII, enter full output file name or '.'; if typeI, enter output rootname (new_dstrk_flare_pha2.fits): Input ancillary response file name (none): Input redistribution file name (none): Source ID's to process: 'all', comma list, @file (all): Grating parts to process: HETG, HEG, MEG, LETG, header_value (HETG|HEG|MEG|LETG|header_value) (header_value): Grating diffraction orders to process: 'default', comma list, range list, @file (default): Output file type: typeI (single spectrum) or typeII (multiple spectra) (pha_typeI|pha_typeII) (pha_typeII): # tgextract (CIAO3.3): ERROR: Failed to open the DM data block in dataset 'new_dstrk_flare_evt2.fits'. DM Error: 'Failed to find block REGION in dataset new_dstrk_flare_evt2.fits'. Marc says (11aug08 am) "try something like opt=all" Deleted all five new files, and reissued the command for the "flare" interval: [cohen@ruby reproc]$ dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168544631.54:168566631.54)]" opt=all new_dstrk_flare_evt2.fits Sorry, Arguments not ok, try again. Problem opening parameter file dmcopy.par Parameter library error: parameter error? Hmmmm, help file indicates that option=all would have worked, but first Looks like the syntax isn't right; trying it this way: [cohen@ruby reproc]$ pset dmcopy opt=all [cohen@ruby reproc]$ dmcopy "acisf03761_000N001_reset_flt1_dstrk_evt2.fits[time=(168544631.54:168566631.54)]" new_dstrk_flare_evt2.fits OK, a spot check in PRISM indicates that it worked. Let's try the next one with the command line switch (in fact, let's do all four of the remaining ones that way): Now, trying running tgextract on the flare section: [cohen@ruby reproc]$ punlearn tgextract [cohen@ruby reproc]$ pset tgextract infile=new_dstrk_flare_evt2.fits [cohen@ruby reproc]$ pset tgextract outfile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ tgextract Input event file (output event file from L1.5 processing) (new_dstrk_flare_evt2.fits): If typeII, enter full output file name or '.'; if typeI, enter output rootname (new_dstrk_flare_pha2.fits): Input ancillary response file name (none): Input redistribution file name (none): Source ID's to process: 'all', comma list, @file (all): Grating parts to process: HETG, HEG, MEG, LETG, header_value (HETG|HEG|MEG|LETG|header_value) (header_value): Grating diffraction orders to process: 'default', comma list, range list, @file (default): Output file type: typeI (single spectrum) or typeII (multiple spectra) (pha_typeI|pha_typeII) (pha_typeII): Seemed to work... Now, make rmfs: [cohen@ruby reproc]$ punlearn mkgrmf [cohen@ruby reproc]$ pset mkgrmf order=1 [cohen@ruby reproc]$ pset mkgrmf grating_arm=HEG [cohen@ruby reproc]$ pset mkgrmf outfile=heg_flare_p1.rmf [cohen@ruby reproc]$ pset mkgrmf obsfile="new_dstrk_flare_pha2.fits[SPECTRUM]" [cohen@ruby reproc]$ pset mkgrmf regionfile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ pset mkgrmf detsubsys=ACIS-S3 [cohen@ruby reproc]$ pset mkgrmf wvgrid_arf=compute [cohen@ruby reproc]$ pset mkgrmf wvgrid_chan=compute [cohen@ruby reproc]$ pset mkgrmf clobber=no [cohen@ruby reproc]$ mkgrmf Output File Name (heg_flare_p1.rmf): Enter ARF side wavelegth grid [angstroms] (compute): Enter channel-side wavelegth grid [angstroms] (compute): Enter Grating order (1): Name of fits file with obs info (new_dstrk_flare_pha2.fits[SPECTRUM]): File containing extraction region (new_dstrk_flare_pha2.fits): SrcID (1): Enter RMF threshold (1e-06): Verbosity (0:5) (0): Detector Name (e.g., ACIS-S3) (ACIS-S3): Enter Grating Arm (HEG|MEG|LEG|NONE) (HEG): Repeat, for other three rmfs: [cohen@ruby reproc]$ mkgrmf Output File Name (heg_flare_p1.rmf): heg_flare_m1.rmf Enter ARF side wavelegth grid [angstroms] (compute): Enter channel-side wavelegth grid [angstroms] (compute): Enter Grating order (1): -1 Name of fits file with obs info (new_dstrk_flare_pha2.fits[SPECTRUM]): File containing extraction region (new_dstrk_flare_pha2.fits): SrcID (1): Enter RMF threshold (1e-06): Verbosity (0:5) (0): Detector Name (e.g., ACIS-S3) (ACIS-S3): Enter Grating Arm (HEG|MEG|LEG|NONE) (HEG): [cohen@ruby reproc]$ mkgrmf Output File Name (heg_flare_m1.rmf): meg_flare_p1.rmf Enter ARF side wavelegth grid [angstroms] (compute): Enter channel-side wavelegth grid [angstroms] (compute): Enter Grating order (-1): 1 Name of fits file with obs info (new_dstrk_flare_pha2.fits[SPECTRUM]): File containing extraction region (new_dstrk_flare_pha2.fits): SrcID (1): Enter RMF threshold (1e-06): Verbosity (0:5) (0): Detector Name (e.g., ACIS-S3) (ACIS-S3): Enter Grating Arm (HEG|MEG|LEG|NONE) (HEG): MEG [cohen@ruby reproc]$ mkgrmf Output File Name (meg_flare_p1.rmf): meg_flare_m1.rmf Enter ARF side wavelegth grid [angstroms] (compute): Enter channel-side wavelegth grid [angstroms] (compute): Enter Grating order (1): -1 Name of fits file with obs info (new_dstrk_flare_pha2.fits[SPECTRUM]): File containing extraction region (new_dstrk_flare_pha2.fits): SrcID (1): Enter RMF threshold (1e-06): Verbosity (0:5) (0): Detector Name (e.g., ACIS-S3) (ACIS-S3): Enter Grating Arm (HEG|MEG|LEG|NONE) (MEG): Now, make garfs: First, HEG -1 (row = 3) [cohen@ruby reproc]$ punlearn fullgarf [cohen@ruby reproc]$ pset fullgarf phafile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ pset fullgarf pharow=3 [cohen@ruby reproc]$ pset fullgarf evtfile=new_dstrk_flare_evt2.fits [cohen@ruby reproc]$ pset fullgarf asol=pcadf168496624N001_asol1.fits [cohen@ruby reproc]$ pset fullgarf engrid="grid(heg_flare_m1.rmf[cols ENERG_LO,ENERG_HI])" [cohen@ruby reproc]$ pset fullgarf dtffile=")evtfile" [cohen@ruby reproc]$ pset fullgarf badpix=acisf03761_000N001_new_bpix1.fits [cohen@ruby reproc]$ pset fullgarf maskfile=acisf03761_000N001_msk1.fits parammatch : can't find parameter maskfile in reference list Hmmmm... [cohen@ruby reproc]$ pset fullgarf rootname=new_flare_hm1 (this parameter doesn't seem to be set in Maurice's script...) OK, seemed to work (and I gave it a silly rootname, as it adds the HEG and order designation); so rerun: OK: dmarfadd @thisfile.istemporary new_flare_HEG_-1_garf.fits Now, HEG +1 [cohen@ruby reproc]$ punlearn fullgarf [cohen@ruby reproc]$ pset fullgarf phafile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ pset fullgarf pharow=4 [cohen@ruby reproc]$ pset fullgarf evtfile=new_dstrk_flare_evt2.fits [cohen@ruby reproc]$ pset fullgarf asol=pcadf168496624N001_asol1.fits [cohen@ruby reproc]$ pset fullgarf engrid="grid(heg_flare_p1.rmf[cols ENERG_LO,ENERG_HI])" [cohen@ruby reproc]$ pset fullgarf dtffile=")evtfile" [cohen@ruby reproc]$ pset fullgarf badpix=acisf03761_000N001_new_bpix1.fits [cohen@ruby reproc]$ pset fullgarf rootname=new_flare_ [cohen@ruby reproc]$ fullgarf OK: dmarfadd @thisfile.istemporary new_flare_HEG_1_garf.fits Now, MEG -1 [cohen@ruby reproc]$ punlearn fullgarf [cohen@ruby reproc]$ pset fullgarf phafile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ pset fullgarf pharow=9 [cohen@ruby reproc]$ pset fullgarf evtfile=new_dstrk_flare_evt2.fits [cohen@ruby reproc]$ pset fullgarf asol=pcadf168496624N001_asol1.fits [cohen@ruby reproc]$ pset fullgarf engrid="grid(meg_flare_m1.rmf[cols ENERG_LO,ENERG_HI])" [cohen@ruby reproc]$ pset fullgarf dtffile=")evtfile" [cohen@ruby reproc]$ pset fullgarf badpix=acisf03761_000N001_new_bpix1.fits [cohen@ruby reproc]$ pset fullgarf rootname=new_flare_ [cohen@ruby reproc]$ fullgarf OK: dmarfadd @thisfile.istemporary new_flare_MEG_-1_garf.fits Finally, MEG+1 [cohen@ruby reproc]$ punlearn fullgarf [cohen@ruby reproc]$ pset fullgarf phafile=new_dstrk_flare_pha2.fits [cohen@ruby reproc]$ pset fullgarf pharow=10 [cohen@ruby reproc]$ pset fullgarf evtfile=new_dstrk_flare_evt2.fits [cohen@ruby reproc]$ pset fullgarf asol=pcadf168496624N001_asol1.fits [cohen@ruby reproc]$ pset fullgarf engrid="grid(meg_flare_m1.rmf[cols ENERG_LO,ENERG_HI])" [cohen@ruby reproc]$ pset fullgarf dtffile=")evtfile" [cohen@ruby reproc]$ pset fullgarf badpix=acisf03761_000N001_new_bpix1.fits [cohen@ruby reproc]$ pset fullgarf rootname=new_flare_ [cohen@ruby reproc]$ fullgarf OK: dmarfadd @thisfile.istemporary new_flare_MEG_1_garf.fits Adding DETCHANS keyword for compatibility with XSPEC 12 [cohen@ruby reproc]$ dmhedit new_dstrk_flare_pha2.fits filelist=none operation="add after HDUVERS1" key=DETCHANS value=8192 datatype=long ---- 11Aug08 Summary Splitting up an observation into spectra from different time intervales can be done starting with an evt2 file (maybe after some processing; e.g. destreaking). Check the GTI blocks to find the start and stop times (use Prism); dmcopy "file.fits[time=(xxxxxxx:yyyyyy)]" outfile.fits option=all is the syntax Then run tgextract; and the scripts mkgrmf and fullgarf Don't forget to put the detchans keyword in the new pha2 files ---- repeating process for preflare sector: [cohen@ruby reproc]$ punlearn tgextract [cohen@ruby reproc]$ pset tgextract infile=new_dstrk_preflare_evt2.fits [cohen@ruby reproc]$ pset tgextract outfile=new_dstrk_preflare_pha2.fits [cohen@ruby reproc]$ tgextract {ok all the defaults} [cohen@ruby reproc]$ dmhedit new_dstrk_preflare_pha2.fits filelist=none operation="add after HDUVERS1" key=DETCHANS value=8192 datatype=long [cohen@ruby reproc]$ punlearn mkgrmf [cohen@ruby reproc]$ pset mkgrmf order=1 [cohen@ruby reproc]$ pset mkgrmf grating_arm=HEG [cohen@ruby reproc]$ pset mkgrmf outfile=heg_preflare_p1.rmf [cohen@ruby reproc]$ pset mkgrmf obsfile="new_dstrk_preflare_pha2.fits[SPECTRUM]" [cohen@ruby reproc]$ pset mkgrmf regionfile=new_dstrk_preflare_pha2.fits [cohen@ruby reproc]$ pset mkgrmf detsubsys=ACIS-S3 [cohen@ruby reproc]$ mkgrmf wvgrid_arf=compute Enter channel-side wavelegth grid [angstroms] (compute): Enter Grating order (1): Name of fits file with obs info (new_dstrk_preflare_pha2.fits[SPECTRUM]): File containing extraction region (new_dstrk_preflare_pha2.fits): SrcID (1): Enter RMF threshold (1e-06): Verbosity (0:5) (0): Detector Name (e.g., ACIS-S3) (ACIS-S3): Enter Grating Arm (HEG|MEG|LEG|NONE) (HEG): {repeat for other three grating arms} [cohen@ruby reproc]$ punlearn fullgarf [cohen@ruby reproc]$ pset fullgarf phafile=new_dstrk_preflare_pha2.fits [cohen@ruby reproc]$ pset fullgarf pharow=3 [cohen@ruby reproc]$ pset fullgarf evtfile=new_dstrk_preflare_evt2.fits [cohen@ruby reproc]$ pset fullgarf asol=pcadf168496624N001_asol1.fits [cohen@ruby reproc]$ pset fullgarf engrid="grid(heg_preflare_m1.rmf[cols ENERG_LO,ENERG_HI])" [cohen@ruby reproc]$ pset fullgarf dtffile=")evtfile" [cohen@ruby reproc]$ pset fullgarf badpix=acisf03761_000N001_new_bpix1.fits [cohen@ruby reproc]$ pset fullgarf rootname=new_preflare_ [cohen@ruby reproc]$ fullgarf {repeat for other three grating arms} ---- and now repeat the above process for the remaining three sectors...