fitsfind_markII
Updated: Mar13,2020

Find all FITS files below the directory path specified on the command line.

 
%  fitsfind_markII $tdata/T_images/S1 

usage: fitsfind_markII . [-v] [-h] [-fp] [-p ] 
Additional options: 
     -v  = print verbose comments and run in debug mode 
     -h  = show a help file and then exit 
     -p  = specify starting string (prefix) of image name  
     -fp = make output images have fullpath names  

EXAMPLE:
I wan to make a big list of images in a reduction, then I 
will filter that to get only the images in my PHOT2 subdirectories. 
Most importantly, I want the image names to be FULLPATH. 

% cd /home/sco/ACM_work_Oct2019/  
% ls  
junk.locdir2	phot2_check_2/	phot2.parlab  play/	     red_20191020/  red_20191026/  summary/	 wcs_check/
phot2_check_1/	phot2_check_3/	phot2.table   red_20191018/  red_20191022/  red_20191027/  Test_imcats/

% fitsfind_markII . -fp -p 20  
 5144    (Number of FITS file found, see fitsfind.out) 
% head -5 fitsfind.out  
/home/sco/ACM_work_Oct2019/red_20191018/bias_20191018/20191018T175621.7_acm_sci_FBPcorr_20191018.fits
/home/sco/ACM_work_Oct2019/red_20191018/bias_20191018/20191018T175621.7_acm_sci_FBP_20191018.fits
/home/sco/ACM_work_Oct2019/red_20191018/bias_20191018/20191018T175621.7_acm_sci_BIAS_20191018.fits
/home/sco/ACM_work_Oct2019/red_20191018/local_red/VISCAT/20191018T061517.4_acm_sci.fits
/home/sco/ACM_work_Oct2019/red_20191018/local_red/VISCAT/20191018T043932.0_acm_sci.fits

# That is a lot of files. Also, notice that these are full path names, so you 
# can use this file all over the place! 

Maybe I want only the images in my ...../local_red/PHOT2 directories: 

% cat fitsfind.out | grep "/PHOT2/" > new.list   
% linecnt new.list  
 146
% head -5 new.list  
/home/sco/ACM_work_Oct2019/red_20191018/local_red/PHOT2/20191018T024537.2_acm_sci.fits
/home/sco/ACM_work_Oct2019/red_20191018/local_red/PHOT2/20191018T061517.4_acm_sci.fits
/home/sco/ACM_work_Oct2019/red_20191018/local_red/PHOT2/20191018T061348.5_acm_sci.fits
/home/sco/ACM_work_Oct2019/red_20191018/local_red/PHOT2/20191018T084649.7_acm_sci.fits
/home/sco/ACM_work_Oct2019/red_20191018/local_red/PHOT2/20191018T061436.9_acm_sci.fits


Hence, we end up with a managable number (146) of images with the file names given in a fullpath format. We can move this file around and run it through many processing scripts or codes. In other words, we are not tied to running our operations in the location that contains the ./local_red subdirectory.




Back to calling page