![]() |
Observation
|
#include "Data_Component.hh"
#include "Observation.hh"
#include "Channel_ID.hh"
#include "Exceptions.hh"
#include "PVL.hh"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstring>
#include <cstdlib>
#include <exception>
#include <stdexcept>
#include <sys/stat.h>
Defines | |
#define | IMAGE_DATA_TEST_PATTERN_SIZE 1052 |
Functions | |
int | usage (char *program) |
HiRISE_Observation_Check command line usage. | |
void | list_data (const Observation &observation, unsigned int data_selections, bool verbose) |
int | main (int count, char **arguments) |
Variables | |
const char * | ID = "HiRISE_Observation_Check (1.14 2020/02/14 01:17:17)" |
Application identification name with source code version and date. | |
const unsigned int | NO_DATA = 0 |
Data list selectors. | |
const unsigned int | MROSP = (1 << 0) |
const unsigned int | SCIENCE = (1 << 1) |
const unsigned int | LOOKUP_TABLE = (1 << 2) |
const unsigned int | ENGINEERING = (1 << 3) |
const unsigned int | PDS_LABEL = (1 << 4) |
const unsigned int | ALL_DATA = (unsigned int)-1 |
const int | SUCCESS = 0 |
Exit status values. | |
const int | BAD_SYNTAX = 1 |
const int | INVALID_ARGUMENT = 11 |
const int | LENGTH_ERROR = 12 |
const int | OUT_OF_RANGE = 14 |
const int | INVALID_SCIENCE_CHANNEL_HEADER = 15 |
const int | INVALID_LINE = 16 |
const int | UNEXPECTED_PIXEL_VALUE = 17 |
const int | LOGIC_ERROR = 19 |
const int | NO_OBSERVATION_FILE = 20 |
const int | IO_FAILURE = 29 |
const int | UNKNOWN_ERROR = -1 |
#define IMAGE_DATA_TEST_PATTERN_SIZE 1052 |
Referenced by main().
int usage | ( | char * | program ) |
HiRISE_Observation_Check command line usage.
Use:
HiRISE_Observation_Check [options] <filename>
Description:
The HiRISE_Observation application can be used to examine the contents of a HiRISE instrument observation data set file. Without any command line options it will produce either a PASS or FAIL result consistent with a zero or non-zero exit status, respectively.
It can also produce detailed data listings of selected data components. Either single channel and multi-channel observation data sets, with or without an initial MROSP header component, are acceptable.
Options:
-Report All | MROSP | Science | Lut | Engineering | PDS[:<parameter>[...]] [,...]
Detailed reports of selected data components are written to stdout. Multiple, comma separated (no spaces) data components may be selected. Multiple, colon separated (no spaces) parameters may be selected. If the PDS label component of an EDR product file is specified but no parameter is selected the entire PDS label is listed. EDR source input and/or EDR product output parameters are listed. Component selections are cumulative for each use of this option.
-Line <first>[-<last>]
Detailed listings of selected image line data are written to stdout.
-Check_image_line_data
Check image line data for consistency. The first 1052 pixels - regardless of the number of pixels per line - of each channel's image line data is expected to contain a valid test pattern that is repeated for each subsequent sequence of 1052 pixels. The check compares the first 1052 pixel values against each subsequent sequence.
-Verbose
Verbose operation provides some additional annotations and very detailed (and long) data listings.
-Help
This usage description.
Exit status:
SUCCESS = 0,
Command line syntax. BAD_SYNTAX = 1,
Software / data problem. INVALID_ARGUMENT = 11, LENGTH_ERROR = 12, OUT_OF_RANGE = 14, INVALID_SCIENCE_CHANNEL_HEADER = 15, INVALID_LINE = 16, UNEXPECTED_PIXEL_VALUE = 17, LOGIC_ERROR = 19,
IO. NO_OBSERVATION_FILE = 20, IO_FAILURE = 29,
Unknown? UNKNOWN_ERROR = -1;
Author:
Bradford Castalia, UA/PIRL
1.14 2020/02/14 01:17:17
References BAD_SYNTAX.
void list_data | ( | const Observation & | observation, |
unsigned int | data_selections, | ||
bool | verbose | ||
) |
References Observation::Engineering, ENGINEERING, MROSP_Header::is_valid(), Observation::Lookup_Table, LOOKUP_TABLE, Observation::MROSP, MROSP, NO_DATA, Engineering_Header::print(), LUT::print(), Science_Channel_Header::print(), MROSP_Header::print(), Observation::Science, and SCIENCE.
Referenced by main().
int main | ( | int | count, |
char ** | arguments | ||
) |
References Image_Line::bad_line_description(), Observation::bytes_read(), Science_Channel_Header::Channel, Science_Channel_Header::Checksum, Observation::components(), Science_Channel_Header::CPMM, ENGINEERING, Data_Component::get(), Data_Component::HEX, ID, IMAGE_DATA_TEST_PATTERN_SIZE, Data_Component::internet_checksum(), INVALID_ARGUMENT, INVALID_LINE, INVALID_SCIENCE_CHANNEL_HEADER, IO_FAILURE, LENGTH_ERROR, Observation::line(), Observation::Line, list_data(), LOGIC_ERROR, LOOKUP_TABLE, Observation::mirror_channel_1(), MROSP, NO_DATA, NO_OBSERVATION_FILE, OUT_OF_RANGE, Data_Component::PATHNAME_DELIMITER, Image_Line::pixel(), Image_Line::pixel_count(), Image_Line::print(), Data_Component::put(), Observation::Science, SCIENCE, SUCCESS, Science_Channel_Header::SYNC, Science_Channel_Header::Sync, Image_Line::total_lines(), UNEXPECTED_PIXEL_VALUE, UNKNOWN_ERROR, usage(), and Data_Block::value_size_of().
const char* ID = "HiRISE_Observation_Check (1.14 2020/02/14 01:17:17)" |
Application identification name with source code version and date.
const unsigned int NO_DATA = 0 |
Data list selectors.
const unsigned int MROSP = (1 << 0) |
const unsigned int SCIENCE = (1 << 1) |
const unsigned int LOOKUP_TABLE = (1 << 2) |
const unsigned int ENGINEERING = (1 << 3) |
const unsigned int PDS_LABEL = (1 << 4) |
const unsigned int ALL_DATA = (unsigned int)-1 |
const int SUCCESS = 0 |
Exit status values.
const int BAD_SYNTAX = 1 |
const int INVALID_ARGUMENT = 11 |
const int LENGTH_ERROR = 12 |
const int OUT_OF_RANGE = 14 |
const int INVALID_SCIENCE_CHANNEL_HEADER = 15 |
Referenced by main().
const int INVALID_LINE = 16 |
Referenced by main().
const int UNEXPECTED_PIXEL_VALUE = 17 |
Referenced by main().
const int LOGIC_ERROR = 19 |
const int NO_OBSERVATION_FILE = 20 |
const int IO_FAILURE = 29 |
const int UNKNOWN_ERROR = -1 |