% 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 % 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 % % - - - % - - - % 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/ % 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." require("tgcat"); % 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 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 obs_"+getenv("OBSDIR")); system("gv obs_"+getenv("OBSDIR")+"/summary_im-a.ps"); system("gv obs_"+getenv("OBSDIR")+"/summary_im_osum.ps"); 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/ 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 gzip evt2_Elt8 cd .. % 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 ;-) % (unzip the evt2_Elt8 file for faster reading in) % ============================================================ % Extract the spectrum of the nearby point source % RX J0103.6-7201 = 2MASS J01033752-7201330 % % Generally follow steps above but use different extraction parameters % and no need for zo arf: setenv OBSDIR 12147 % - - - % Determine the location of the * FIELD SOURCE * ds9 obs_{$OBSDIR}/evt0 % Obsid X_2mass Y_2mass % % 120 4 % % 968 4 % % 3828 4324.5 4211.0 % % 12147 4307.0 4178.0 % % - - - % - - - % 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/ % 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." require("tgcat"); % 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]); % --- fixed zo location: ***** copy from the values above *** src_info = set_source_detection_info("none", "pixel", 4307.0, 4178.0); % Do it: run_pipe("./obs_"+getenv("OBSDIR")+""; detect_info=src_info ); % check output a bit: system("ls obs_"+getenv("OBSDIR")); 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"); system("gv obs_"+getenv("OBSDIR")+"/summary_flux_overview.ps"); quit; % Make a new dir to save the 2MASS FIELD SOURCE products to: mkdir obs_{$OBSDIR}_2mass cp obs_{$OBSDIR}/evt2 obs_{$OBSDIR}_2mass/ cp obs_{$OBSDIR}/pha2 obs_{$OBSDIR}_2mass/ cp obs_{$OBSDIR}/*.arf obs_{$OBSDIR}_2mass/ cp obs_{$OBSDIR}/sum*.ps obs_{$OBSDIR}_2mass/ % These too: cp obs_{$OBSDIR}/*.rmf obs_{$OBSDIR}_2mass/ % reduce the evt2 size, filter 0.3 to 8 keV: cd obs_{$OBSDIR}_2mass 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 .. % ======= done with field source =======