Example: Mosaic of Thumbnails

Note

Test data are stored in /internal/data2/quip_data directory on wsslinux2. QUIP does not overwrite existing output files, so it is best if you copy the test data files to your own directory for testing. Otherwise, other people might run into permission issues or QUIP errors when they attempt to overwrite your output files from previous test runs.

This example demonstrates a QUIP operation mode, THUMBNAIL, that specializes in displaying a mosaic of thumbnails based on their WCS values. The mosaic does not account for detector distortions. If images overlap, the newer image will cover the older one. The sole purpose of this mode is for user to quickly look at which images to keep for the next processing step in WEx. Like Segment ID, auto-levels behavior is turned off but it is irrelevant here.

Copy test data to your own directory:

$ cp -R /internal/data2/quip_data/nircam_test /my/local/dir

Change directory to where your own test data are:

$ cd /my/local/dir/nircam_test/inputs

Fix the paths in XML file:

$ sed 's/\/internal\/data2\/quip_data/\/my\/local\/dir/g' /internal/data2/quip_data/nircam_test/inputs/operation_file_001.xml > operation_file_001.xml

Start QUIP (select optional arguments given in square brackets):

$ quip operation_file_001.xml [--mosaic-thumb-size=100] [-g +300+150] [--nocopy] [--loglevel=10]

Behind the scenes, QUIP resizes the images to smaller thumbnails using shrink_input_images() and save them under a sub-directory named quipcache within the same directory as the “QUIP Operation File”. The scaling is set to shrink to a width of 100 pixels, more or less. If an image is already small enough, its thumbnail is not generated, but rather QUIP would just use the original input image. If thumbnails already exist from a previous run, they are not regenerated.

Due to all the pre-processing above, Ginga might take a few seconds to start up. To create the mosaic and produce output file for WEx:

  1. MosaicAuto local plugin should already be loaded for you. If you don’t see it, click on the “Dialogs” tab. If it is not there, you will have to start it manually by looking for it under “Operation” menu, where all the loaded Ginga local plugins reside.

  2. Make sure all the images are loaded in Contents. Click on “Create Mosaic” to create a mosaic from the thumbnail images based on their WCS values. When it is done, you will see the mosaic displayed.

  3. Click on magnifying glass icon with [:] (bottom center) to rescale the mosaic such that the entire image is fitted on display. Then you can zoom in or out as desired by clicking on magnifying glass icons with + or -, respectively.

  4. If you need to rescale the display, click on Info tab on the left, enter “Cut Low/High” values, and press “Cut Levels”.

  5. Select one or more images from the list to highlight their footprints on the mosaic. Shift- and control-clicks are also supported. Alternately, you may also select and de-select images by click on them directly on the main display. There are also “Select All” and “Deselect All” buttons for your convenience.

  6. Shortlist of selected images is available under the “Selected” tab. This is basically the image list to be saved.

  7. Once you have selected the images to keep, click “Save Selection” under the MosaicAuto plugin.

  8. Exit QUIP by selecting “File” (top left) and then “Quit”.

To see all available output files listing:

$ ls /my/local/dir/nircam_test/outputs

Note that “QUIP Out” XML file (i.e., the image list) will be generated. There are no “QUIP Activity Log” XML file nor output FITS images because modification of images are not allowed in this mode.

A log file from Ginga (“ginga.log”) is written out to output directory given by the XML. It is overwritten if already exists because it is only useful for debugging Ginga. To see Ginga log file:

$ emacs /my/local/dir/nircam_test/outputs/ginga.log