acam_nearest

Find the ACAM image that was taken closest in time to the input (PAS) image.

 

% acam_nearest --help  
Help Information for:  acam_nearest

Usage: acam_nearest /home/sco/20161207/acm/20161207T225646.4_acm_sci.fits 
arg1 = fullpath name of image you want matched 

I will show: /home/sco/sco/codes/bash/HELP_FILES/acam_nearest.help

Enter any key to roceed with the view of help:
acam_nearest:
  Find the acm image that was taken nearest in time to the 
  input image. The input image must be a standard PAS image. 

% ls 
BaseDir  Date  README  S/
% cat BaseDir 
/home/sco/HET_work/lrs2_points/Dec2016
% cat Date 
20161207

% acam_nearest /home/sco/HET_work/lrs2_points/Dec2016/20161207/lrs2/lrs20000032/exp01/lrs2/20161207T090121.2_066LL_sci.fits 
/home/sco/HET_work/lrs2_points/Dec2016/20161207/acm/20161207T090101.4_acm_sci.fits         
       

Some Improvements to help get the correct image (Dec15,2016)

As is so ofetn the case, once I started using this script I found a number of problem cases. I use one here as a demo in developing some new features that will help in these cases. Below is the lmap output line where I have selected an acam image (20161206T075346.9_acm_sci.fits) for my mt science image (see below).


 Xlrs2   Ylrs2     Xacam  Yacam 
701.54  363.27    722.83  571.13   2.7957  1.5822   012  01  or  20161206    20161206T07534 6.9_acm_sci.fits

The lmap run was:
% lmap 012  01  or      (for Date = 20161206) 

The two science images are:
lower  =  /home/sco/HET_work/lrs2_points/Dec2016/20161206/lrs2/lrs20000012/exp01/lrs2/20161206T080229.6_056RL_sci.fits  
upper  =  /home/sco/HET_work/lrs2_points/Dec2016/20161206/lrs2/lrs20000012/exp01/lrs2/20161206T080229.6_056RU_sci.fits 
 
I should not that I have already installed one helpful check in lmap: I paint the IFU outline on the selected acam image. If no star is there then I know I propbably have a bad acam image selection. However, the goal here is to catch this error upstream at the level of this script! By adding an extra output file from the closest_image.sh code, and a few changes to acam_nearest, I now have a warning system whe the image offset time is more than 200 seconds:

% acam_nearest /home/sco/HET_work/lrs2_points/Dec2016/20161206/lrs2/lrs20000012/exp01/lrs2/20161206T080229.6_056RL_sci.fits Y
Closest image in time from list: 
/home/sco/HET_work/lrs2_points/Dec2016/20161206/acm/20161206T075346.9_acm_sci.fits                                      

 found an image 

Info for selected image: 
       522.7   (Minimum_time_difference)
    8      (Line number of this image in input file) 
/home/sco/HET_work/lrs2_points/Dec2016/20161206/acm/20161206T075346.9_acm_sci.fits                                      

*** WARNING:  This delta_Time may be too LARGE!!!! **** 

tmin = 522.7

Enter any key:

You can now use vi to view the file of delta_Time and file     
names. The code has located the closest image in time, but     
you can use this list to click-and-drag on another acam image  
image if that is the one you wish to select. If you choose to   
NOT use this review option, the image found above will be used. 
Review image times and pathnames (Y/N):Y 

**** I inspect the full list and decide thatthere was NO acam image taken! 

Enter desired fullpath image name for acam:
NO_Image 

% cat Acam.Near
NO_Image

 




Back to SCO CODES page