Home
About ISIS
Support
Download

ISIS 3

Documentation
Tutorials
Technical Documents

ISIS 2

Documentation
Tutorials
Technical Documents

Search

USGS

ISIS 3 Application Documentation


makeflat

Printer Friendly View | TOC | Home

Create a flat-field image for line-scan instruments

Overview Parameters Example 1

Description

This program creates flat-field images for line scan, push frame, and framing instruments. All input cubes should have the same number of samples; any images in the list that do not have the same number of samples as the first image will not be used. The names of the cube files used to create the flat-field image must be entered using an ASCII file (FROMLIST) with one filename per line (any line beginning with a '#' or '//' is treated as a comment). The specific equation for each camera type is below.

  • Line Scan
  • A frame is a NUMLINES line section of data. The equation for the final single line, single band, flat field file is:
    Sum( Sum(FrameColumn) / Average(Frame) * ValidPixels(FrameColumn) ) / TotalColumnValidPixels

  • Push Frame
  • The equation for the final single framelet, single band flat field file is:
    Average( PixelInFramelet1, PixelInFramelet2, PixelInFramelet3, ... )

  • Framing
  • The equation for the final single framelet, single band flat field file is:
    Average( PixelInCube1, PixelInCube2, PixelInCube3, ... )

Warning: This program creates potentially large temporary files


Categories


History

Tracie Sucharski2007-06-20 Original version, Adapted from Isis2 version of makeflat.
Steven Lambright2008-05-13 Removed references to CubeInfo .
Steven Lambright2008-06-11 Changed algorithm and added support for framing and push frame cameras.
Ian Humphrey2014-06-23 Cleaned up spacing in pushframe test Makefile

Parameter Groups

Files

Name Description
FROMLIST List of input cubes
TO Output flat field cube
EXCLUDE Output PVL-formatted file of all excluded files and sections of data

Statistical Options

Name Description
STDEVTOL This is the maximum standard deviation

Image Options

Name Description
IMAGETYPE This is the type of camera which took the image.

LINESCAN

Name Description
NUMLINES This is the the number of lines to consider when doing statistics

PUSHFRAME

Name Description
FRAMELETHEIGHT This is the height of each framelet in the image.
X

Files: FROMLIST


Description

Use this parameter to select the file which contains a list of cube filenames to be used to create the flat file.

Type filename
File Mode input
Filter *.lis
Close Window
X

Files: TO


Description

Output flat field cube

Type cube
File Mode output
Pixel Type real
Close Window
X

Files: EXCLUDE


Description

Output PVL-formatted file of all excluded files and sections of data.

Type filename
File Mode output
Internal Default None
Close Window
X

Statistical Options: STDEVTOL


Description

For a framing camera, this is the maximum standard deviation of each image. For a push frame camera, this is the maximum standard deviation of each framelet. For a line scan camera, this is the maximum standard deviation of NUMLINES lines. Data that exceeds this standard deviation will be ignored.

Type double
Close Window
X

Image Options: IMAGETYPE


Description

Line scan cameras collect a cube a single line of data at a time. Push frame cameras collect multiple lines of cube data at once. Framing cameras collect an entire cube of data at once.

Type string
Default LINESCAN
Option List:
Option Brief Description
LINESCANLine scan camera Line scan cameras collect a cube a single line of data at a time. This option makes the flat field a single line of data.

Exclusions

  • FRAMELETHEIGHT

Inclusions

  • NUMLINES
PUSHFRAMEPush frame camera Push frame cameras take multiple lines of cube data at once. This option makes the flat field a single framelet of data.

Exclusions

  • NUMLINES

Inclusions

  • FRAMELETHEIGHT
FRAMINGFraming camera Framing cameras collect an entire cube of data at once. This option makes the flat field the size of one of the input images.

Exclusions

  • NUMLINES
  • FRAMELETHEIGHT
Close Window
X

LINESCAN: NUMLINES


Description

A single line often does not have enough data in it to perform good tolerance calculations. The tolerance calculations will be performed on this many lines as a time, and if found to be invalid, this many lines will be excluded from the output flat file calculations at a time.

Type integer
Close Window
X

PUSHFRAME: FRAMELETHEIGHT


Description

Push frame images consist of framelets. The framelet size needs to be known in order to make a flat field file for a push frame camera.

Type integer
Close Window

Example 1

Line Scan Cubes

Description

This program was run on 65 hirise images to produce a flat file, and one of the images was calibrated with the flat file.

Command Line

makeflat fromlist=files.lis to=flat.linescan.cub exclude=exclude.txt stdevtol=30 numlines=100
This is a typical run for makeflat. files.lis is a list file generated by a "ls *.cub > files.lis" command. The files inside of files.lis are between 20,000 lines and 200,000 lines of data (variable length). The file flat.linescan.cub is the flat-field output given these cubes and the file exclude.txt is a detailed output of what was excluded.

GUI Screenshot

Line-Scan Run

This is a typical run for the linescan mode

Parameter Name: IMAGETYPE

This is a typical run for makeflat. files.lis is a list file generated by a "ls *.cub > files.lis" command. The files inside of files.lis are between 20,000 lines and 200,000 lines of data (variable length). The file flat.linescan.cub is the flat-field output given these cubes and the file exclude.txt is a detailed output of what was excluded.

Line-Scan Input Image

This is a section of one of the inputs listed in files.lis

Parameter Name: FROMLIST

This is the input to makeflat. Notice the vertical lines persistent throughout the image and the dark area on the right-hand side.

Line-Scan Calibrated Image

This is input that has been calibrated

This is the same section of image data as before, except calibrated with the flat-field file that was generated by dividing by the flat field file. The vertical lines and darkness have completely gone away.