acam_plots

This is a script that surveys all local FITS images that have been processed in with wcs_doall (usually via wcs_list_proc).

  1. The basic run ona single night.
  2. Combining multiple data sets.



  3. The basic run ona single night.

    Actually, this routine runs acam_wcs_stats.sh on each local FITS images and collects WCS-related statistics. These parameters are then plotted with my routine pxy_SM_scat.py. You can use the pxy_SM_scat.py link to see a list of available point types.

     
    % acam_plots 
    Usage: acam_plots Y 20160301 blue o 
    arg1 = display (Y/N)
    arg2 = UT date string
    arg3 = color of markers 
    arg4 = type of markers 
    
    

    In practice, I run this in the same directory where I have wcs_doall-processed the images. The script survey all local FITS files and then assembles the WCS values from the headers.

     
    
    % pwd
    /home/sco/ACAM/20160302/WCS_calibrated/test1
    
    % ls
    20160302T034710.0_acm_sci.fits  20160302T071745.9_acm_sci.fits
    20160302T035901.7_acm_sci.fits  20160302T074323.9_acm_sci.fits
    20160302T040847.6_acm_sci.fits  20160302T081255.2_acm_sci.fits
    20160302T042939.0_acm_sci.fits  dss.fits
    20160302T065303.7_acm_sci.fits
    
    % acam_plots Y 20160302 red d
    
    
    Presently I get 3 plots that are viewed with the script if I set the firt command line argument to "Y".




    Combining multiple data sets.

    To set up plots with multiple data sets (i.e. different nights) I gather the UT*.file files and then build a style.* file manually. Here is an example for the March4,2016 ACAM work I did:

     
    
    % cd /home/sco/sco/scohtm/scocodes/wcs_list_proc/studies/run1/tz
    
    % ls
    a.1  a.3    Plot_tz.png  Scal*          tz.dat                   UT20160301-hetq-tz.file
    a.2  GRAB*  RUN*         style.hetq-tz  UT20160229-hetq-tz.file  UT20160302-hetq-tz.file
    
    I use a script like GRAB to get the files:
    % cat GRAB
    #!/bin/bash
    z="20160229"
    cp /home/sco/ACAM/$z/WCS_calibrated/UT$z-hetq-tz.file .
    z="20160301"
    cp /home/sco/ACAM/$z/WCS_calibrated/UT$z-hetq-tz.file .
    z="20160302"
    cp /home/sco/ACAM/$z/WCS_calibrated/UT$z-hetq-tz.file .
    
    Next, I edit the first line of each UT file so that 
    I will have different plot symbols for each file:
    
    % head -1 UT*file
    ==> UT20160229-hetq-tz.file <==
    green d 100
    
    ==> UT20160301-hetq-tz.file <==
    blue o 100
    
    ==> UT20160302-hetq-tz.file <==
    red v 100
    
    Then I build a single style file that will use all 3 
    files in pxy_SM_scat.py:
    % cat style.hetq-tz
    ACAM WCS Parameters
    HETQ (HET Parallactic Angle)
    TZ (TZ=Pos_angle-HETQ, degrees) 
    UT20160229-hetq-tz.file
    UT20160301-hetq-tz.file
    UT20160302-hetq-tz.file
    
    To run the final plot:
    % cat RUN
    # Make the plot 
    pxy_SM_scat.py style.hetq-tz 0 360 86 91
    mv pxy.png Plot_tz.png 
    
    
    The last script, Scal, is use to compute statistics for the Y-axis quantities.
     
    
    % cat Scal 
    #!/bin/bash
    z="20160229"
    cp /home/sco/ACAM/$z/WCS_calibrated/list.ps a.1
    z="20160301"
    cp /home/sco/ACAM/$z/WCS_calibrated/list.ps a.2
    z="20160302"
    cp /home/sco/ACAM/$z/WCS_calibrated/list.ps a.3
    z="20160312"
    cp /home/sco/ACAM/$z/WCS_calibrated/list.ps a.4
    #
    cat a.1 a.2 a.3 a.4 > ps.dat
    calstats.py ps.dat
    
    % Scal
    0.27104 0.00085 0.26860 0.27350 0.271080 53
    (mean,std,min,max,median,Npnts)
    
    
    



    Back to SCO CODES page