% file: steps_e0102_src.txt % % in: $SCI/E0102/Data % % Processing E0102 the 4 E0102 obsids for Cal etc analyses. % 968, 120, 3828, 12147 % - - - % [1/11/12] % For all 4 obsids, Download full CDA files to, e.g., % /tmp/dd/12147/ etc % Started at: df = 3327724 65% /tmp % pkgs 968,120: 2434088 75% /tmp % untar: 2431100 75% /tmp % 3828 untar: 1507048 85% /tmp % etc % [4/13/12 - download again to check bpix versions - obsid 12147 is now "DS 8.4" and bpix from 2012-02-04 so re-do the 12147 analyses with this.] % Processing will be in $SCI/E0102/Data: % *** Set the Obsid to be working on: *** setenv OBSDIR 12147 cd $SCI/E0102/Data/ mkdir obs_{$OBSDIR}/ cd obs_{$OBSDIR} % Link primary and secondary: ln -s /tmp/dd/{$OBSDIR}/primary ln -s /tmp/dd/{$OBSDIR}/secondary cd .. % Setup the nominal files, etc. % Up-to-date setup_obsdir: % cp /nfs/cxc/h1/dph/src/tgcat/bin/setup_obsdir ~/bin/ setup_obsdir obs_{$OBSDIR} % Replace the links with the real files in obs_{$OBSDIR} % - Copying (follow links) all the useful files to TEMP_{$OBSDIR} mkdir TEMP_{$OBSDIR}/ cp obs_{$OBSDIR}/* TEMP_{$OBSDIR}/ % - then delete the dir obs_{$OBSDIR}/ rm -R obs_{$OBSDIR}/ mv TEMP_{$OBSDIR}/ obs_{$OBSDIR}/ ls -lst obs_{$OBSDIR}/ % - - - % - - - % Determine the location of the bright feature on the Q-stroke: ds9 obs_{$OBSDIR}/evt0 % Gauss smooth "2" and find center of the Q-stroke blob: % % Obsid XQ,YQ --> Offset by -0.5 +7.0 % % 120 4228.4 , 3963.6 4227.9 3970.6 % % 968 4112.5 , 4105.5 4112.0 4112.5 % % 3828 4093.75 , 4165.75 4093.25 4172.75 % % 12147 4076.0 , 4132.50 --> 4075.5 4139.5 % % - - - % Start here to reprocess... eg, with N9941 contam file and osip=NONE (5/25/12) % - - - % Use ciao: % CIAO 4.4 Friday, December 2, 2011 % bindir : /nfs/cxc/a1/linux-x86_64/opt/packages/ciao-4.4/bin source /nfs/cxc/a1/setup/ciao-setup -o cd $SCI/E0102/Data/ % Be sure this is set: setenv OBSDIR 12147 % start isis (with ~dd/.isisrc) : isis % use tgcat: % will use the version in ~dd/hy3d/Isis_Extras/ % .sl files from tgcat/scripts copied there, version: % %; Time-stamp: <2011-06-17 11:51:50 dph> % "tgcat.sl version 1.10.2 loaded." % Use my tgcat - it includes the make_offset_arfs() routine. % with osipfile="none" .load tgcat.sl % use run_pipe : %% src_info = set_source_detection_info("tgdetect|findzo|none", "pixel|radec" [, x, y ]); %% mask_info = set_tg_create_mask_info( [rzo, wleg] [; arcsec] ); %% s = set_tg_create_mask_info( [rzo, wheg, wmeg][ ; arcsec] ); %% Units: sky pixels unless qualifier arcsec is present. %% extract_info = set_tgextract_info( s_min, s_max [; arcsec] ); %% set_tgextract_info( s_min, s_max, bd_min, bd_max, bu_min, bu_max [ ; arcsec] ); %% Units: grating degrees (default); %% imaging arcsec (if qualifier present); %% osort_info = set_tgre_osort_info( osort_lo, osort_hi ); %% run_pipe( pdir ; [detect_info=src_info,] [mask_info=mask_info,] %% [extract_info=extract_info,] [osort_info=osort_info]); % Setup custom parameters as in previous analyses: % --- fixed zo location: ***** copy from the offset values above *** src_info = set_source_detection_info("none", "pixel", 4075.5, 4139.5); % --- mask: 55 pixels radius for the whole SNR mask_info = set_tg_create_mask_info( 55.0, 110.0, 110.0 ); % --- extraction: % Want +/- 55 pix extract_info = set_tgextract_info( -55.0*0.492, 55.0*0.492; arcsec ); % --- fixed osort limits: % * pick one: % 968 and 120: %%%%% osort_info = set_tgre_osort_info( 0.25, 0.25); % 3828 and 12147: %%%%% osort_info = set_tgre_osort_info( 0.20, 0.20); % Do it: run_pipe("./obs_"+getenv("OBSDIR")+""; detect_info=src_info, mask_info=mask_info, extract_info=extract_info, osort_info=osort_info); % check output a bit: system("ls -lst obs_"+getenv("OBSDIR")+" | head -30 "); system("gv obs_"+getenv("OBSDIR")+"/summary_im-a.ps"); system("gv obs_"+getenv("OBSDIR")+"/summary_imsp.ps"); system("gv obs_"+getenv("OBSDIR")+"/summary_im_osum.ps"); %.................................. %.................................. % create Alternate arfs % For everything that follows, go into the dir: chdir("obs_"+getenv("OBSDIR")); % [First time] Save the original arfs into a CALDB dir: % save the CALDB ones or - - - Make/save a set of them below !mkdir CALDB_arfs !mv *1.arf CALDB_arfs !ls CALDB_arfs % Make the "sets of arfs" [below] using the current CALDB values, if desired. % Make responses with different contam file... % !pset ardlib AXAF_ACIS0_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM1]" !pset ardlib AXAF_ACIS1_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM2]" !pset ardlib AXAF_ACIS2_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM3]" !pset ardlib AXAF_ACIS3_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM4]" !pset ardlib AXAF_ACIS4_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM5]" !pset ardlib AXAF_ACIS5_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM6]" !pset ardlib AXAF_ACIS6_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM7]" !pset ardlib AXAF_ACIS7_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM8]" !pset ardlib AXAF_ACIS8_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM9]" !pset ardlib AXAF_ACIS9_CONTAM_FILE="./acisD1999-08-13contamN9941.fits[AXAF_CONTAM10]" % DO THIS : % --> cancel the unlearning so these contam files are used: set_punlearn( 0 ); !plist ardlib % and make the responses (again): % make sure the contam file is here: !cp ../acisD1999-08-13contamN9941.fits . orders = [ -1, 1 ] ; make_responses( orders ) ; % and save them: !mkdir N9941_arfs !mv *1.arf N9941_arfs !ls N9941_arfs % Can make the set of arfs here % - below for N,S,E,W versions % or % - can make a multi-arf set by doing % isis> .source ../steps_multiarf % *** Note: The contam name, etc have to be set in steps_multiarf.sl % --- Since 5/25/12: osipfile="none" is explicitly set % in/by the make_offset_arf routine added to tgcat.sl. quit % Can make and save the hetg_0.arf to CALDB % and then make the N9941 hetg_0.arf too (as below) % and move it to N9941_arfs/ % - - - Making sets of arfs - - - % % Note: added a routine "make_offset_arfs" to tgcat.sl % It is in make_offset_arfs.sl in this dir ('/E0102/Data/) % and was pasted into tgcat.sl just after make_responses. % CALDB versions: % Modify the mkgarf X,Y locations: % C: 0.,0. W-E: X +/- 25 pixels N-S: Y +/- 30 pixels orders = [ -1, 1 ] ; make_offset_arfs( orders, 0.0, -30.0 ) ; !mkdir CALDB-S_arfs !mv *1.arf CALDB-S_arfs !ls CALDB-S_arfs % N9941 versions: (after changing the contam file as above) % Modify the mkgarf X,Y locations: % C: 0.,0. W-E: X +/- 25 pixels N-S: Y +/- 30 pixels orders = [ -1, 1 ] ; make_offset_arfs( orders, 0.0, -30.0 ) ; !mkdir N9941-S_arfs !mv *1.arf N9941-S_arfs !ls N9941-S_arfs %.................................. %.................................. % leave isis quit; % Also want to make a zeroth-order arf, so: cd obs_{$OBSDIR} % Put the correct "sourcepixel[x,y]" values *** from above *** in the following: mkarf \ asphistfile='./s3.asphist' \ outfile='hetg_0.arf' \ sourcepixelx=4075.5 \ sourcepixely=4139.5 \ engrid='grid(../aciss_aimpt_cy13.rmf[MATRIX][cols ENERG_LO,ENERG_HI])' \ obsfile='./evt2' \ pbkfile='./pbk0' \ detsubsys='ACIS-S3' \ grating='HETG' \ maskfile='./msk1' \ verbose=1 \ clobber='yes' \ mode='hl' cd .. % Make a new dir to save the products to: mkdir obs_{$OBSDIR}_src cp obs_{$OBSDIR}/evt2 obs_{$OBSDIR}_src/ cp obs_{$OBSDIR}/pha2 obs_{$OBSDIR}_src/ cp obs_{$OBSDIR}/*.arf obs_{$OBSDIR}_src/ # or: cp obs_{$OBSDIR}/CALDB_arfs/*.arf obs_{$OBSDIR}_src/ cp obs_{$OBSDIR}/sum*.ps obs_{$OBSDIR}_src/ % reduce the evt2 size, filter 0.3 to 8 keV: cd obs_{$OBSDIR}_src source /nfs/cxc/a1/setup/lheasoft-setup fselect evt2 evt2_Elt8 Selection Expression[] ENERGY .GT. 300 .AND. ENERGY .LT. 8000 ls -lst *evt* rm evt2 cd .. % Move other arf's that were created to the _src dir: % Copy these dirs to the obs_<>_src dir: cp -Rp obs_{$OBSDIR}/CALDB_arfs obs_{$OBSDIR}_src/ cp -Rp obs_{$OBSDIR}/N9941_arfs obs_{$OBSDIR}_src/ ls -lst obs_{$OBSDIR}_src/*/ % The NSEWC set-of-arfs cp -Rp obs_{$OBSDIR}/CALDB-*_arfs obs_{$OBSDIR}_src/ ls -lst obs_{$OBSDIR}_src/CALDB-*/ % The multi-arfs: cp -Rp obs_{$OBSDIR}/N9941-*_arfs obs_{$OBSDIR}_src/ ls -lst obs_{$OBSDIR}_src/N9941-*/ % Move the osip=none versions of the 110-3 multi-arfs % to the obs_..._src dir: % rename them: mv obs_{$OBSDIR}/N9941-110-3_n497_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n497_arfs/ mv obs_{$OBSDIR}/N9941-110-3_n498_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n498_arfs/ mv obs_{$OBSDIR}/N9941-110-3_n499_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n499_arfs/ mv obs_{$OBSDIR}/N9941-110-3_n500_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n500_arfs/ mv obs_{$OBSDIR}/N9941-110-3_n501_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n501_arfs/ mv obs_{$OBSDIR}/N9941-110-3_n502_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n502_arfs/ mv obs_{$OBSDIR}/N9941-110-3_n503_arfs/ obs_{$OBSDIR}/N9941-110-3nosip_n503_arfs/ % copy them: cp -Rp obs_{$OBSDIR}/N9941-110-3nosip_n*_arfs/ obs_{$OBSDIR}_src/ ls -lst obs_{$OBSDIR}_src/N9941-*nosip*/ %%% Set this if starting here: %%% setenv OBSDIR 120 % make a tar file to move products to Mac, etc: tar -cvf obs_{$OBSDIR}_src_Files.tar obs_{$OBSDIR}_src/* gzip obs_{$OBSDIR}_src_Files.tar % copy to Mac and enjoy ;-) % - - -