This script uses a variety of codes to derive a catalog of sources for an input fits image. Sources are identified using a threshold relative to the mapped background. The detials are discussed in my notes on image segmentation and contouring.
% imgcat0 --help Usage: imgcat0 ../S/20170420T101656.1_acm_sci.fits acm 5.0 arg1 = image to be mapped arg2 = reduction type: int (interactive), acm, pfc arg3 = significance threshold (in units of sigma) A local Debug.Flag file will turn debug mode on. % imgcat0 ./S/20180206T083937.3_acm_sci_proc.fits acm 5.0I give a description velow of the files made by this script in a discussion of the complementary code imagcat1. A very easy way to visiualize the diagnostic images made in a run of imgcat0 is to use ds9_imgcat0:
% ds9_imgcat0 Rsco2039.fits N JUST FOR YUKS: Machine Time to process (sec) Number of Objects scohome 23 935 banzai 23 935 mcs (sco) 79 935 buckaroo 58 935
A few practical points are useful here. At the end of the imgcat0 run the procssing time in seconds is reported. Another useful thing to know at that point would be how many source were detected. For that I use the table_checker routine:
21.000000 (Time in seconds to process) % table_checker Rsco2039 N 935 14The table_checker code reports the number of data lines in the table file, and the number of image parameters for each detected object.
To give an idea of some of the scripts that are called in this routine I give the following outline:
debug imgcat0 (N) make_detsig1 (N) bgmapper (N) make_skyboxes (N) ds9_boxes.sh (N) run_skyboxes (N) clip_imhist.sh (N) run_skyhistfit (N) pixcon1 (N)Basically, the make_detsig1 routine handles the background mapping and threshold map production. The pixcon1 routine locates 4-connected pixel sets and identifies and catalogs the sources.
It is sometimes useful to overplot the sources detected by imgcat0 with ds9 region markers. As long as your detected table file has the quantities named Xcent, Ycent, asemi, and NumPix (which imgcat0 does create!) then you can use the routine paint_table_sources to overplot the detected source using a fixed-siz (user-specified) circle.
In Dec2018 I found that I had altered a small part of the polynomial fitting procedure in skyhistfit.sh, and this hosed up imgcat0. So, I made a simple new version (imgcat1) that lets me easily turn on the debug flag and experiment with other things.
% imgcat1 ../images/Rsco2039.fits pfc 10.0 Y The products of such a run are numerous. Here is a brief table that summarizes the files involved: Rsco2039.fits - the images analyzed (just a copy) Rsco2039_bkg1.fits - background map Rsco2039_sigma.fits - image of the noise distribution (commonly a constant) Rsco2039_detsig.fits - detection significance map (i.e. all pixels 10-sigma above sky in this example) Rsco2039_label0.fits - connected (and labeled) pixel map Rsco2039.cat0 - ascii catalog file Rsco2039.table,params,parlab- The table file of simple image parameters, basically a table file version of Rsco2039.cat0 Other less important files: Active.Images - list of images (used mostly by other scripts) BGboxes.reg - ds9 regions file show the background boxes used
I will periodically add sample exercises to the list below.