Category B

Version 3.0


This program generates BLEMISH files which mask bad pixels in individual or multiple images.

This procedure creates a blemish (.BLM) file for an image that lives in the BLEMISHES subdirectory.

Required Files

Optional Files

Output Files

User Warnings

Using blemishes

Initial Inputs

 Input 12-character picture name
 gc TEMPFILE.pgm

 b. Block
 s. Spot
 q. Quit

Choose the option for the type of blemish you want to work with:

The b. Block option masks a square block of the image specified by a minimum and maximum pixel and line. This type of blemish is typically used for missing or hashy lines due to downlink errors.

The s. Spot option masks a small region around a pixel/line center (p,l) from p-k to p+k and l-k to l+k. An additional input is a brightness threshold. If you enter this as zero, everything in the spot will be masked. However, if there is a bright blemish such as a cosmic ray hit in the spot, you can set the threshold to remove only the affected pixels. In this case, you can specify a large region (large k) and all the bright blemishes in that region will be masked without affecting the rest of the data.

Here is a sample TEMPFILE.pgm image before masking is applied:


Figure 00: Image Prior to Applying Mask

Block Blemish Options

 Input pxmn, pxmx, lnmn, lnmx
512 612 250 350
 gc TEMPFILE.pgm

 b. Block
 s. Spot
 q. Quit

After you choose b. Block you must specify:

This sample shows the image after block masking was applied:


Figure 00: Image after Applying Blemish Mask

Spot Blemish Options

 Input bad px/ln center, half-size. threshold.
512 250 25 100
 gc TEMPFILE.pgm

 b. Block
 s. Spot
 q. Quit

After you choose s. Spot you must specify:

This sample shows the image with spot masking and DN threshold applied:


Figure 00: Image Displaying Blemish Mask Options

Quit Blemishes Option

 Save blemish file? (y/n)
 Create/change template file? (y/n)

After you choose q. Quit you must specify whether to save the blemish file and whether to create or change a template file.

BLEMISH Templates

In the event that a camera has bad pixels common to all images, you can create a template that masks these pixels in all that camera's images. The template is specified in the INIT_LITHOS.TXT file with the key word BLEMISH.

In order to create a TEMPLATE, you must create a blemish file for one of the affected images with only the common bad areas masked. The procedure will ask: 'Save blemish file? (y/n)' and then 'Create/change template file? (y/n)'. If you enter 'y' and 'y', you will be asked for a 12 character template name with the common characters of the image names in their proper positions and # everywhere else.

The following samples show this sequence of actions and the output file:

 Save blemish file? (y/n)
 Create/change template file? (y/n)
 Input 12 character template
 Add: BLEMISH='P00045######' to INIT_LITHOS.TXT

Example P00045######.BLM file:

   488   225
   489   225
   490   225
   534   275
   535   275
   536   275
   537   275

The BLEMISH file contains a list of pixel/line locations to be masked, appended with the end-of-file identifier, 'END'.

(Compiled by DL)

Based on SPOC v3.02A PDF/LITHOSPHERE/blemishes.f File Reference.


blemishes (last edited 2016-07-26 09:23:02 by BMittan)