HiRISE
 Observation

Classes | Typedefs | Enumerations | Functions
UA::HiRISE Namespace Reference

High Resolution Imaging Science Experiment. More...

Classes

class  CCD_ID
 
class  Channel_ID
 
struct  Error
 
class  Exception
 
class  Instrument
 
struct  Invalid_Argument
 
class  Observation_ID
 
struct  Out_of_Range
 
class  Data_Component
 A Data_Component provides a common, virtual interface for all HiRISE Observation data blocks. More...
 
class  Engineering_Header
 An Engineering_Header contains a minimal core set of observation control parameters. More...
 
class  FELICS_Line_Cache
 A FELICS_Line_Cache extends a Line_Cache by adding management of FELICS compressed line data. More...
 
class  Gap_Map
 A Gap_Map contains a map of data gap ranges for the file with which it is associated. More...
 
class  Image_Line
 An Image_Line contains a cache of observation channel image pixel data. More...
 
class  Line_Cache
 A Line_Cache manages the data contents for an Image_Line. More...
 
class  LUT
 A LUT contains the lookup table used to map 14-bit CCD sensor values to 8-bit image pixel values. More...
 
class  MROSP_Header
 An MROSP_Header contains information used by the HiRISE instrument to identify a stored data block to the MRO spacecraft for downlink to Earth. More...
 
class  Observation
 Observation manages the components of a MRO HiRISE instrument science observation data set. More...
 
class  Science_Channel_Header
 A Science_Channel_Header contains the science metadata describing the observation channel data. More...
 
class  Label_Patcher
 

Typedefs

typedef unsigned int u_int_32
 
typedef INT_8_TYPE int_8
 8-bit integer type. More...
 
typedef U_INT_8_TYPE u_int_8
 8-bit unsigned integer type. More...
 
typedef INT_16_TYPE int_16
 16-bit integer type. More...
 
typedef U_INT_16_TYPE u_int_16
 16-bit unsigned integer type. More...
 
typedef INT_32_TYPE int_32
 32-bit integer type. More...
 
typedef U_INT_32_TYPE u_int_32
 32-bit unsigned integer type. More...
 
typedef INT_64_TYPE int_64
 64-bit integer type. More...
 
typedef U_INT_64_TYPE u_int_64
 64-bit unsigned integer type. More...
 
typedef PIRL::Data_Block::Index Index
 Data_Block element index type. More...
 
typedef u_int_16 Pixel_type
 The type of a generic pixel value. More...
 

Enumerations

enum  Parameter_Class_Selection {
  AGGREGATE_PARAMETER = -1 ,
  ANY_PARAMETER = 0 ,
  ASSIGNMENT_PARAMETER = 1
}
 Selects the class of parameter for PVL_parameter to find. More...
 
enum  Clock_Selector {
  HiRISE_Clock ,
  MRO_Clock
}
 Used to select a clock. More...
 

Functions

std::ostream & operator<< (std::ostream &stream, const CCD_ID &ccd_id)
 
std::ostream & operator<< (std::ostream &stream, const Channel_ID &channel_id)
 
void sync_to_day_of_year (struct tm *time_struct)
 
std::string time_text (const int time=0, const std::string &format=Observation_ID::STANDARD_TIME_TEXT_FORMAT, const int epoch=Observation_ID::EPOCH)
 
std::ostream & operator<< (std::ostream &stream, const Observation_ID &obs_id)
 
std::ostream & operator<< (std::ostream &stream, const Data_Component &component)
 Prints a Data_Component to a stream. More...
 
std::ostream & print_value (u_int_32 value, int format=Data_Component::DECIMAL, std::ostream &stream=std::cout, int width=0)
 Prints a value in a consistent Data_Component format. More...
 
string bits (const unsigned int value, unsigned int count=0)
 Gets the string representation of a value in binary. More...
 
unsigned int max_strlen (const char **strings)
 Finds the length of the longest string in the list. More...
 
std::string to_upper (const std::string &characters)
 Converts all characters of a string to uppercase. More...
 
ParameterPVL_parameter (idaeim::PVL::Aggregate &aggregate, std::string pathname, bool case_sensitive=false, int skip=0, Parameter_Class_Selection parameter_class=ANY_PARAMETER)
 Gets a named PVL Parameter in an aggregate. More...
 
std::vector< std::string > PVL_values (idaeim::PVL::Aggregate &aggregate, std::string pathname, bool case_sensitive=false, int skip=0)
 Gets the values of a named PVL Parameter in an aggregate. More...
 
bool PVL_value (idaeim::PVL::Aggregate &aggregate, std::string pathname, unsigned int value, bool case_sensitive=false, int skip=0)
 Sets the value of a named PVL parameter in an aggregate. More...
 
bool PVL_value (idaeim::PVL::Aggregate &aggregate, std::string pathname, int value, bool case_sensitive, int skip)
 
bool PVL_value (idaeim::PVL::Aggregate &aggregate, std::string pathname, const std::string &value, bool case_sensitive=false, int skip=0)
 Sets the value of a named PVL parameter in an aggregate. More...
 
string UTC_time (double seconds, unsigned int epoch=Instrument::SPACECRAFT_EPOCH)
 Converts time in seconds to UTC representation. More...
 
string clock_count (double seconds, Clock_Selector clock=HiRISE_Clock)
 Converts time in seconds to clock count representation. More...
 
double seconds (const std::string &clock_count, Clock_Selector clock=HiRISE_Clock)
 Converts a clock count representation to time in seconds. More...
 
bool member_of (const unsigned int value, const unsigned int *array, int size)
 Tests if a value is a member of an array. More...
 
bool member_of (const char *const value, const char *const array[], int size)
 Test if a value is a member of an array. More...
 
string hostname ()
 Gets the name of the host system. More...
 
bool file_exists (const std::string &filename)
 Tests if a file exists. More...
 
string pathname (const std::string &filename="")
 Gets a fully qualified pathname for a filename. More...
 
string pathname (const std::string &directory, const std::string &filename, const std::string &extension)
 Assembles a pathname from directory, filename, and extension segments. More...
 
string filename (const std::string &pathname)
 Gets the filename portion of a pathname. More...
 
string shift (std::string lines, int amount)
 Shifts (indents) lines of text by the specified number of spaces. More...
 
string plural (int count)
 Gets a pluralization string. More...
 
std::ostream & operator<< (std::ostream &stream, const Gap_Map &map)
 Prints a Gap_Map to a stream. More...
 
Pixel_typepukool_table (const idaeim::PVL::Value &conversion_table, Pixel_type *maping_table, double offset_percentage=LUT::DEFAULT_PUKOOL_OFFSET)
 Generates a reverse lookup (pukool) table from a LUT PVL_PDS LOOKUP_CONVERSION_TABLE Parameter Value. More...
 
std::ostream & operator<< (std::ostream &stream, const Observation &observation)
 Prints an observation to a stream. More...
 

Detailed Description

High Resolution Imaging Science Experiment.

Typedef Documentation

◆ int_8

typedef INT_8_TYPE int_8

8-bit integer type.

◆ u_int_8

8-bit unsigned integer type.

◆ int_16

16-bit integer type.

◆ u_int_16

16-bit unsigned integer type.

◆ int_32

32-bit integer type.

◆ u_int_32

32-bit unsigned integer type.

◆ int_64

64-bit integer type.

◆ u_int_64

64-bit unsigned integer type.

◆ Index

Data_Block element index type.

◆ Pixel_type

The type of a generic pixel value.

Enumeration Type Documentation

◆ Parameter_Class_Selection

Selects the class of parameter for PVL_parameter to find.

Enumerator
AGGREGATE_PARAMETER 
ANY_PARAMETER 
ASSIGNMENT_PARAMETER 

◆ Clock_Selector

Used to select a clock.

Enumerator
HiRISE_Clock 
MRO_Clock 

Function Documentation

◆ operator<<() [1/3]

std::ostream & operator<< ( std::ostream &  stream,
const Data_Component component 
)

Prints a Data_Component to a stream.

Parameters
streamThe ostream where the Data_Component will be printed.
componentThe Data_Component to be printed.
Returns
The stream that was written.
See also
Data_Component::print(ostream, bool)

◆ print_value()

std::ostream & print_value ( u_int_32  value,
int  format = Data_Component::DECIMAL,
std::ostream &  stream = std::cout,
int  width = 0 
)

Prints a value in a consistent Data_Component format.

The integer value will be printed using one of these formats:

Data_Component::DECIMAL
Base 10 representation. If width is non-zero the representation will be padded with leading spaces to provide the specified field width.
Data_Component::HEX
Base 16 representation preceded by "0x". If width is non-zero the representation will be padded with leading zeros to provide width digits.
Data_Component::BOOLEAN
Either "true", if the value is non-zero, or "false" if the value is zero. If width is non-zero the representation will be padded with leading spaces to provide the specified field width.
Bits (a positive, non-zero value)
As a sequence of bits, where the number of bits is specified by the format value.
@param  value   The value to be printed.
@param  format  The selected format of the output.
@param  stream  The ostream for output.
@param  width   The width of the representation, as applicable.
@return The stream that was written.

References bits(), Data_Component::BOOLEAN, Data_Component::DECIMAL, and Data_Component::HEX.

Referenced by main(), Image_Line::print(), MROSP_Header::print(), Science_Channel_Header::print(), and Data_Component::print_element().

◆ bits()

std::string bits ( const unsigned int  value,
unsigned int  count = 0 
)

Gets the string representation of a value in binary.

The most significant bit (msb) will be the first character in the string. If a bit is set, the corresponding character will be '1', otherwise it will be '0'. As an aid in reading the string of bits, after each fourth bit (from the right; lsb) a space character will be inserted.

Parameters
valueThe value to be represented.
countThe number of bits to be included in the representation. If the count is 0 then all bits of the value will be represented.
Returns
The string representation.

Referenced by Science_Channel_Header::print(), and print_value().

◆ max_strlen()

unsigned int max_strlen ( const char **  strings)

Finds the length of the longest string in the list.

Parameters
stringsThe list (char**) of strings. The list must be NULL terminated.
Returns
The length of the longest string in the list. A NULL strings list has zero length.

◆ to_upper()

std::string to_upper ( const std::string &  characters)

Converts all characters of a string to uppercase.

Parameters
charactersThe string to be uppercased.
Returns
A copy of the string with its characters converted to uppercase.

Referenced by Observation::PVL_PDS(), and set_effective_values().

◆ PVL_parameter()

idaeim::PVL::Parameter * PVL_parameter ( idaeim::PVL::Aggregate aggregate,
std::string  pathname,
bool  case_sensitive = false,
int  skip = 0,
Parameter_Class_Selection  parameter_class = ANY_PARAMETER 
)

Gets a named PVL Parameter in an aggregate.

The Parameter to be found may be specified by a simple name, a relative pathname or an absolute pathname. A simple name is the name of a Parameter itself. A relative pathname is a simple name preceeded by the pathname of an Aggregate Parameter that must contain the Parameter with the simple name. An absolute pathname is a pathname that begins with a pathname delimiter ('/'); i.e. it is a fully qualified pathname beginning at the root of the Aggregate hierarchy, compared to a relative pathname that may begin at any Aggregate in the hierarchy.

Since it is not necessary that the pathname to each Parameter be unique, the number of matching pathnames to skip before selecting a Parameter may need to be specified to get the desired Parameter. Also, a specific type of Parameter - an Aggregate of Parameters or an Assignment of Values - may be specified. When skipping parameters, only the specified type, if any, are counted.

Parameters
aggregateThe PVL::Aggregate to search.
pathnameThe pathname of the parameter to find.
case_sensitiveIf true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skipThe number of parameters that match the pathname to skip before selecting a matching parameter.
parameter_classA Parameter_Class_Selection: If AGGREGATE_PARAMETER, only Aggregate parameters will be selected; if ASSIGNMENT_PARAMETER, only Assignment parameters will be selected; otherwise any type of parameter (ANY_PARAMETER) is acceptable.
Returns
A pointer to the matching parameter, or NULL if it could not be found.
See also
PVL::Parameter::at_pathname()

References Aggregate::begin_depth(), Aggregate::end_depth(), and pathname().

Referenced by apply_override_parameters(), Label_Patcher::apply_patch(), Label_Patcher::configure_database(), EDR_file(), Label_Patcher::label_parameter(), Label_Patcher::Label_Patcher(), list_selections(), main(), Image_Line::PVL_description(), PVL_value(), and PVL_values().

◆ PVL_values()

std::vector< std::string > PVL_values ( idaeim::PVL::Aggregate aggregate,
std::string  pathname,
bool  case_sensitive = false,
int  skip = 0 
)

Gets the values of a named PVL Parameter in an aggregate.

Only Assignment Parameters, which have Values, will be selected.

Each Value of the slected Parameter is converted to a string and added to the return vector. Numeric values may be converted back to a real number using the string_to_real function. An Array Value is flattened, at the place it occurs, to its Value contents.

Parameters
aggregateThe PVL::Aggregate to search.
pathnameThe pathname of the parameter to find.
case_sensitiveIf true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skipThe number of parameters that match the pathname to skip before selecting a matching parameter.
Returns
A vector of zero or more string values.
See also
PVL_parameter(idaeim::PVL::Aggregate&, std::string, bool, int)
idaeim::PVL::Value::string_to_real(const std::string&)

References ASSIGNMENT_PARAMETER, Value::is_Array(), pathname(), Vectal< T >::push_back(), PVL_parameter(), and Parameter::value().

Referenced by Label_Patcher::configure_database().

◆ PVL_value() [1/3]

bool PVL_value ( idaeim::PVL::Aggregate aggregate,
std::string  pathname,
unsigned int  value,
bool  case_sensitive = false,
int  skip = 0 
)

Sets the value of a named PVL parameter in an aggregate.

Only Assignment Parameters with a Value that is not an Array will be modified. However, the search for a matching pathname does not make this distinction.

Parameters
aggregateThe PVL::Aggregate to search.
pathnameThe pathname of the parameter to find.
valueThe int value to assign to the parameter.
case_sensitiveIf true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skipThe number of parameters that match the pathname to skip before selecting the parameter to modify.
Returns
true if the parameter was found; false otherwise.
See also
PVL_parameter(idaeim::PVL::Aggregate&, std::string, bool, int)

References ASSIGNMENT_PARAMETER, Value::is_Array(), pathname(), PVL_parameter(), and Parameter::value().

Referenced by main(), Engineering_Header::PVL_description(), Gap_Map::PVL_description(), Image_Line::PVL_description(), Science_Channel_Header::PVL_description(), and PVL_value().

◆ PVL_value() [2/3]

bool PVL_value ( idaeim::PVL::Aggregate aggregate,
std::string  pathname,
int  value,
bool  case_sensitive,
int  skip 
)

References pathname(), and PVL_value().

◆ PVL_value() [3/3]

bool PVL_value ( idaeim::PVL::Aggregate aggregate,
std::string  pathname,
const std::string &  value,
bool  case_sensitive = false,
int  skip = 0 
)

Sets the value of a named PVL parameter in an aggregate.

Only Assignment Parameters with a Value that is not an Array will be modified. However, the search for a matching pathname does not make this distinction.

Parameters
aggregateThe PVL::Aggregate to search.
pathnameThe pathname of the parameter to find.
valueThe string value to assign to the parameter.
case_sensitiveIf true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skipThe number of parameters that matches the pathname to skip before selecting the parameter to modify.
Returns
true if the parameter was found; false otherwise.
See also
PVL_parameter(idaeim::PVL::Aggregate&, std::string, bool, int)

References ASSIGNMENT_PARAMETER, Value::is_Array(), Parameter::name(), pathname(), PVL_parameter(), and Parameter::value().

◆ UTC_time()

std::string UTC_time ( double  seconds,
unsigned int  epoch = Instrument::SPACECRAFT_EPOCH 
)

Converts time in seconds to UTC representation.

The UTC representation has the form:

YYYY-MM-DDTHH:mm:SS

where all values, except the year, are zero-padded to two digits.

There are two possible implementations of this method: System functions or SPICE functions. The former will be used if INCLUDE_SPICE has not been defined at compile time and will always be used for an epoch that is not the Instrument::SPACECRAFT_EPOCH.

The system functions implementation converts the seconds argument value into the number of seconds since the host system's localtime epoch (1970) which is then converted to the UTC representation.

The SPICE functions implementation is more accurate than the system functions as it adjusts for leap seconds. This requires the use of an external file containing the leap seconds information. In addition, a file providing information about the MRO spacecraft clock must be provided. These files - called SPICE kernels - are referenced in a SPICE metakernel. The pathname to this file is identified by the SPICE_METAKERNEL_VARIABLE environment variable or, if this environment variable is not present, the DEFAULT_SPICE_METAKERNEL. The name of the SPICE_METAKERNEL_VARIABLE environment variable is set at compile time by the SPICE_METAKERNEL_VARIABLE_NAME macro; if this is not provided the default value is "SPICE_METAKERNEL". The value of the DEFAULT_SPICE_METAKERNEL is set at compile time by the DEFAULT_SPICE_METAKERNEL_PATHNAME macro; if this is not provided the default value is "/HiRISE/Data/NAIF/kernel.list". The seconds argument value is first converted to Ephemeris Time (ET). This requires a clock identifier which is specified by MRO_CLOCK_ID that is set at compile time by the MRO_CLOCK_NAIF_ID macro; if this is not provided the default value is -74999. ET is then converted to the UTC representation. N.B.: If any of the required external files are not accessible, or any of the SPICE functions fail, the INVALID_UTC_TIME value is returned. For details on the SPICE time functions see the documetation available from the ftp://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/html/individual_docs/time.html URL.

Parameters
secondsThe number of seconds since the epoch. N.B.: If the seconds value is negative the INVALID_UTC_TIME value (set at compile time by the DEFAULT_INVALID_UTC_TIME macro; if this is not provided the default value is "0000-00-00T00:00:00.000") is returned.
epochThe epoch reference (year 1/1/XXXX at 00:00 base) for the seconds value.
Returns
A string containing the UTC representation.
See also
Instrument::SPACECRAFT_EPOCH

References clock_count(), Data_Component::DEFAULT_SPICE_METAKERNEL, Data_Component::INVALID_UTC_TIME, MRO_Clock, Data_Component::MRO_CLOCK_ID, seconds(), Instrument::SPACECRAFT_EPOCH, Data_Component::SPICE_METAKERNEL_VARIABLE, and Data_Component::UTC_SECONDS_PRECISION.

Referenced by Observation::PVL_PDS().

◆ clock_count()

std::string clock_count ( double  seconds,
Clock_Selector  clock = HiRISE_Clock 
)

Converts time in seconds to clock count representation.

The clock count representation has the form:

seconds:subseconds

where seconds is a decimal count in seconds since the Instrument::SPACECRAFT_EPOCH, and subseconds is a zero-padded five digit decimal integer measuring fraction of a second ticks. For the HiRISE instrument clock each subsecond tick is Instrument::HIRISE_CLOCK_SUBTICK_MICROS microseconds; for the MRO spacecraft clock a tick is Instrument::MRO_CLOCK_SUBTICK_MICROS microseconds.

Parameters
secondsThe number of seconds since the Instrument::SPACECRAFT_EPOCH.
clockA Clock_Selector: either the HiRISE_Clock or the MRO_Clock.
Returns
The clock count representation string.
See also
seconds(const std::string&, Clock_Selector)

References HiRISE_Clock, Instrument::HIRISE_CLOCK_SUBTICK_MICROS, Instrument::MRO_CLOCK_SUBTICK_MICROS, seconds(), and Data_Component::SUBSECONDS_DELIMITER.

Referenced by Observation::PVL_PDS(), seconds(), and UTC_time().

◆ seconds()

double seconds ( const std::string &  clock_count,
Clock_Selector  clock = HiRISE_Clock 
)

Converts a clock count representation to time in seconds.

Parameters
Theclock count representation string.
clockA Clock_Selector: either the HiRISE_Clock or the MRO_Clock.
Returns
The number of seconds since the Instrument::SPACECRAFT_EPOCH.
See also
clock_count(double, Clock_Selector)

References clock_count(), Instrument::HIRISE_CLOCK_SUBTICK_MICROS, Data_Component::ID, MRO_Clock, Instrument::MRO_CLOCK_SUBTICK_MICROS, and Data_Component::SUBSECONDS_DELIMITER.

Referenced by Science_Channel_Header::clock_count(), clock_count(), Observation::PVL_PDS(), Science_Channel_Header::time(), and UTC_time().

◆ member_of() [1/2]

bool member_of ( const unsigned int  value,
const unsigned int *  array,
int  size 
)

Tests if a value is a member of an array.

Each member of the array is compared for equality with the test value.

Parameters
valueThe integer value to test for.
arrayThe integer array to search.
sizeThe size of the array.
Returns
true if the value is a member of the array; false otherwise.

Referenced by Engineering_Header::is_valid().

◆ member_of() [2/2]

bool member_of ( const char *const  value,
const char *const  array[],
int  size 
)

Test if a value is a member of an array.

Each member of the array is compared for equality with the test value.

Parameters
valueThe C-string value to test for.
arrayThe C-string array to search.
sizeThe size of the array.
Returns
true if the value is a member of the array; false otherwise.

◆ hostname()

std::string hostname ( )

Gets the name of the host system.

Returns
The hostname string.

Referenced by main().

◆ file_exists()

bool file_exists ( const std::string &  filename)

Tests if a file exists.

Parameters
filenameThe filename to test. This can be a full pathname.
Returns
true if the file exists; false otherwise.

References filename().

Referenced by Label_Patcher::apply_patch(), Label_Patcher::configure_database(), and main().

◆ pathname() [1/2]

std::string pathname ( const std::string &  filename = "")

Gets a fully qualified pathname for a filename.

If the specified filename is an absolute pathname - i.e. it begins with the PATHNAME_DELIMITER character - the filename is returned.

A relative filename is prepended, separated by the PATHNAME_DELIMITER character, with the current working directory pathname obtained from the host system. Then all occurances of the "PATHNAME_DELIMITER.PATHNAME_DELIMITER" sequence are replaced with a single PATHNAME_DELIMITER character.

Parameters
filenameA filename or pathname string.
Returns
A fully qualified absolute pathname string.

References CWD(), filename(), and Data_Component::PATHNAME_DELIMITER.

Referenced by add_override_parameters(), filename(), Label_Patcher::label_parameter(), main(), PVL_parameter(), PVL_value(), PVL_values(), and remove_override_parameters().

◆ pathname() [2/2]

std::string pathname ( const std::string &  directory,
const std::string &  filename,
const std::string &  extension 
)

Assembles a pathname from directory, filename, and extension segments.

The directory string, if it is not empty, is prepended to the filename string. A PATHNAME_DELIMITER character is provided between them if the directory does not already end with one. If the extension is not empty it is then appended with a '.' character delimiter.

Parameters
directoryThe pathname string for the directory.
filenameThe filename string.
extensionThe extension string.
Returns
The pathname string for the file.

References filename(), and Data_Component::PATHNAME_DELIMITER.

◆ filename()

std::string filename ( const std::string &  pathname)

Gets the filename portion of a pathname.

The substring following the last occurance of the PATHNAME_DELIMITER character in the pathname string is the filename string. If the delimiter is not present the entire pathname is the filename.

Parameters
pathnameA pathname string.
Returns
The filename string.

References pathname(), and Data_Component::PATHNAME_DELIMITER.

Referenced by EDR_file(), file_exists(), main(), and pathname().

◆ shift()

std::string shift ( std::string  lines,
int  amount 
)

Shifts (indents) lines of text by the specified number of spaces.

The beginning of each line of text - where a line is terminated by a new-line ('
') character - is prepended with the specified amount of whitespace (' ' characters). If no new-line is present but the lines string is not empty it is taken to be a single line that is shifted.

Parameters
linesAn arbitrary string.
amountThe amount of whitespace to shift the lines. If this is less than or equal to zero no shifting is done.
Returns
The modified lines string.

Referenced by Observation::gap_map_shift(), and main().

◆ plural()

std::string plural ( int  count)

Gets a pluralization string.

Used to provide the plural suffix for a string depending on a count related to the string. For example, give a vector, list, a description of the vector might be:

    cout << "The list contains " << list.size ()
         << " item" << plural (list.size ()) << '.' << endl;
Parameters
countAny integer value.
Returns
Pluralization suffix string. If the count is not 1 the "s" string is returned; otherwise the empty string is returned.

Referenced by Label_Patcher::database_field_value(), and main().

◆ operator<<() [2/3]

std::ostream & operator<< ( std::ostream &  stream,
const Gap_Map map 
)

Prints a Gap_Map to a stream.

Parameters
streamThe ostream where the Gap_Map will be printed.
mapThe Gap_Map to be printed.
Returns
The stream.
See also
Gap_Map::print(std::ostream&, bool) const

◆ pukool_table()

Pixel_type * pukool_table ( const idaeim::PVL::Value conversion_table,
Pixel_type maping_table,
double  offset_percentage = LUT::DEFAULT_PUKOOL_OFFSET 
)

Generates a reverse lookup (pukool) table from a LUT PVL_PDS LOOKUP_CONVERSION_TABLE Parameter Value.

A pukool maps output pixel values back to their input CCD sensor values. The index of the pukool table corresponds to a single byte image data value. A two byte table entry value corresponds to the CCD sensor value. Thus, while a LUT maps two byte (UA::HiRISE::Pixel_type) CCD sesnor values to single byte image pixel values, a pukool maps single byte image pixel values to CCD sensor values.

However, due to the loss of precision during LUT mapping, pukool mapping is not able to identify which of of multiple CCD sensor values that mapped to the same pixel value. Since the LUT is expected to be a monotonically increasing set, a many-to-one LUT mapping is over a continuous range. The offset_percentage is used to selected a value from this range based on a percentage of the distance between the ends of the range. An offset_percentage of 0.0 will pick the low end, 1.0 will pick the high end, and 0.5 will pick the middle of the range.

Note: The last pukool entry will always map invalid (gap) pixel values to invalid (-1) CCD sensor values.

Parameters
conversion_tableThe Array Value containing the reverse map ranges, as produced by the LUT::PVL_PDS method.
maping_tableThe data storage arrage for the reultant pukool table. Warning: Space for 256 UA::HiRISE::Pixel_type values must be provided.
offset_percentageA value between 0.0 and 1.0, inclusive.
Returns
The mapping_table.
Exceptions
invalid_argumentIf the maping_table is NULL or the offset_percentage is not in the range 0.0 to 1.0.

References Vectal< T >::begin(), Vectal< T >::end(), LUT::ID, Value::is_Array(), Instrument::MAX_PIXEL_VALUES, Instrument::NOT_APPLICABLE_NUMBER, Array::type_name(), and Value::type_name().

Referenced by main().

◆ operator<<() [3/3]

std::ostream & operator<< ( std::ostream &  stream,
const Observation observation 
)

Prints an observation to a stream.

Parameters
streamThe ostream where the Data_Component will be printed.
observationThe Obseration to be printed.
Returns
The stream.
See also
Observation::print(std::ostream&, bool) const