Isis 3 Programmer Reference

Read values from MOC labels. More...

#include <MocLabels.h>

Collaboration diagram for Isis::MocLabels:
Collaboration graph

Classes

struct  WAGO
 

Public Member Functions

 MocLabels (Cube &cube)
 Construct MocLabels object using a Pvl object.
 
 MocLabels (const QString &file)
 Construct MocLabels object using the file name.
 
 ~MocLabels ()
 Empty destructor.
 
bool NarrowAngle () const
 Indicates whether the camera was narrow angle.
 
bool WideAngle () const
 Indicates whether the camera was wide angle.
 
bool WideAngleRed () const
 Indicates whether the camera was red wide angle.
 
bool WideAngleBlue () const
 Indicates whether the camera was blue wide angle.
 
int CrosstrackSumming () const
 Returns value for CrosstrackSumming from the instrument group.
 
int DowntrackSumming () const
 Returns value for DowntrackSumming from the instrument group.
 
int FirstLineSample () const
 Returns value for FirstLineSample from the instrument group.
 
double FocalPlaneTemperature () const
 Returns value for FocalPlaneTemperature from the instrument group.
 
double LineRate () const
 Returns the value for the true line rate.
 
double ExposureDuration () const
 Returns the value for LineExposureDuration from the instrument group.
 
QString StartTime () const
 Returns the value for StartTime from the instrument group.
 
int Detectors () const
 Returns 2048 if narrow angle and 3456 if wide angle.
 
int StartDetector (int sample) const
 Converts from sample to starting detector.
 
int EndDetector (int sample) const
 Converts from sample to ending detector.
 
double Sample (int detector) const
 Converts from detector to sample.
 
double EphemerisTime (double line) const
 Returns the ephemeris time at the given line.
 
double Gain (int line=1)
 Returns the true gain at a given line.
 
double Offset (int line=1)
 Returns the offset at the given line.
 

Private Member Functions

void Init (Cube &cube)
 General initializer.
 
void ReadLabels (Cube &cube)
 Reads required keywords from the labels.
 
void ValidateLabels ()
 Verifies that the labels are valid.
 
void Compute ()
 Computes some constants.
 
void InitGainMaps ()
 Creates a lookup of gain modes to gain values.
 
void InitDetectorMaps ()
 Creates lookup table from sample to detectors and vice versa.
 
void InitWago ()
 Reads the wide-angle gain/offset table and internalizes.
 

Private Attributes

int p_crosstrackSumming
 
int p_downtrackSumming
 
int p_startingSample
 
int p_orbitNumber
 
double p_exposureDuration
 
double p_trueLineRate
 
double p_focalPlaneTemp
 
bool p_mocNA
 
bool p_mocRedWA
 
bool p_mocBlueWA
 
QString p_instrumentId
 
QString p_filter
 
QString p_clockCount
 
QString p_gainModeId
 
int p_offsetModeId
 
QString p_startTime
 
QString p_dataQuality
 
double p_etStart
 
double p_etEnd
 
std::map< QString, double > p_gainMapNA
 
std::map< QString, double > p_gainMapWA
 
double p_gain
 
double p_offset
 
int p_nl
 
int p_ns
 
int p_startDetector [3456]
 
int p_endDetector [3456]
 
double p_sample [3456]
 
std::vector< WAGOp_wagos
 
FileName p_lsk
 
FileName p_sclk
 

Detailed Description

Read values from MOC labels.

Author
2007-01-30 Author Unknown
History

2008-04-30 Steven Lambright corrected infinite loop

2008-05-29 Steven Lambright Fixed binary search indexing, bad calls to QString::_cstr() references

2008-06-18 Steven Koechle - Fixed Documentation Errors

2008-08-11 Steven Lambright - Fixed definition of WAGO, problem pointed out by "novas0x2a" (Support Board Member)

2008-11-05 Jeannie Walldren - Changed IsNarrowAngle(), IsWideAngle(), IsWideAngleBlue(), and IsWideAngleRed() to NarrowAngle(), WideAngle(), WideAngleBlue(), and WideAngleRed(), respectively. Added documentation.

2008-11-07 Jeannie Walldren - Fixed documentation

2010-01-05 Jeannie Walldren - Fixed bug in InitWago() method.

2011-05-03 Jeannie Walldren - Removed Mgs namespace wrap.

Definition at line 50 of file MocLabels.h.

Constructor & Destructor Documentation

◆ MocLabels() [1/2]

Isis::MocLabels::MocLabels ( Cube & cube)

Construct MocLabels object using a Pvl object.

Definition at line 39 of file MocLabels.cpp.

References Init().

◆ MocLabels() [2/2]

Isis::MocLabels::MocLabels ( const QString & file)

Construct MocLabels object using the file name.

Definition at line 31 of file MocLabels.cpp.

References Init().

◆ ~MocLabels()

Isis::MocLabels::~MocLabels ( )
inline

Empty destructor.

Definition at line 55 of file MocLabels.h.

Member Function Documentation

◆ Compute()

void Isis::MocLabels::Compute ( )
private

Computes some constants.

Definition at line 161 of file MocLabels.cpp.

References EphemerisTime(), Isis::FileName::expanded(), InitDetectorMaps(), NarrowAngle(), and Isis::IException::Unknown.

Referenced by Init().

◆ CrosstrackSumming()

int Isis::MocLabels::CrosstrackSumming ( ) const
inline

Returns value for CrosstrackSumming from the instrument group.

Returns
int Crosstrack summing

Definition at line 92 of file MocLabels.h.

Referenced by Isis::MocWideAngleDetectorMap::SetDetector(), and Isis::MocWideAngleDetectorMap::SetParent().

◆ Detectors()

int Isis::MocLabels::Detectors ( ) const
inline

Returns 2048 if narrow angle and 3456 if wide angle.

Returns
int Value of detectors.

Definition at line 145 of file MocLabels.h.

Referenced by InitDetectorMaps(), Sample(), and Isis::MocWideAngleDetectorMap::SetDetector().

◆ DowntrackSumming()

int Isis::MocLabels::DowntrackSumming ( ) const
inline

Returns value for DowntrackSumming from the instrument group.

Returns
int Downtrack summing

Definition at line 99 of file MocLabels.h.

◆ EndDetector()

int Isis::MocLabels::EndDetector ( int sample) const

Converts from sample to ending detector.

Parameters
sampleSample to be converted
Returns
int Converted ending detector

Definition at line 304 of file MocLabels.cpp.

References Isis::IException::Unknown.

Referenced by Isis::MocWideAngleDetectorMap::SetParent().

◆ EphemerisTime()

double Isis::MocLabels::EphemerisTime ( double line) const

Returns the ephemeris time at the given line.

Parameters
lineLine to evaluate
Returns
double Ephemeris time

Definition at line 375 of file MocLabels.cpp.

Referenced by Compute(), Gain(), and Offset().

◆ ExposureDuration()

double Isis::MocLabels::ExposureDuration ( ) const
inline

Returns the value for LineExposureDuration from the instrument group.

Returns
double Line exposure duration

Definition at line 131 of file MocLabels.h.

◆ FirstLineSample()

int Isis::MocLabels::FirstLineSample ( ) const
inline

Returns value for FirstLineSample from the instrument group.

Returns
int First line sample

Definition at line 106 of file MocLabels.h.

◆ FocalPlaneTemperature()

double Isis::MocLabels::FocalPlaneTemperature ( ) const
inline

Returns value for FocalPlaneTemperature from the instrument group.

Returns
double Focal plane temperature

Definition at line 114 of file MocLabels.h.

◆ Gain()

double Isis::MocLabels::Gain ( int line = 1)

Returns the true gain at a given line.

Parameters
lineLine to evaluate
Returns
double True gain

Definition at line 384 of file MocLabels.cpp.

References EphemerisTime(), InitWago(), and NarrowAngle().

◆ Init()

void Isis::MocLabels::Init ( Cube & cube)
private

General initializer.

Parameters
labMOC label for the image

Definition at line 47 of file MocLabels.cpp.

References Compute(), InitGainMaps(), ReadLabels(), Isis::IException::Unknown, and ValidateLabels().

Referenced by MocLabels(), and MocLabels().

◆ InitDetectorMaps()

void Isis::MocLabels::InitDetectorMaps ( )
private

Creates lookup table from sample to detectors and vice versa.

Definition at line 326 of file MocLabels.cpp.

References Detectors().

Referenced by Compute().

◆ InitGainMaps()

void Isis::MocLabels::InitGainMaps ( )
private

Creates a lookup of gain modes to gain values.

These come from the MSSS calibration report.

Definition at line 247 of file MocLabels.cpp.

Referenced by Init().

◆ InitWago()

void Isis::MocLabels::InitWago ( )
private

Reads the wide-angle gain/offset table and internalizes.

History
2010-01-05 Jeannie Walldren - Fixed bug that passed sclkKern filename into scs2e_c instead of the sclk string.

Definition at line 424 of file MocLabels.cpp.

References Isis::IString::ConvertWhiteSpace(), Isis::FileName::expanded(), Isis::IString::Remove(), Isis::IString::Token(), Isis::IString::ToQt(), Isis::IString::Trim(), Isis::IException::Unknown, WideAngleBlue(), and WideAngleRed().

Referenced by Gain(), and Offset().

◆ LineRate()

double Isis::MocLabels::LineRate ( ) const
inline

Returns the value for the true line rate.

This is calculated by dividing the product of LineExposureDuration and the DowntrackSumming by 1000.

Returns
double Value for the true line rate

Definition at line 123 of file MocLabels.h.

◆ NarrowAngle()

bool Isis::MocLabels::NarrowAngle ( ) const
inline

Indicates whether the camera was narrow angle.

Returns
bool True if the instrument ID is MOC-NA.

Definition at line 61 of file MocLabels.h.

Referenced by Compute(), Gain(), and Offset().

◆ Offset()

double Isis::MocLabels::Offset ( int line = 1)

Returns the offset at the given line.

Parameters
lineLine to evaluate
Returns
double Offset

Definition at line 403 of file MocLabels.cpp.

References EphemerisTime(), InitWago(), and NarrowAngle().

◆ ReadLabels()

void Isis::MocLabels::ReadLabels ( Cube & cube)
private

Reads required keywords from the labels.

Parameters
MOClabel for the image

Definition at line 65 of file MocLabels.cpp.

References Isis::AlphaCube::AlphaLines(), Isis::AlphaCube::AlphaSamples(), Isis::Cube::label(), and Isis::PvlObject::Traverse.

Referenced by Init().

◆ Sample()

double Isis::MocLabels::Sample ( int detector) const

Converts from detector to sample.

Parameters
detectorDetector to be converted
Returns
double Converted sample

Definition at line 316 of file MocLabels.cpp.

References Detectors(), and Isis::IException::Unknown.

Referenced by Isis::MocWideAngleDetectorMap::SetDetector().

◆ StartDetector()

int Isis::MocLabels::StartDetector ( int sample) const

Converts from sample to starting detector.

Parameters
sampleSample to be converted
Returns
int Converted start detector

Definition at line 292 of file MocLabels.cpp.

References Isis::IException::Unknown.

Referenced by Isis::MocWideAngleDetectorMap::SetParent().

◆ StartTime()

QString Isis::MocLabels::StartTime ( ) const
inline

Returns the value for StartTime from the instrument group.

Returns
QString Start time

Definition at line 138 of file MocLabels.h.

◆ ValidateLabels()

void Isis::MocLabels::ValidateLabels ( )
private

Verifies that the labels are valid.

Definition at line 110 of file MocLabels.cpp.

References Isis::IException::Unknown.

Referenced by Init().

◆ WideAngle()

bool Isis::MocLabels::WideAngle ( ) const
inline

Indicates whether the camera was wide angle.

Returns
bool True if the instrument ID is MOC-WA.

Definition at line 68 of file MocLabels.h.

◆ WideAngleBlue()

bool Isis::MocLabels::WideAngleBlue ( ) const
inline

Indicates whether the camera was blue wide angle.

Returns
bool True if the instrument ID is MOC-WA and filter name is BLUE.

Definition at line 84 of file MocLabels.h.

Referenced by InitWago().

◆ WideAngleRed()

bool Isis::MocLabels::WideAngleRed ( ) const
inline

Indicates whether the camera was red wide angle.

Returns
bool True if the instrument ID is MOC-WA and filter name is RED.

Definition at line 76 of file MocLabels.h.

Referenced by InitWago().

Member Data Documentation

◆ p_clockCount

QString Isis::MocLabels::p_clockCount
private

Definition at line 173 of file MocLabels.h.

◆ p_crosstrackSumming

int Isis::MocLabels::p_crosstrackSumming
private

Definition at line 161 of file MocLabels.h.

◆ p_dataQuality

QString Isis::MocLabels::p_dataQuality
private

Definition at line 177 of file MocLabels.h.

◆ p_downtrackSumming

int Isis::MocLabels::p_downtrackSumming
private

Definition at line 162 of file MocLabels.h.

◆ p_endDetector

int Isis::MocLabels::p_endDetector[3456]
private

Definition at line 190 of file MocLabels.h.

◆ p_etEnd

double Isis::MocLabels::p_etEnd
private

Definition at line 179 of file MocLabels.h.

◆ p_etStart

double Isis::MocLabels::p_etStart
private

Definition at line 178 of file MocLabels.h.

◆ p_exposureDuration

double Isis::MocLabels::p_exposureDuration
private

Definition at line 165 of file MocLabels.h.

◆ p_filter

QString Isis::MocLabels::p_filter
private

Definition at line 172 of file MocLabels.h.

◆ p_focalPlaneTemp

double Isis::MocLabels::p_focalPlaneTemp
private

Definition at line 167 of file MocLabels.h.

◆ p_gain

double Isis::MocLabels::p_gain
private

Definition at line 184 of file MocLabels.h.

◆ p_gainMapNA

std::map<QString, double> Isis::MocLabels::p_gainMapNA
private

Definition at line 182 of file MocLabels.h.

◆ p_gainMapWA

std::map<QString, double> Isis::MocLabels::p_gainMapWA
private

Definition at line 183 of file MocLabels.h.

◆ p_gainModeId

QString Isis::MocLabels::p_gainModeId
private

Definition at line 174 of file MocLabels.h.

◆ p_instrumentId

QString Isis::MocLabels::p_instrumentId
private

Definition at line 171 of file MocLabels.h.

◆ p_lsk

FileName Isis::MocLabels::p_lsk
private

Definition at line 208 of file MocLabels.h.

◆ p_mocBlueWA

bool Isis::MocLabels::p_mocBlueWA
private

Definition at line 170 of file MocLabels.h.

◆ p_mocNA

bool Isis::MocLabels::p_mocNA
private

Definition at line 168 of file MocLabels.h.

◆ p_mocRedWA

bool Isis::MocLabels::p_mocRedWA
private

Definition at line 169 of file MocLabels.h.

◆ p_nl

int Isis::MocLabels::p_nl
private

Definition at line 187 of file MocLabels.h.

◆ p_ns

int Isis::MocLabels::p_ns
private

Definition at line 188 of file MocLabels.h.

◆ p_offset

double Isis::MocLabels::p_offset
private

Definition at line 185 of file MocLabels.h.

◆ p_offsetModeId

int Isis::MocLabels::p_offsetModeId
private

Definition at line 175 of file MocLabels.h.

◆ p_orbitNumber

int Isis::MocLabels::p_orbitNumber
private

Definition at line 164 of file MocLabels.h.

◆ p_sample

double Isis::MocLabels::p_sample[3456]
private

Definition at line 191 of file MocLabels.h.

◆ p_sclk

FileName Isis::MocLabels::p_sclk
private

Definition at line 209 of file MocLabels.h.

◆ p_startDetector

int Isis::MocLabels::p_startDetector[3456]
private

Definition at line 189 of file MocLabels.h.

◆ p_startingSample

int Isis::MocLabels::p_startingSample
private

Definition at line 163 of file MocLabels.h.

◆ p_startTime

QString Isis::MocLabels::p_startTime
private

Definition at line 176 of file MocLabels.h.

◆ p_trueLineRate

double Isis::MocLabels::p_trueLineRate
private

Definition at line 166 of file MocLabels.h.

◆ p_wagos

std::vector<WAGO> Isis::MocLabels::p_wagos
private

Definition at line 205 of file MocLabels.h.


The documentation for this class was generated from the following files: