USGS

Isis 3.0 Application Source Code Reference

Home

vimscal.cpp File Reference

Go to the source code of this file.

Functions

void calculateDarkCurrent (Cube *icube)
 This decides if we have a VIS or IR dark current correction and calls the appropriate method.
void calculateVisDarkCurrent (Cube *icube)
 This populates darkCorrections with the result of the equation: dark = a + x * b for each line,band.
void calculateIrDarkCurrent (Cube *icube)
 This calculates the dark current corrections for IR.
void chooseFlatFile (Cube *icube, ProcessByLine *p)
 This calls p->SetInputCube with the appropriate flat file needed for icube.
void calculateSpecificEnergy (Cube *icube)
 This calculates the coefficients for specific energy corrections.
void calculateSolarRemove (Cube *icube, ProcessByLine *p)
 This calculates the values necessary to convert from specific energy to I/F.
void calibrate (vector< Buffer * > &inBuffers, vector< Buffer * > &outBuffers)
 This applies the calculated calibration coefficients to the file.
QString createCroppedFile (Cube *icube, QString cubeFileName, bool flatFile)
 This makes our calibration files match the input cube described by the swath keywords.
void GetOffsets (const Pvl &lab, int &finalSampOffset, int &finalLineOffset)
void IsisMain ()

Variables

map< pair< int, int >, double > sampleBasedDarkCorrections
 map from <sample, band> to dark correction value
map< pair< int, int >, double > lineBasedDarkCorrections
 map from <line, band> to dark correction value
vector< double > specificEnergyCorrections
 specific energy corrections for each band of the cube
vector< QString > tempFiles
 list of temp files that need deleted
double solarRemoveCoefficient
 solar remove coefficient
bool iof
 Output in I/F units.
PvlGroup calibInfo

Function Documentation

void calculateDarkCurrent ( Cube icube  ) 

This decides if we have a VIS or IR dark current correction and calls the appropriate method.

Parameters:
currCube 

Definition at line 359 of file vimscal.cpp.

void calculateVisDarkCurrent ( Cube icube  ) 

This populates darkCorrections with the result of the equation: dark = a + x * b for each line,band.

a, b are from the "vis_*_dark_model.tab" files and x is the ExposureDuration.

Parameters:
icube 

Reading in one parameter at a time: parameter 1 = constant coefficient parameter 2 = exposure coefficient param1 + param2*exposure = dark correction

Do byte swapping where necessary.

Definition at line 381 of file vimscal.cpp.

void calculateIrDarkCurrent ( Cube icube  ) 

This calculates the dark current corrections for IR.

If IRDARKAVG is false, then it translates the sideplane data into the lineBasedDarkCorrections map directly and does nothing further with the data. Otherwise, this will apply a least squares linear fit (the original script did chi-squared, but this is okay) for each band and uses the points on the line instead of the sideplane data directly.

Parameters:
icube 

Definition at line 487 of file vimscal.cpp.

void chooseFlatFile ( Cube icube,
ProcessByLine *  p 
)

This calls p->SetInputCube with the appropriate flat file needed for icube.

Parameters:
icube 
p 

Definition at line 611 of file vimscal.cpp.

void calculateSpecificEnergy ( Cube icube  ) 

This calculates the coefficients for specific energy corrections.

Definition at line 280 of file vimscal.cpp.

void calculateSolarRemove ( Cube icube,
ProcessByLine *  p 
)

This calculates the values necessary to convert from specific energy to I/F.

A cube is used as part of the equation (which probably* just contains a vector of values) so p->SetInputCube(...) will be called with the appropriate filename.

Parameters:
icube 
p 

Definition at line 182 of file vimscal.cpp.

void calibrate ( vector< Buffer * > &  inBuffers,
vector< Buffer * > &  outBuffers 
)

This applies the calculated calibration coefficients to the file.

Parameters:
inBuffers 
outBuffers 

Definition at line 124 of file vimscal.cpp.

QString createCroppedFile ( Cube icube,
QString  cubeFileName,
bool  flatFile 
)

This makes our calibration files match the input cube described by the swath keywords.

Parameters:
icube 
cubeFileName 
Returns:
QString

Definition at line 650 of file vimscal.cpp.

void GetOffsets ( const Pvl &  lab,
int &  finalSampOffset,
int &  finalLineOffset 
)

Definition at line 675 of file vimscal.cpp.

void IsisMain (  ) 

Definition at line 59 of file vimscal.cpp.


Variable Documentation

map< pair<int, int>, double > sampleBasedDarkCorrections

map from <sample, band> to dark correction value

Definition at line 25 of file vimscal.cpp.

map< pair<int, int>, double > lineBasedDarkCorrections

map from <line, band> to dark correction value

Definition at line 28 of file vimscal.cpp.

vector<double> specificEnergyCorrections

specific energy corrections for each band of the cube

Definition at line 31 of file vimscal.cpp.

vector<QString> tempFiles

list of temp files that need deleted

Definition at line 34 of file vimscal.cpp.

solar remove coefficient

Definition at line 37 of file vimscal.cpp.

bool iof

Output in I/F units.

Definition at line 40 of file vimscal.cpp.

PvlGroup calibInfo

Definition at line 57 of file vimscal.cpp.