HiRISE
 Observation

Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

UA::HiRISE Namespace Reference

High Resolution Imaging Science Experiment. More...


Classes

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...

Typedefs

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

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 Data_Component &component)
 Prints a Data_Component to a stream.
std::ostream & print_value (u_int_32 value, int format, std::ostream &stream, int width)
 Prints a value in a consistent Data_Component format.
string bits (const unsigned int value, unsigned int count)
 Gets the string representation of a value in binary.
unsigned int max_strlen (const char **strings)
 Finds the length of the longest string in the list.
std::string to_upper (const std::string &characters)
 Converts all characters of a string to uppercase.
Parameter * PVL_parameter (idaeim::PVL::Aggregate &aggregate, std::string pathname, bool case_sensitive, int skip, Parameter_Class_Selection parameter_class)
 Gets a named PVL Parameter in an aggregate.
std::vector< std::string > PVL_values (idaeim::PVL::Aggregate &aggregate, std::string pathname, bool case_sensitive, int skip)
 Gets the values of a named PVL Parameter in an aggregate.
bool PVL_value (idaeim::PVL::Aggregate &aggregate, std::string pathname, unsigned int value, bool case_sensitive, int skip)
 Sets the value of a named PVL parameter in an aggregate.
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, int skip)
 Sets the value of a named PVL parameter in an aggregate.
string UTC_time (double seconds, unsigned int epoch)
 Converts time in seconds to UTC representation.
string clock_count (double seconds, Clock_Selector clock)
 Converts time in seconds to clock count representation.
bool member_of (const unsigned int value, const unsigned int *array, int size)
 Tests if a value is a member of an array.
bool member_of (const char *const value, const char *const array[], int size)
 Test if a value is a member of an array.
string hostname ()
 Gets the name of the host system.
bool file_exists (const std::string &filename)
 Tests if a file exists.
string pathname (const std::string &filename)
 Gets a fully qualified pathname for a filename.
string pathname (const std::string &directory, const std::string &filename, const std::string &extension)
 Assembles a pathname from directory, filename, and extension segments.
string filename (const std::string &pathname)
 Gets the filename portion of a pathname.
string shift (std::string lines, int amount)
 Shifts (indents) lines of text by the specified number of spaces.
string plural (int count)
 Gets a pluralization string.
std::ostream & operator<< (std::ostream &stream, const Gap_Map &map)
 Prints a Gap_Map to a stream.
Pixel_typepukool_table (const Value &conversion_table, Pixel_type *mapping_table, double offset_percentage)
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.
std::ostream & operator<< (std::ostream &stream, const Observation &observation)
 Prints an observation to a stream.


Detailed Description

High Resolution Imaging Science Experiment.

Typedef Documentation

typedef INT_8_TYPE int_8
 

8-bit integer type.

typedef U_INT_8_TYPE u_int_8
 

8-bit unsigned integer type.

typedef INT_16_TYPE int_16
 

16-bit integer type.

typedef U_INT_16_TYPE u_int_16
 

16-bit unsigned integer type.

typedef INT_32_TYPE int_32
 

32-bit integer type.

typedef U_INT_32_TYPE u_int_32
 

32-bit unsigned integer type.

typedef INT_64_TYPE int_64
 

64-bit integer type.

typedef U_INT_64_TYPE u_int_64
 

64-bit unsigned integer type.

typedef PIRL::Data_Block::Index Index
 

Data_Block element index type.

typedef u_int_16 Pixel_type
 

The type of a generic pixel value.


Enumeration Type Documentation

enum Parameter_Class_Selection
 

Selects the class of parameter for PVL_parameter to find.

Enumeration values:
AGGREGATE_PARAMETER 
ANY_PARAMETER 
ASSIGNMENT_PARAMETER 

enum Clock_Selector
 

Used to select a clock.

Enumeration values:
HiRISE_Clock 
MRO_Clock 


Function Documentation

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

Prints a Data_Component to a stream.

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

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.

Parameters:
value The value to be printed.
format The selected format of the output.
stream The ostream for output.
width The width of the representation, as applicable.
Returns:
The stream that was written.

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:
value The value to be represented.
count The 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.

unsigned int max_strlen const char **  strings  ) 
 

Finds the length of the longest string in the list.

Parameters:
strings The 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.

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

Converts all characters of a string to uppercase.

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

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:
aggregate The PVL::Aggregate to search.
pathname The pathname of the parameter to find.
case_sensitive If true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skip The number of parameters that match the pathname to skip before selecting a matching parameter.
parameter_class A 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()

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:
aggregate The PVL::Aggregate to search.
pathname The pathname of the parameter to find.
case_sensitive If true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skip The 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&)

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:
aggregate The PVL::Aggregate to search.
pathname The pathname of the parameter to find.
value The int value to assign to the parameter.
case_sensitive If true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skip The 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)

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

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:
aggregate The PVL::Aggregate to search.
pathname The pathname of the parameter to find.
value The string value to assign to the parameter.
case_sensitive If true, the pathname search is case sensitive; if false the pathname is not case sensitive.
skip The 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)

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:
seconds The 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.
epoch The 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

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:
seconds The number of seconds since the Instrument::SPACECRAFT_EPOCH.
clock A Clock_Selector: either the HiRISE_Clock or the MRO_Clock.
Returns:
The clock count representation string.

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:
value The integer value to test for.
array The integer array to search.
size The size of the array.
Returns:
true if the value is a member of the array; false otherwise.

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:
value The C-string value to test for.
array The C-string array to search.
size The size of the array.
Returns:
true if the value is a member of the array; false otherwise.

std::string hostname  ) 
 

Gets the name of the host system.

Returns:
The hostname string.

bool file_exists const std::string &  filename  ) 
 

Tests if a file exists.

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

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:
filename A filename or pathname string.
Returns:
A fully qualified absolute pathname string.

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:
directory The pathname string for the directory.
filename The filename string.
extension The extension string.
Returns:
The pathname string for the file.

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:
pathname A pathname string.
Returns:
The filename string.

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:
lines An arbitrary string.
amount The 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.

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:
count Any integer value.
Returns:
Pluralization suffix string. If the count is not 1 the "s" string is returned; otherwise the empty string is returned.

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

Prints a Gap_Map to a stream.

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

Pixel_type* pukool_table const Value &  conversion_table,
Pixel_type mapping_table,
double  offset_percentage
 

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 (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_table The Array Value containing the reverse map ranges, as produced by the LUT::PVL_PDS method.
maping_table The data storage arrage for the reultant pukool table. Warning: Space for 256 Pixel_type values must be provided.
offset_percentage A value between 0.0 and 1.0, inclusive.
Returns:
The mapping_table.
Exceptions:
invalid_argument If the maping_table is NULL or the offset_percentage is not in the range 0.0 to 1.0.

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

Prints an observation to a stream.

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


Generated on Sat Jan 20 15:11:55 2007 for UA::HiRISE::Observation by  doxygen 1.4.1