The tool zpmido is used to cross-match mido photometry with online PS1 (gri) photometry and compute photometric zeropint values. The code zpmido_table is used to create a table file that contains these ZP values, but also a few other useful values for each cross-matched target (or sources). Below I show the zpmido call and the internal zpmido_table call that creates the table file we'll use here.
% ls % zpmido /home/sco/tmp/local_red/WCS/20190217T122456.6_acm_sci.fits N % zpmido_table ../20190217T122456.6_acm_sci.fits ../cdfpmatI N The important files for use here: 20190217T122456.6_acm_sci_ZP.parlab 20190217T122456.6_acm_sci_ZP.table % cat 20190217T122456.6_acm_sci_ZP.parlab ZPSEC ZP for 1-sec [= mstan-{m30+2.5log(Texp)} ] magI instrumental magnitude [= m30+2.5log(Texp) ] r-i Standard Color = r-i Mag30 magnitude from mido i Standard magnitude = i Mtype Aperture type (1=circle,2=box,3=ellipse) Fpeak Peak Flux (adu) including BKG % cat 20190217T122456.6_acm_sci_ZP.table # data -3.1104 17.3614 0.1640 15.416 14.251 1.000 6912.630 -3.1884 18.4434 0.3260 16.498 15.255 1.000 2830.260 -3.0874 16.5224 0.1590 14.577 13.435 1.000 14684.530 -3.1334 17.0804 0.1710 15.135 13.947 1.000 9075.170 -3.0684 19.9984 0.2030 18.053 16.930 1.000 2196.770 -3.1444 17.7044 0.2940 15.759 14.560 1.000 5092.560 -3.8444 17.7044 0.2940 15.759 14.560 1.000 3092.560For purposes of demonstaration I have added a hightly discrepant point to the table file above (it is the last line).
% point_selector 20190217T122456.6_acm_sci_ZP ZPSEC Fpeak N After we run this, ther are two new files: xyf.in xyf.old In this example, xyf.in shows us the plotted data with the "picked" data point flagged: % cat xyf.in Keys for icurs4.py Peak Flux (adu) including BKG ZP for 1-sec [= mstan-{m30+2.5log(Texp)} ] 6912.6299 -3.1104 0 1 2830.2600 -3.1884 0 2 14684.5303 -3.0874 0 3 9075.1699 -3.1334 0 4 2196.7700 -3.0684 0 5 5092.5601 -3.1444 0 6 3092.5601 -3.8444 1 7Hence, the final tool we need is something that reads the xyf.in file, eliminates the the flagged point, and computes the mean values of the remaining ZPSEC values. Actually, we want this tool to be very general: we may want to compute statistics for the marked or unmarked points, we may want stats for the X or the Y axis values. The tool for this is point_selector_stats. In the case above we'd like to know the stats for the ZPSEC (Y axis) values that have flag=0 (not marked). We would do this with:
% point_selector_stats.sh xyf.in Y 0 N -3.12207 -3.12190 0.04300 0.01756 6 (mean,mediam,sig,me,n) % cat point_selector_stats.out -3.12207 -3.12190 0.04300 0.01756 6 (mean,mediam,sig,me,n)Note that the stats are also written to a local file named "point_selector_stats.out"