HiRISE
 Observation

Macros | Functions | Variables
HiRISE_Observation_Check.cc File Reference
#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>
Include dependency graph for HiRISE_Observation_Check.cc:

Macros

#define IMAGE_DATA_TEST_PATTERN_SIZE   1052
 

Functions

int usage (char *program)
 HiRISE_Observation_Check command line usage. More...
 
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. More...
 
const unsigned int NO_DATA = 0
 Data list selectors. More...
 
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. More...
 
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
 

Macro Definition Documentation

◆ IMAGE_DATA_TEST_PATTERN_SIZE

#define IMAGE_DATA_TEST_PATTERN_SIZE   1052

Function Documentation

◆ usage()

int usage ( char *  program)

HiRISE_Observation_Check command line usage.

Use:

HiRISE_Observation_Check  [options] &lt;<i>filename</i>&gt;

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.

Referenced by main().

◆ list_data()

void list_data ( const Observation observation,
unsigned int  data_selections,
bool  verbose 
)

◆ main()

int main ( int  count,
char **  arguments 
)

Variable Documentation

◆ ID

const char* ID = "HiRISE_Observation_Check (1.14 2020/02/14 01:17:17)"

Application identification name with source code version and date.

Referenced by main().

◆ NO_DATA

const unsigned int NO_DATA = 0

Data list selectors.

Referenced by list_data(), and main().

◆ MROSP

const unsigned int MROSP = (1 << 0)

Referenced by list_data(), and main().

◆ SCIENCE

const unsigned int SCIENCE = (1 << 1)

Referenced by list_data(), and main().

◆ LOOKUP_TABLE

const unsigned int LOOKUP_TABLE = (1 << 2)

Referenced by list_data(), and main().

◆ ENGINEERING

const unsigned int ENGINEERING = (1 << 3)

Referenced by list_data(), and main().

◆ PDS_LABEL

const unsigned int PDS_LABEL = (1 << 4)

◆ ALL_DATA

const unsigned int ALL_DATA = (unsigned int)-1

◆ SUCCESS

const int SUCCESS = 0

Exit status values.

Referenced by main().

◆ BAD_SYNTAX

const int BAD_SYNTAX = 1

Referenced by usage().

◆ INVALID_ARGUMENT

const int INVALID_ARGUMENT = 11

Referenced by main().

◆ LENGTH_ERROR

const int LENGTH_ERROR = 12

Referenced by main().

◆ OUT_OF_RANGE

const int OUT_OF_RANGE = 14

Referenced by main().

◆ INVALID_SCIENCE_CHANNEL_HEADER

const int INVALID_SCIENCE_CHANNEL_HEADER = 15

Referenced by main().

◆ INVALID_LINE

const int INVALID_LINE = 16

Referenced by main().

◆ UNEXPECTED_PIXEL_VALUE

const int UNEXPECTED_PIXEL_VALUE = 17

Referenced by main().

◆ LOGIC_ERROR

const int LOGIC_ERROR = 19

Referenced by main().

◆ NO_OBSERVATION_FILE

const int NO_OBSERVATION_FILE = 20

Referenced by main().

◆ IO_FAILURE

const int IO_FAILURE = 29

Referenced by main().

◆ UNKNOWN_ERROR

const int UNKNOWN_ERROR = -1

Referenced by main().