Compute the maginal distribution in an image. That is, compute the column- or row-averaged values in an image. A table file and some helpful FITS images (see below) are created. A modified version of this code that operates on image sub-regions (with no output FITS images) is avaliable as clip_margdist_sub.sh.
clip_margdist.sh --help Usage: clip_margdist.sh a.fits col arg1 - input FITS image arg2 - column or row averaging (col,row)The output results come in the form of 4 files: two fits images and a pair of ASCII files written in my "table-style" format. Here is an actual example that explains these file:
% ls # the directory can be empty % clip_margdist.sh /home/sco/HET_work/acm_nights/20180114/acm/20180114T064716.8_acm_sci.fits col % ls Amd.fits Bdiff.fits margdist_col.parlab margdist_col.table Amd.fits = a FITS image showing the 2-d image constructed on the basis of the row- or col-averaged distribution Bdiff.fits = a FITS image showing the difference between the input image and Amd.fits margdist_col = table file(s) showing the marginal distribution stats % cat margdist_col.parlab col Column Number mean Mean signal value (adu) sig Standard devistion (adu) me Mean error about mean (adu) Npix Number of pixels % head -5 margdist_col.table # col averaged marginal distribution # data 1.0 1789.5045 25.4064 0.9150 771.0 2.0 1136.9001 12.1825 0.4387 771.0 3.0 1205.6343 26.3786 0.9500 771.0