photom2_prep
Updated: Apr14,2020

Gather data, mostly generated with image_catalogs, to prepared for running the phtom2 code.

 
% photom2_prep --help   

% photom2_prep ./local_red/FIXUP/20191022T025524.2_acm_sci.fits 8.0  N   

Usage: photom2_prep ./local_red/FIXUP/20191022T025524.2_acm_sci.fits 8.0  N 
arg1 = name of FITS image run through image_catalogs 
arg2 = minimum number of pixels (NumPix) allowed in a source (can be "none")  
arg3 = run in debug mode? (Y/N)  

Files created: 

20191022T025524.2_acm_sci.cdfp
  A cdfp file of the detected sources with Ra,Dec using the updated WCS 

20191022T025524.2_acm_sci.cdfp.reg
   ds9 regions file for overpltting the sources. Every source goes into this file.  

20191022T025524.2_acm_sci_apertures.cdfp
  A cdfp file for source that had NumPix .ge. arg2. If args="none" then thsi file 
  will not be created. This file is generally fed to routines like appot. 

20191022T025524.2_acm_sci.boxlims
   An ASCII file of the [i1,i2,j1,j2] box limits for each source 

photom2_pars.in
   The finput file needed to run photom2. These are basically just the name 
   of the newly update cdfp file, the sky map image (= "none" is not present) 
   and the name of the boxes file. 

% cat photom2_pars.in  
20191022T025524.2_acm_sci.cdfp
20191022T025524.2_acm_sci.boxlims
./local_red/IMAGE_CATS/20191022T025524.2_acm_sci/20191022T025524.2_acm_sci_bkg1.fits


The information in the photom2_pars.in file could be built within the photom2.sh script using the image basename. However, the point of having this prep code is make things easier for running the OTW code photom2. So, the entire prep work is done by photom2_prep, and photom2 is an OTW is a gfortran code dedeicate largelu to image processing.

It should be noted that initially I wrote this using a lot of inidiviual routines. In the process of revising some of the routines to allow treatment of images that did not have valid WSC I revised a single routine, imgcat0_ds9reg_make to rebuild the cdfp file and an accompanying ds9 regions file. I also used a revised version of best_wcs_image that locates the image with the best WSC (and the quality of that WCS). The importance of this is that I can still use photom2_prep to make aperture region files for a code like profiles_prep even if I have yet to derive a valid WCS.




Back to calling page