This work: /home/sco/ACM_work_Oct2019/red_20191022/Test1 Date rejection work for zpandsky ================================ The phot routine, near the end of its work, produces a table file with basename: ${basename}_ZP Note: This table is built with: zpmido_table_markII ${basename}.fits ZP For our example with 20191022T025524.2_acm_sci.fits these fiels are: 20191022T025524.2_acm_sci_ZP.params,parlab,table We can inspect our ZP,SKY data space in a way where we can view images with: table_ds9_panner 20191022T025524.2_acm_sci_ZP 20191022T025524.2_acm_sci.fits Xcen Ycen ZPSEC MeanSky In this example I view the parameter and find a clump of "valid" points thate would indicate good values of: ZPSEC = -2.76438 MeanSky = 62.2678 adu I can use the b (box) option to mark these points in a box. The marked points are in: xyf.in Here is an example of the top of this file: Keys for icurs5.py ZP for 1-sec [= mstan-{m30+2.5log(Texp)} ] Average value in sky annulus (adu) -99.0000 1263.1650 0 1 -2.6924 115.6200 0 2 -99.0000 81.0960 0 3 -2.7434 78.7610 1 4 -2.7294 79.7960 1 5 -2.7494 66.4100 1 6 What we want to do is average the points maeked in column 3 with "1". s I use the code: point_selector_stats.sh Usage: point_selector_stats.sh xyf.in X 0 N arg1 - name of xyf.in-type file (usually xyf.in) arg2 - Axis to to analyzed (X or Y) ) arg3 - flag value to be pulled (usually 0 or 1) arg4 - run in debug/verbose mode (Y/N) Hence to get my stats for the manually isolated points: % point_selector_stats.sh xyf.in X 1 N -2.76508 -2.76490 0.06190 0.01170 28 (mean,mediam,sig,me,n) % point_selector_stats.sh xyf.in Y 1 N 63.62451 62.91000 5.34211 1.00956 28 (mean,mediam,sig,me,n) If I were taking the median as the value, and me as the error I would say my best values are: ZPSEC = -2.76490 -+ 0.01170 SKY = 62.91000 -+ 1.00956 How does this compare to what my current version of zpandsky.sh gives? Usage: zpandsky.sh 20191022T025524.2_acm_sci_ZP N arg1 - baseame of FITS image measured arg2 - run in verbose/debug mode (Y/N) % zpandsky.sh 20191022T025524.2_acm_sci_ZP N -2.7669 0.0648 32 63.6460 2.2699 32 (zp,zperr,nz,sky,skyerr,ns) Here we would get: ZPSEC = -2.7669 -+ 0.0648 SKY = 63.6460 -+ 2.2699