HiRISE
 Observation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Science_Channel_Header Class Reference

A Science_Channel_Header contains the science metadata describing the observation channel data. More...

#include <Science_Channel_Header.hh>

Inheritance diagram for Science_Channel_Header:
Inheritance graph
[legend]
Collaboration diagram for Science_Channel_Header:
Collaboration graph
[legend]

Classes

struct  Conversion_Coefficients
 Sensor conversion coefficients. More...
 

Public Types

enum  Element {
  Sync ,
  Post_Binned_Pixels_Per_Line ,
  Post_Binned_Lines ,
  Alignment ,
  CPMM ,
  Channel ,
  Observation_ID ,
  Transaction_ID ,
  Powered_CPMMs_Count ,
  Powered_CPMMs_Map ,
  Expose_MRO_Time ,
  Expose_HiRISE_Time ,
  Analog_Power_On_Time ,
  Analog_Power_On_Start_Time ,
  Exposure_Start_Time ,
  Expose_Time_Ticks ,
  Total_Image_Bytes ,
  Line_Time_Operation ,
  Expose_Command ,
  Expose_Response ,
  Line_Time_Command_Received ,
  Binning_Command_Received ,
  TDI_Command_Received ,
  Line_Count_Command_Received ,
  CPMM_Power_Command_Received ,
  Expose_Time_Command_Received ,
  LUT_Command_Received ,
  Pad_0 ,
  Digital_Power_Operation ,
  Analog_Power_Operation ,
  Trimming_Operation ,
  TDI_Operation ,
  Line_Count_Operation ,
  Binning_Operation ,
  LUT_Operation ,
  Expose_Time_Milliseconds ,
  Readout_Start_Time ,
  Readout_Pad_Bytes ,
  Pixels_Per_Line ,
  Extra_Pixels ,
  Pixel_Bytes ,
  Pixel_Data_Bytes ,
  Line_Header_Bytes ,
  Channel_Readout_Bytes ,
  Channel_Readout_Ticks ,
  Max_Storable_Lines ,
  Max_Storable_Lines_Exceeded ,
  Total_Lines_Collected ,
  Total_Lines_Exposed ,
  Line_Time_Nanoseconds ,
  Channel_Readout_Command ,
  Channel_Readout_Response ,
  Pad_1 ,
  Optical_Bench_Flexure_Temperature ,
  Optical_Bench_Tertiary_Mirror_Temperature ,
  Optical_Bench_Fold_Flat_Temperature ,
  Optical_Bench_FPA_Temperature ,
  Optical_Bench_FPE_Temperature ,
  Optical_Bench_Living_Room_Temperature ,
  Optical_Bench_Box_Beam_Temperature ,
  Optical_Bench_Cover_Temperature ,
  Field_Stop_Temperature ,
  FPA_Positive_Y_Temperature ,
  FPA_Negative_Y_Temperature ,
  FPE_Temperature ,
  Primary_Mirror_Mount_Temperature ,
  Primary_Mirror_Temperature ,
  Primary_Mirror_Baffle_Temperature ,
  Metering_Structure_Truss_Leg_0_A_Temperature ,
  Metering_Structure_Truss_Leg_0_B_Temperature ,
  Metering_Structure_Truss_Leg_120_A_Temperature ,
  Metering_Structure_Truss_Leg_120_B_Temperature ,
  Metering_Structure_Truss_Leg_240_A_Temperature ,
  Metering_Structure_Truss_Leg_240_B_Temperature ,
  Barrel_Baffle_Temperature ,
  Sun_Shade_Temperature ,
  Spider_Leg_30_Temperature ,
  Spider_Leg_150_Temperature ,
  Spider_Leg_270_Temperature ,
  Secondary_Mirror_Metering_Ring_Temperature ,
  Secondary_Mirror_Temperature ,
  Secondary_Mirror_Baffle_Temperature ,
  IEA_Temperature ,
  Focus_Motor_Temperature ,
  CPMM_Positive_29_Voltage ,
  CPMM_Positive_29_Current ,
  CPMM_Positive_10_Voltage ,
  CPMM_Positive_10_Current ,
  CPMM_Positive_5_Voltage ,
  CPMM_Positive_5_Current ,
  CPMM_Positive_3_3_Voltage ,
  CPMM_Positive_3_3_Current ,
  CPMM_Positive_2_5_Voltage ,
  CPMM_Positive_2_5_Current ,
  CPMM_Positive_1_8_Voltage ,
  CPMM_Positive_1_8_Current ,
  CPMM_Negative_5_Voltage ,
  CPMM_Negative_5_Current ,
  IE_PWS_Board_Temperature ,
  CPMM_PWS_Board_Temperature ,
  Heater_Current ,
  Mech_TLM_Board_Temperature ,
  Instrument_Control_Board_Temperature ,
  Instrument_Control_FPGA_Positive_2_5_Voltage ,
  Mech_TLM_FPGA_Positive_2_5_Voltage ,
  IEA_Positive_28_Voltage ,
  IEA_Negative_15_Voltage ,
  IEA_Positive_15_Voltage ,
  IEA_Positive_5_Voltage ,
  Exposure_Readout_Count ,
  Default_TDI ,
  Default_Trimming ,
  Default_Line_Count ,
  Default_Binning ,
  Focus_Position ,
  Heater_Control_Mode ,
  Heater_Zones_Enabled ,
  Heater_Zones_State ,
  Heater_Disabled_For_Exposure ,
  Heater_Zones_Pre_Exposure_State ,
  FPGA_Last_Response ,
  Heater_Controls ,
  Last_Command_Time ,
  Pad_2 ,
  Checksum ,
  Total_Elements
}
 An Element refers to a data containing constituent of a component. More...
 
enum  Heater_Mode {
  CLOSED_LOOP ,
  DUTY_CYCLES
}
 Heater_Control_Mode values: determines the Heater_Controls value meanings. More...
 
enum  Setpoint {
  LOW ,
  HIGH
}
 Heater_Controls word value type when the Heater_Mode is CLOSED_LOOP. More...
 
enum  Duty_Cycle {
  ON_SECONDS ,
  OFF_SECONDS
}
 Heater_Controls word value type when the Heater_Mode is DUTY_CYCLES. More...
 
enum  { TOTAL_CONVERSION_COEFFICIENTS = 7 }
 Number of coefficients (n) in the conversion polynomial. More...
 
- Public Types inherited from Data_Block
enum  Data_Order
 
enum  Array_Index_Counts
 
enum  Array_Offset_Counts
 
typedef unsigned int Index
 
typedef std::vector< IndexValue_List
 
typedef void(* Copier) (unsigned char *destination, int destination_amount, const unsigned char *source, int source_amount)
 

Public Member Functions

 Science_Channel_Header ()
 Constructs an empty Science_Channel_Header. More...
 
 Science_Channel_Header (std::istream &stream)
 Constructs an Science_Channel_Header loaded from a data stream. More...
 
 Science_Channel_Header (const Science_Channel_Header &component, bool data_duplicate=true)
 Copy constructor. More...
 
Science_Channel_Headeroperator= (const Science_Channel_Header &component)
 Assigns another Science_Channel_Header to this one. More...
 
std::string id () const
 Provides the class ID on a line followed by the base Data_Component::id. More...
 
const char * name () const
 Gets the NAME of this class. More...
 
std::string clock_count (Index element, Index index=0) const
 Gets a formatted clock count string for a Time Element. More...
 
Science_Channel_Headerclock_count (const std::string &counter, Index element, Index index=0)
 Sets a Time Element from a formatted clock count string. More...
 
double time (Index element, Index index=0) const
 Gets a Time Element value as a single real seconds value. More...
 
Science_Channel_Headertime (double seconds, Index element, Index index=0)
 Sets a Time Element value based on a real seconds value. More...
 
bool FPGA_last_response_CPMM_PWS_enabled () const
 Tests if the FPGA_Last_Response Element indicates that the CPMM power supply was enabled during the observation. More...
 
Science_Channel_HeaderFPGA_last_response_CPMM_PWS_enabled (bool enabled)
 Sets the FPGA_Last_Response Element to indicate whether the CPMM power supply was enabled during the observation. More...
 
bool FPGA_last_response_telemetry_gathering () const
 Tests if the FPGA_Last_Response Element indicates that telemetry gathering was enabled at the time of the observation. More...
 
Science_Channel_HeaderFPGA_last_response_telemetry_gathering (bool enabled)
 Sets the FPGA_Last_Response Element to indicate whether telemetry gathering was enabled at the time of the observation. More...
 
bool FPGA_last_response_FM_relay_PHB_closed () const
 Tests if the FPGA_Last_Response Element indicates that the focus mechanism relay PhB was closed at the time of the observation. More...
 
Science_Channel_HeaderFPGA_last_response_FM_relay_PHB_closed (bool closed)
 Sets the FPGA_Last_Response Element to indicate whether the focus mechanism relay PhB was closed at the time of the observation. More...
 
bool FPGA_last_response_FM_relay_PHA_closed () const
 Tests if the FPGA_Last_Response Element indicates that the focus mechanism relay PhA was closed at the time of the observation. More...
 
Science_Channel_HeaderFPGA_last_response_FM_relay_PHA_closed (bool closed)
 Sets the FPGA_Last_Response Element to indicate whether the focus mechanism relay PhA was closed at the time of the observation. More...
 
bool FPGA_last_response_FM_overheated () const
 Tests if the FPGA_Last_Response Element indicates that the focus mechanism was overheated at the time of the observation. More...
 
Science_Channel_HeaderFPGA_last_response_FM_overheated (bool overheated)
 Sets the FPGA_Last_Response Element to indicate whether the focus mechanism was overheated at the time of the observation. More...
 
bool FPGA_last_response_FM_moving () const
 Tests if the FPGA_Last_Response Element indicates that the optics focus mechanism was moving during the observation. More...
 
Science_Channel_HeaderFPGA_last_response_FM_moving (bool moving)
 Sets the FPGA_Last_Response Element to indicate whether the focus mechanism was moving at the time of the observation. More...
 
u_int_32 FPGA_last_response_stim_LEDs_on () const
 Gets the bit map from the FPGA_Last_Response Element that indicate which stim lamps were on during the observation. More...
 
Science_Channel_HeaderFPGA_last_response_stim_LEDs_on (u_int_32 stim_LEDs_map)
 Sets the bit map in the FPGA_Last_Response Element that indicate which stim lamps were on during the observation. More...
 
u_int_32 FPGA_last_response_heaters_on () const
 Gets the bit map from the FPGA_Last_Response Element that indicate which CCD heater elements were on during the observation. More...
 
Science_Channel_HeaderFPGA_last_response_heaters_on (u_int_32 heaters_map)
 Sets the bit map in the FPGA_Last_Response Element that indicate which CCD heater elements were on during the observation. More...
 
const Conversion_Coefficientsconversion (Index element) const
 Gets a Conversion_Coefficients set for an Element. More...
 
double convert (Index element, Index index=0) const
 Converts an Element sensor value to its standard units. More...
 
const char * converted_units (Index element) const
 Gets the stadard units of representation for an Element. More...
 
std::ostream & print (std::ostream &stream=std::cout, bool verbose=false) const
 Prints the component structure and contents. More...
 
idaeim::PVL::AggregatePVL () const
 Produces a PVL rendition of the component. More...
 
idaeim::PVL::AggregatePVL_description () const
 Produces a PVL description of the component for a PDS label. More...
 
bool is_valid () const
 Tests if the component data is valid. More...
 
- Public Member Functions inherited from Data_Component
 Data_Component (const char **names=NULL, unsigned int size=0, const Index *offsets=NULL, const Index indexed_arrays[][2]=NULL, Data_Order order=Data_Block::MSB)
 Constructs a Data_Component using component specifications. More...
 
 Data_Component (const Data_Component &component, bool data_duplicate=true)
 Copy constructor. More...
 
Data_Componentoperator= (const Data_Component &component)
 Assignment operator. More...
 
virtual ~Data_Component ()
 Destructor. More...
 
const char * name (Index element) const
 Gets the name of a component Element. More...
 
virtual u_int_32 get (Index element, Index index=0) const
 Gets a value from a data Element or array entry of the component. More...
 
virtual Data_Componentput (const u_int_32 value, Index element, Index index=0)
 Puts a value into a data Element or array entry of the component. More...
 
std::ostream & print_element (const Index element, int format=DECIMAL, std::ostream &stream=std::cout, int width=0) const
 Prints an Element description. More...
 
std::ostream & print_element (const Index element, std::ostream &stream) const
 Prints an Element description. More...
 
std::ostream & print_element_location (const Index element, std::ostream &stream=std::cout) const
 Prints the location of an Element in the component. More...
 
unsigned int element_location_print_width (Index element) const
 Gets the width of the Element location printing fields. More...
 
unsigned int name_field_width () const
 Gets the width of the Element name printing field. More...
 
Data_Componentname_field_width (unsigned int width)
 Sets the width of the Element name field for printing. More...
 
Data_Blockdata (void *const block)
 Overrides the base Data_Block::data to reset Local_Data. More...
 
Data_Blockattach (void *const block, unsigned int size)
 Attaches a new block of data to the component. More...
 
Data_Componentresize (unsigned int size)
 Resizes the block of local data storage. More...
 
unsigned char * data () const
 Gets a pointer to the current component storage. More...
 
unsigned int local_data ()
 Gets the size of the local data storage area. More...
 
u_int_16 internet_checksum () const
 Calculates the Internet Checksum as per RFC 1071. More...
 
- Public Member Functions inherited from Data_Block
 Data_Block ()
 
 Data_Block (void *const data, const Index *offsets, Index total_elements=0, const Index *array_counts=NULL, bool native_order=true)
 
 Data_Block (void *const data, const Value_List &offsets, const Value_List &array_counts, bool native_order=true)
 
 Data_Block (void *const data, const Value_List &offsets, bool native_order=true)
 
 Data_Block (void *const data, const Index *offsets, Index total_elements, const Index *array_counts, Data_Order data_order)
 
 Data_Block (void *const data, const Value_List &offsets, const Value_List &array_counts, Data_Order data_order)
 
 Data_Block (void *const data, const Index *offsets, Index total_elements, Data_Order data_order)
 
 Data_Block (void *const data, const Index *offsets, Data_Order data_order)
 
 Data_Block (void *const data, const Value_List &offsets, Data_Order data_order)
 
 Data_Block (void *const data, const Index *offsets, const Index indexed_counts[][2], Data_Order data_order)
 
 Data_Block (const Data_Block &data_block)
 
Data_Blockoperator= (const Data_Block &data_block)
 
virtual ~Data_Block ()
 
bool native () const
 
Data_Blocknative (bool native_order)
 
Data_Order data_order () const
 
Data_Blockdata_order (Data_Order order)
 
unsigned char * data () const
 
Index size () const
 
Value_List element_offsets_list () const
 
Indexelement_offsets ()
 
bool element_offsets (const Value_List &offsets)
 
bool element_offsets (const Index *offsets, Index total_elements=NO_INDEX)
 
bool element_sizes (const Value_List &sizes)
 
bool element_sizes (const Index *sizes, Index total_elements=NO_INDEX)
 
Index offset_of (Index element) const
 
bool offset_of (Index element, Index offset)
 
bool insert_element (Index offset, Index size, Index array_count=1)
 
Data_Blockdelete_element (Index element)
 
Data_Blockshift_offsets (int amount)
 
Index elements () const
 
Index size_of (Index element) const
 
bool size_of (Index element, Index size)
 
Index value_size_of (Index element) const
 
Data_Blockvalue_size_of (Index element, Index size)
 
Index index_of (Index offset) const
 
Value_List array_counts_list () const
 
Indexarray_counts ()
 
Data_Blockarray_counts (const Value_List &counts, Index begin=0)
 
Data_Blockarray_counts (const Index *counts, Index begin=0, Index end=NO_INDEX)
 
Data_Blockarray_indexed_counts (const Index indexed_counts[][2], Index total_counts=NO_INDEX)
 
Data_Blockarray_offset_counts (const Index offset_counts[][2], Index total_counts=NO_INDEX)
 
Index count_of (Index element) const
 
Data_Blockcount_of (Index element, Index count)
 
bool reset_counts (bool unconditional=true, Index begin=0, Index end=NO_INDEX)
 
const Data_Blockget (T &value, const Index element, const Index index=0) const
 
const Data_Blockget (T &value, const Index element, const Index index=0) const
 
get (const Index element, const Index index=0) const
 
get (const Index element, const Index index=0) const
 
Data_Blockput (T &value, const Index element, const Index index=0)
 
Data_Blockput (T &value, const Index element, const Index index=0)
 
const Data_Blockget (T *array, const Index element, Index count=0) const
 
const Data_Blockget (T *array, const Index element, Index count=0) const
 
Data_Blockput (T *array, const Index element, Index count=0)
 
Data_Blockput (T *array, const Index element, Index count=0)
 
std::istream & input (std::istream &stream)
 
std::ostream & output (std::ostream &stream) const
 
std::ostream & print (std::ostream &stream=std::cout) const
 

Static Public Member Functions

static bool is_sync (const void *data_at)
 Tests if some data contains a sync sequence. More...
 
static void * sync_at (void *begin, void *end)
 Searches a range of bytes for a Science Channel Header sync pattern. More...
 
- Static Public Member Functions inherited from Instrument
static unsigned int calibration_lines_minimum (unsigned int TDI, unsigned int binning)
 
static int focal_plane_x_offset (unsigned int CPMM, unsigned int binning=1)
 
- Static Public Member Functions inherited from Data_Block
static Data_Order native_order ()
 
static Value_Listsizes_to_offsets (Value_List &sizes)
 
static Indexsizes_to_offsets (Index *sizes, Index total_elements=NO_INDEX)
 
static Value_Listoffsets_to_sizes (Value_List &offsets)
 
static Indexoffsets_to_sizes (Index *offsets, Index total_elements=NO_INDEX)
 

Static Public Attributes

static const char *const ID
 Class identification name with source code version and date. More...
 
static const char *const NAME = "Science Channel Header"
 The component name. More...
 
static const char * NAMES []
 The name of each Element. More...
 
static const Index COMPONENT_BYTES = SCIENCE_CHANNEL_HEADER_BYTES
 Total number of bytes in the Data_Block. More...
 
static const Index OFFSETS []
 Data_Block data storage address offset for each Element. More...
 
static const Index ARRAY_COUNTS [][2]
 Data_Block array element value counts each keyed to an Element Index. More...
 
static const u_int_32 SYNC = 0xFFFF0000
 Expected Sync Element values. More...
 
static const int SYNC_BYTES = 2 * sizeof (SYNC)
 The number of bytes in the sync pattern. More...
 
static const u_int_32 FPGA_RESPONSE_CPMM_PWS_ENABLED_BIT_MASK = (1 << 22)
 FPGA_Last_Response Element bit fields. More...
 
static const u_int_32 FPGA_RESPONSE_TELEMETRY_GATHERING_BIT_MASK = (1 << 21)
 
static const u_int_32 FPGA_RESPONSE_FM_RELAY_PHB_CLOSED_BIT_MASK = (1 << 20)
 
static const u_int_32 FPGA_RESPONSE_FM_RELAY_PHA_CLOSED_BIT_MASK = (1 << 19)
 
static const u_int_32 FPGA_RESPONSE_FM_OVERHEATED_BIT_MASK = (1 << 18)
 
static const u_int_32 FPGA_RESPONSE_FM_MOVING_BIT_MASK = (1 << 17)
 
static const u_int_32 FPGA_RESPONSE_STIM_LEDS_BIT_MASK
 
static const u_int_32 FPGA_RESPONSE_STIM_LEDS_BIT_MASK_SHIFT = 14
 
static const u_int_32 FPGA_RESPONSE_HEATERS_ON_BIT_MASK = 0x3FFF
 
static const Conversion_Coefficients CONVERSION_COEFFICIENTS []
 The array of all Conversion_Coefficients. More...
 
static const double CELSIUS_TO_KELVINS_OFFSET
 Offset to be added to Celsius degrees to obtain Kelvins. More...
 
static const char *const FORMAT_FILENAME = SCIENCE_CHANNEL_HEADER_FORMAT_FILE
 The name of the external PDS format description file. More...
 
- Static Public Attributes inherited from Data_Component
static const char *const ID
 Class identification name with source code version and date. More...
 
static const int DECIMAL = 0
 Format specifier. More...
 
static const int HEX = -1
 
static const int BOOLEAN = -2
 
static const char PATHNAME_DELIMITER = FILESYSTEM_PATHNAME_DELIMITER
 Host filesystem pathname delimiter. More...
 
static const int UTC_SECONDS_PRECISION = SECONDS_PRECISION
 UTC seconds precision (digits after the decimal point). More...
 
static const char SUBSECONDS_DELIMITER = ':'
 Delimits subseconds from seconds in clock count representations. More...
 
static const char *const SPICE_METAKERNEL_VARIABLE
 The name of the environment variable for the SPICE metakernel pathname. More...
 
static const char *const DEFAULT_SPICE_METAKERNEL
 The default SPICE metakernal pathname. More...
 
static const int MRO_CLOCK_ID = MRO_CLOCK_NAIF_ID
 The ID used by NAIF for specifying the MRO clock to CSPICE routines. More...
 
static const char *const INVALID_UTC_TIME = DEFAULT_INVALID_UTC_TIME
 
- Static Public Attributes inherited from Instrument
static const char *const ID
 
static const unsigned int CCDS
 
static const unsigned int CCD_UNKNOWN
 
static const char *const CCD_NAMES []
 
static const char *const CCD_FILTER_NAMES []
 
static const unsigned int CCD_BY_CPMM []
 
static const unsigned int CPMM_BY_CCD []
 
static const char *const WAVELENGTH_UNITS
 
static const unsigned int CCD_CENTER_WAVELENGTHS []
 
static const unsigned int CCD_BANDWIDTHS []
 
static const double CCD_FOCAL_PLANE_X_OFFSETS_MM []
 
static const double CCD_FOCAL_PLANE_Y_OFFSETS_MM []
 
static const double CCD_PIXEL_SIZE_MM
 
static const unsigned int CCD_CHANNELS
 
static const unsigned int CCD_CHANNEL_UNKNOWN
 
static const unsigned int CCD_IMAGE_SENSORS
 
static const unsigned int MAX_BYTES_PER_PIXEL
 
static const unsigned int MAX_PIXEL_VALUES []
 
static const unsigned int MAX_IMAGE_LINES
 
static const unsigned int TOTAL_TDI_STAGES
 
static const unsigned int TDI_STAGES []
 
static const unsigned int TOTAL_BINNING_FACTORS
 
static const unsigned int BINNING_FACTORS []
 
static const unsigned int CCD_BINNED_PIXELS []
 
static const unsigned int STORED_LUTS
 
static const unsigned int STIMULATOR_LEDS
 
static const char *const STIMULATOR_LED_NAMES []
 
static const double EXPOSURE_SETUP_MICROS
 
static const unsigned int DELTA_LINE_TIME_MAX
 
static const double DELTA_LINE_TIME_TICK_NANOS
 
static const double LINE_TIME_PRE_OFFSET
 
static const unsigned int TRIM_ADDITION_LINES
 
static const unsigned int REVERSE_READOUT_LINES
 
static const unsigned int MASKED_LINES
 
static const unsigned int DLL_LOCKED
 
static const unsigned int DLL_NOT_LOCKED
 
static const unsigned int SPACECRAFT_EPOCH
 
static const double MRO_CLOCK_SUBTICK_MICROS
 
static const double HIRISE_CLOCK_SUBTICK_MICROS
 
static const int SPACECRAFT_NAIF_ID
 
static const unsigned int SSR_BYTE_BOUNDARY
 
static const int UNKNOWN_NUMBER
 
static const int NOT_APPLICABLE_NUMBER
 
static const char *const UNKNOWN_STRING
 
static const char *const NOT_APPLICABLE_STRING
 
- Static Public Attributes inherited from Data_Block
static const char *const ID
 
static const Index NO_INDEX
 

Additional Inherited Members

- Public Attributes inherited from Data_Block
 MSB
 
 LSB
 
 ELEMENT_INDEX
 
 INDEX_COUNT
 
 ELEMENT_OFFSET
 
 OFFSET_COUNT
 
Copier Get
 
Copier Put
 
- Protected Member Functions inherited from Data_Block
void limits_checker (const Index element, const Index index, bool getter, bool array) const
 
- Static Protected Member Functions inherited from Data_Block
static void get_forwards (unsigned char *host, int host_amount, const unsigned char *data, int data_amount)
 
static void get_backwards (unsigned char *host, int host_amount, const unsigned char *data, int data_amount)
 
static void put_forwards (unsigned char *data, int data_amount, const unsigned char *host, int host_amount)
 
static void put_backwards (unsigned char *data, int data_amount, const unsigned char *host, int host_amount)
 

Detailed Description

A Science_Channel_Header contains the science metadata describing the observation channel data.

This Data_Component is the first in the observation channel data stream. It includes all parameters that were used in controlling the instrument during the collection of observation data. Thus it is the definative record of the instrument observation operation. Many of the Elements should have identical values for all data channels of an observation. This redundancy is used to help reconcile corrupted data due to gaps in the spacecraft downlink transmission. Some Elements are sets of values that require detailed engineering knowlege of the instrument to correctly interpret.

For details consult the "HiRISE Command and Telemetry Handbook" (http://hirise.lpl.arizona.edu/team_site/instrument/Command_and_Telemetry_Handbook/).

Header data block layout:

    Offset  Size  Description
    ------  ----  -----------
         0     8  Sync pattern (0xFFFF0000 FFFF0000)

    Image identification and geometry:

         8     2  Post-binned pixels per line
        10     4  Post-binned lines
        14     2  (alignment bytes)
        16     2  CPMM (0-13)
        18     2  Channel (0, 1)
        20     4  Observation ID (a.k.a. Image ID)
        24     4  Transaction ID
        28     4  Number of powered on CPMMs (0-13)
        32     4  Powered on CPMMs map

    Times:

        36     8  MRO Expose time (seconds and subsecond counts)
        44     8  HiRISE Expose time (seconds and subsecond counts)
        52     8  Analog power on time (seconds and subsecond counts)
        60     8  Analog power on start time (seconds and subsecond counts)
        68     8  Exposure start time (seconds and subsecond counts)
        76     4  Expose time (10 msec ticks)

        80     4  Total image bytes

    Commands:

        84    20  Line time operation (Operation)
       104     4  Expose command
       108     4  Expose response
       112     4  Line time command received
       116     4  Binning command received
       120     4  TDI command received
       124     4  Line count command received
       128     4  CPMM power command received
       132     4  Expose time command received
       136     4  LUT command received
       140     8  (padding)
       148    20  Digital power operation (Operation)
       168    20  Analog power operation (Operation)
       188    20  Trimming operation (Operation)
       208    20  TDI operation (Operation)
       228    20  Line count operation (Operation)
       248    20  Binning operation (Operation)
       268    80  LUT operation (LUT_Operation)

    Image data specifications:

       348     4  Expose time
       352    16  Readout start times (Time_Value for each channel)
       368     4  Readout pad bytes
       372     4  Pixels per line
       376     4  Extra pixels
       380     4  Pixel bytes (bytes per pixel)
       384     4  Pixel data bytes (toal pixel bytes per channel)
       388     4  Line header bytes
       392     4  Channel readout bytes (incl. pixels, LUT, Eng. and pad)
       396     4  Channel readout ticks (10 msec ticks)
       400     4  Maximum storable lines
       404     4  Maximum storable lines exceeded
       408     4  Total lines collected
       412     4  Total lines exposed
       416     4  Line time (nanoseconds)
       420     8  Readout command for each channel
       428     8  Readout response for each channel
       436    12  (padding)

    Engineering Data (temperatures, voltages, currents):

       448     2  Optical bench near +X MRO flexure temperature
       450     2  Optical bench near tertiary mirror temperature
       452     2  Optical bench near fold flat #2 temperature
       454     2  Optical bench near FPA temperature
       456     2  Optical bench near FPE temperature
       458     2  Optical bench in sunken living room temperature
       460     2  Optical bench box beam (+Y face) temperature
       462     2  Optical bench cover (external) temperature
       464     2  Field stop temperature
       466     2  FPA +Y side temperature
       468     2  FPA -Y side temperature
       470     2  FPE temperature
       472     2  Primary mirror at mount (+Y) temperature
       474     2  Primary mirror at maximum thickness temperature
       476     2  Primary mirror baffle near base (external) temperature
       478     2  Metering structure truss leg 0 - A leg temperature
       480     2  Metering structure truss leg 0 - B leg temperature
       482     2  Metering structure truss leg 120 - A leg temperature
       484     2  Metering structure truss leg 120 - B leg temperature
       486     2  Metering structure truss leg 240 - A leg temperature
       488     2  Metering structure truss leg 240 - B leg temperature
       490     2  Barrel baffle temperature
       492     2  Sun shade under MLI temperature
       494     2  Spider leg 30 temperature
       496     2  Spider leg 150 temperature
       498     2  Spider leg 270 temperature
       500     2  Secondary mirror metering ring temperature
       502     2  Secondary mirror temperature
       504     2  Secondary mirror baffle near base (external) temperature
       506     2  IEA temperature
       508     2  Focus motor temperature
       510     2  +29V CPMM Voltage
       512     2  +29V CPMM Current
       514     2  +10V CPMM Voltage
       516     2  +10V CPMM Current
       518     2  +5V CPMM Voltage
       520     2  +5V CPMM Current
       522     2  +3.3V CPMM Voltage
       524     2  +3.3V CPMM Current
       526     2  +2.5V CPMM Voltage
       528     2  +2.5V CPMM Current
       530     2  +1.8V CPMM Voltage
       532     2  +1.8V CPMM Current
       534     2  -5V CPMM Voltage
       536     2  -5V CPMM Current
       538     2  IE PWS board temperature
       540     2  CPMM PWS board temperature
       542     2  Total heater current
       544     2  Mech/TLM board temperature
       546     2  Inst/Cont board temperature
       548     2  Inst/Cont 2.5V FPGA voltage monitor
       550     2  Mech/TLM 2.5 FPGA voltage monitor
       552     2  +28V IEA voltage
       554     2  -15V IEA voltage
       556     2  +15V IEA voltage
       558     2  +5V IEA voltage

       560     4  Exposure readout count

    Defaults:

       564     4  Default TDI
       568     4  Default trimming
       572     4  Default line count
       576     4  Default binning

       580     4  Focus position

    Heaters:

       584     4  Heater control mode (0 = setpoint, 1 = duty cycle)
       588     4  Heater enable (zones bitmask)
       592     4  Heater state (zones bitmask)
       596     4  Heater disabled for exposure
       600     4  Heater pre-exposure state (zones bitmask)
       604     4  FPGA last response
                    Bits   Description
                    -----  -----------
                    0 -13  Heaters on bit map
                             0 - off
                             1 - on
                    14-16  Stim LEDs on bit map
                             0 - off
                             1 - on
                       17  Focus Mechanism moving (flag)
                       18  Focus Mechanism overheated (flag)
                       19  Focus Mechanism relay PhA closed (flag)
                       20  Focus Mechanism relay PhB closed (flag)
                       21  Telemetry gathering (flag)
                       22  CPMM PWS enabled (flag)
       608    56  Heater controls (14 16-bit word pairs)

       664     8  Last command time (seconds and subsecond counts)

       672   126  (padding)

       798     2  Checksum

N.B.: Data_Block values are MSB ordered.

Author
Bradford Castalia, UA/PIRL

1.42

See also
Data_Component

Member Enumeration Documentation

◆ Element

enum Element

An Element refers to a data containing constituent of a component.

Each named Element is an Index into various data sets that define the attributes of a component; including their NAMES, data storage address OFFSETS, and array element value ARRAY_COUNTS. It is the key Index argument of the data access methods.

See also
Data_Block
Enumerator
Sync 
Post_Binned_Pixels_Per_Line 
Post_Binned_Lines 
Alignment 
CPMM 
Channel 
Observation_ID 
Transaction_ID 
Powered_CPMMs_Count 
Powered_CPMMs_Map 
Expose_MRO_Time 
Expose_HiRISE_Time 
Analog_Power_On_Time 
Analog_Power_On_Start_Time 
Exposure_Start_Time 
Expose_Time_Ticks 
Total_Image_Bytes 
Line_Time_Operation 
Expose_Command 
Expose_Response 
Line_Time_Command_Received 
Binning_Command_Received 
TDI_Command_Received 
Line_Count_Command_Received 
CPMM_Power_Command_Received 
Expose_Time_Command_Received 
LUT_Command_Received 
Pad_0 
Digital_Power_Operation 
Analog_Power_Operation 
Trimming_Operation 
TDI_Operation 
Line_Count_Operation 
Binning_Operation 
LUT_Operation 
Expose_Time_Milliseconds 
Readout_Start_Time 
Readout_Pad_Bytes 
Pixels_Per_Line 
Extra_Pixels 
Pixel_Bytes 
Pixel_Data_Bytes 
Line_Header_Bytes 
Channel_Readout_Bytes 
Channel_Readout_Ticks 
Max_Storable_Lines 
Max_Storable_Lines_Exceeded 
Total_Lines_Collected 
Total_Lines_Exposed 
Line_Time_Nanoseconds 
Channel_Readout_Command 
Channel_Readout_Response 
Pad_1 
Optical_Bench_Flexure_Temperature 
Optical_Bench_Tertiary_Mirror_Temperature 
Optical_Bench_Fold_Flat_Temperature 
Optical_Bench_FPA_Temperature 
Optical_Bench_FPE_Temperature 
Optical_Bench_Living_Room_Temperature 
Optical_Bench_Box_Beam_Temperature 
Optical_Bench_Cover_Temperature 
Field_Stop_Temperature 
FPA_Positive_Y_Temperature 
FPA_Negative_Y_Temperature 
FPE_Temperature 
Primary_Mirror_Mount_Temperature 
Primary_Mirror_Temperature 
Primary_Mirror_Baffle_Temperature 
Metering_Structure_Truss_Leg_0_A_Temperature 
Metering_Structure_Truss_Leg_0_B_Temperature 
Metering_Structure_Truss_Leg_120_A_Temperature 
Metering_Structure_Truss_Leg_120_B_Temperature 
Metering_Structure_Truss_Leg_240_A_Temperature 
Metering_Structure_Truss_Leg_240_B_Temperature 
Barrel_Baffle_Temperature 
Sun_Shade_Temperature 
Spider_Leg_30_Temperature 
Spider_Leg_150_Temperature 
Spider_Leg_270_Temperature 
Secondary_Mirror_Metering_Ring_Temperature 
Secondary_Mirror_Temperature 
Secondary_Mirror_Baffle_Temperature 
IEA_Temperature 
Focus_Motor_Temperature 
CPMM_Positive_29_Voltage 
CPMM_Positive_29_Current 
CPMM_Positive_10_Voltage 
CPMM_Positive_10_Current 
CPMM_Positive_5_Voltage 
CPMM_Positive_5_Current 
CPMM_Positive_3_3_Voltage 
CPMM_Positive_3_3_Current 
CPMM_Positive_2_5_Voltage 
CPMM_Positive_2_5_Current 
CPMM_Positive_1_8_Voltage 
CPMM_Positive_1_8_Current 
CPMM_Negative_5_Voltage 
CPMM_Negative_5_Current 
IE_PWS_Board_Temperature 
CPMM_PWS_Board_Temperature 
Heater_Current 
Mech_TLM_Board_Temperature 
Instrument_Control_Board_Temperature 
Instrument_Control_FPGA_Positive_2_5_Voltage 
Mech_TLM_FPGA_Positive_2_5_Voltage 
IEA_Positive_28_Voltage 
IEA_Negative_15_Voltage 
IEA_Positive_15_Voltage 
IEA_Positive_5_Voltage 
Exposure_Readout_Count 
Default_TDI 
Default_Trimming 
Default_Line_Count 
Default_Binning 
Focus_Position 
Heater_Control_Mode 
Heater_Zones_Enabled 
Heater_Zones_State 
Heater_Disabled_For_Exposure 
Heater_Zones_Pre_Exposure_State 
FPGA_Last_Response 
Heater_Controls 
Last_Command_Time 
Pad_2 
Checksum 
Total_Elements 

◆ Heater_Mode

Heater_Control_Mode values: determines the Heater_Controls value meanings.

Enumerator
CLOSED_LOOP 
DUTY_CYCLES 

◆ Setpoint

enum Setpoint

Heater_Controls word value type when the Heater_Mode is CLOSED_LOOP.

Enumerator
LOW 
HIGH 

◆ Duty_Cycle

enum Duty_Cycle

Heater_Controls word value type when the Heater_Mode is DUTY_CYCLES.

Enumerator
ON_SECONDS 
OFF_SECONDS 

◆ anonymous enum

anonymous enum

Number of coefficients (n) in the conversion polynomial.

Enumerator
TOTAL_CONVERSION_COEFFICIENTS 

Constructor & Destructor Documentation

◆ Science_Channel_Header() [1/3]

Constructs an empty Science_Channel_Header.

The base Data_Component is initialized with the NAMES, COMPONENT_BYTES, OFFSETS, and ARRAY_COUNTS that define an Science_Channel_Header component structure.

◆ Science_Channel_Header() [2/3]

Science_Channel_Header ( std::istream &  stream)
explicit

Constructs an Science_Channel_Header loaded from a data stream.

The base Data_Component is initialized with the NAMES, COMPONENT_BYTES, OFFSETS, and ARRAY_COUNTS that define an Science_Channel_Header component structure. The stream is then read for COMPONENT_BYTES to fill the data block. Therefore, the stream must be positioned at the beginning of the Science_Channel_Header data.

Parameters
streamThe istream from which to read the component data.

References Data_Block::input().

◆ Science_Channel_Header() [3/3]

Science_Channel_Header ( const Science_Channel_Header component,
bool  data_duplicate = true 
)

Copy constructor.

Parameters
componentThe Science_Channel_Header to be copied.
data_duplicatetrue if the data content of the copied component is to be duplicated in the copy; false if the data content is to be shared.
See also
Data_Component(const Data_Component&, bool)

Member Function Documentation

◆ operator=()

Science_Channel_Header & operator= ( const Science_Channel_Header component)

Assigns another Science_Channel_Header to this one.

Parameters
componentThe Science_Channel_Header to be assigned.
See also
Data_Component::operator=(const Data_Component&)

References Data_Component::operator=().

◆ id()

string id ( ) const
virtual

Provides the class ID on a line followed by the base Data_Component::id.

Returns
The multi-line identification string.
See also
Data_Component::id()

Reimplemented from Data_Component.

References Data_Component::id(), and Science_Channel_Header::ID.

◆ name()

const char * name ( ) const
virtual

Gets the NAME of this class.

Returns
A pointer to the constant class name C-string.
See also
Data_Component::name()

Implements Data_Component.

References Science_Channel_Header::NAME.

◆ clock_count() [1/2]

string clock_count ( Index  element,
Index  index = 0 
) const

Gets a formatted clock count string for a Time Element.

All XXX_Time Elements are an array of two values: a clock seconds count and a "subseconds" count; where the first value is the count of seconds since the Instrument::SPACECRAFT_EPOCH, and the second value is the count of fraction of a second ticks having a tick interval that is clock dependent. A specific text representation format is used for these clock counts so they can be recognized and interpreted correctly. This method produces that representation:

seconds:subseconds

Parameters
elementAn Element Index. Warning: This value is not checked to verify that it actually refers to a Time Element.
indexFor the Readout_Start_Time, the Index of the clock count value set to use. N.B.: Since clock counts are always a pair of values, this Index is NOT the Element array entry; it is internally doubled to select the correct array entries.
Returns
The string representing seconds and subseconds clock count.
See also
UA::HiRISE::clock_count(double, Clock_Selector);

References Data_Component::get(), and Data_Component::SUBSECONDS_DELIMITER.

Referenced by Observation::PVL_PDS().

◆ clock_count() [2/2]

Science_Channel_Header & clock_count ( const std::string &  counter,
Index  element,
Index  index = 0 
)

Sets a Time Element from a formatted clock count string.

A clock count with the representation:

seconds:subseconds

is used to set the seconds and subseconds values of a Time Element.

Parameters
counterThe string containing the formatted clock count.
elementAn Element Index. Warning: This value is not checked to verify that it actually refers to a Time Element.
indexFor the Readout_Start_Time, the Index of the clock count value set to use. N.B.: Since clock counts are always a pair of values, this Index is NOT the Element array entry; it is internally doubled to select the correct array entries.
Returns
This Science_Channel_Header.
See also
UA::HiRISE::clock_count(Index, Index) const;

References Science_Channel_Header::ID, Science_Channel_Header::NAMES, Data_Component::put(), UA::HiRISE::seconds(), and Data_Component::SUBSECONDS_DELIMITER.

◆ time() [1/2]

double time ( Index  element,
Index  index = 0 
) const

Gets a Time Element value as a single real seconds value.

The "subseconds" portion of the clock count is converted to a real fraction second value and added to the seconds count portion. For the Expose_MRO_Time Element the Instrument::MRO_CLOCK_SUBTICK_MICROS is used to convert the subseconds count to microseconds; all other Elements use the Instrument::HIRISE_CLOCK_SUBTICK_MICROS conversion factor.

Parameters
elementAn Element Index. Warning: This value is not checked to verify that it actually refers to a Time Element.
indexFor the Readout_Start_Time, the Index of the clock count value set to use. N.B.: Since clock counts are always a pair of values, this Index is NOT the Element array entry; it is internally doubled to select the correct array entries.
Returns
Seconds since the Instrument::SPACECRAFT_EPOCH to the microsecond accuracy of the clock. N.B.: If the seconds portion of the clock count has all bits set the value returned will be -1.0; this helps identify the case where the clock count has been obscured by a data gap.
See also
clock_count(Index, Index)

References Science_Channel_Header::Expose_MRO_Time, Data_Component::get(), Instrument::HIRISE_CLOCK_SUBTICK_MICROS, Instrument::MRO_CLOCK_SUBTICK_MICROS, and UA::HiRISE::seconds().

Referenced by Science_Channel_Header::print(), Science_Channel_Header::PVL(), and Observation::PVL_PDS().

◆ time() [2/2]

Science_Channel_Header & time ( double  seconds,
Index  element,
Index  index = 0 
)

Sets a Time Element value based on a real seconds value.

The real seconds value is converted to separate seconds and "subseconds" values which are put in the data block. For the Expose_MRO_Time Element the Instrument::MRO_CLOCK_SUBTICK_MICROS is used to convert the fractional seconds to subseconds count; all other Elements use the Instrument::HIRISE_CLOCK_SUBTICK_MICROS conversion factor.

Parameters
secondsSeconds since the Instrument::SPACECRAFT_EPOCH to microsecond accuracy.
elementAn Element Index. Warning: This value is not checked to verify that it actually refers to a Time Element.
indexFor the Readout_Start_Time, the Index of the clock count value set to use. N.B.: Since clock counts are always a pair of values, this Index is NOT the Element array entry; it is internally doubled to select the correct array entries.
Returns
This Science_Channel_Header.

References Science_Channel_Header::Expose_MRO_Time, Instrument::HIRISE_CLOCK_SUBTICK_MICROS, Instrument::MRO_CLOCK_SUBTICK_MICROS, Data_Component::put(), and UA::HiRISE::seconds().

◆ FPGA_last_response_CPMM_PWS_enabled() [1/2]

bool FPGA_last_response_CPMM_PWS_enabled ( ) const

Tests if the FPGA_Last_Response Element indicates that the CPMM power supply was enabled during the observation.

Bit 22 of the Element value is tested.

Returns
true if the enabled bit is set; false otherwise.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_CPMM_PWS_ENABLED_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_CPMM_PWS_enabled() [2/2]

Science_Channel_Header & FPGA_last_response_CPMM_PWS_enabled ( bool  enabled)

Sets the FPGA_Last_Response Element to indicate whether the CPMM power supply was enabled during the observation.

Bit 22 of the Element value is set or cleared.

Parameters
enabledtrue to set the bit; false to clear it.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_CPMM_PWS_ENABLED_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_telemetry_gathering() [1/2]

bool FPGA_last_response_telemetry_gathering ( ) const

Tests if the FPGA_Last_Response Element indicates that telemetry gathering was enabled at the time of the observation.

Bit 21 of the Element value is tested.

Returns
true if telemetry gathering was enabled; false otherwise.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_TELEMETRY_GATHERING_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_telemetry_gathering() [2/2]

Science_Channel_Header & FPGA_last_response_telemetry_gathering ( bool  enabled)

Sets the FPGA_Last_Response Element to indicate whether telemetry gathering was enabled at the time of the observation.

Bit 21 of the Element value is set or cleared.

Parameters
enabledtrue to set the bit; false to clear it.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_TELEMETRY_GATHERING_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_FM_relay_PHB_closed() [1/2]

bool FPGA_last_response_FM_relay_PHB_closed ( ) const

Tests if the FPGA_Last_Response Element indicates that the focus mechanism relay PhB was closed at the time of the observation.

Bit 20 of the Element value is tested.

Returns
true if the focus mechanism relay PhB was closed; false otherwise.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_RELAY_PHB_CLOSED_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_FM_relay_PHB_closed() [2/2]

Science_Channel_Header & FPGA_last_response_FM_relay_PHB_closed ( bool  closed)

Sets the FPGA_Last_Response Element to indicate whether the focus mechanism relay PhB was closed at the time of the observation.

Bit 20 of the Element value is set or cleared.

Parameters
closedtrue to set the bit; false to clear it.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_RELAY_PHB_CLOSED_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_FM_relay_PHA_closed() [1/2]

bool FPGA_last_response_FM_relay_PHA_closed ( ) const

Tests if the FPGA_Last_Response Element indicates that the focus mechanism relay PhA was closed at the time of the observation.

Bit 19 of the Element value is tested.

Returns
true if the focus mechanism relay PhA was closed; false otherwise.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_RELAY_PHA_CLOSED_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_FM_relay_PHA_closed() [2/2]

Science_Channel_Header & FPGA_last_response_FM_relay_PHA_closed ( bool  closed)

Sets the FPGA_Last_Response Element to indicate whether the focus mechanism relay PhA was closed at the time of the observation.

Bit 19 of the Element value is set or cleared.

Parameters
closedtrue to set the bit; false to clear it.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_RELAY_PHA_CLOSED_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_FM_overheated() [1/2]

bool FPGA_last_response_FM_overheated ( ) const

Tests if the FPGA_Last_Response Element indicates that the focus mechanism was overheated at the time of the observation.

Bit 18 of the Element value is tested.

Returns
true if the focus mechanism was overheated; false otherwise.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_OVERHEATED_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_FM_overheated() [2/2]

Science_Channel_Header & FPGA_last_response_FM_overheated ( bool  overheated)

Sets the FPGA_Last_Response Element to indicate whether the focus mechanism was overheated at the time of the observation.

Bit 18 of the Element value is set or cleared.

Parameters
overheatedtrue to set the bit; false to clear it.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_OVERHEATED_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_FM_moving() [1/2]

bool FPGA_last_response_FM_moving ( ) const

Tests if the FPGA_Last_Response Element indicates that the optics focus mechanism was moving during the observation.

Bit 17 of the Element value is tested.

Returns
true if the focus mechanism was moving; false otherwise.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_MOVING_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_FM_moving() [2/2]

Science_Channel_Header & FPGA_last_response_FM_moving ( bool  moving)

Sets the FPGA_Last_Response Element to indicate whether the focus mechanism was moving at the time of the observation.

Bit 17 of the Element value is set or cleared.

Parameters
movingtrue to set the bit; false to clear it.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_FM_MOVING_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_stim_LEDs_on() [1/2]

u_int_32 FPGA_last_response_stim_LEDs_on ( ) const

Gets the bit map from the FPGA_Last_Response Element that indicate which stim lamps were on during the observation.

Bits 14-16 contain the bit map.

Returns
A 32-bit integer in which the least significant STIMULATOR_LEDS contain the stim lamp map in which a set bit indicates the lamp was on.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_STIM_LEDS_BIT_MASK, Science_Channel_Header::FPGA_RESPONSE_STIM_LEDS_BIT_MASK_SHIFT, and Data_Component::get().

Referenced by Science_Channel_Header::print(), Science_Channel_Header::PVL(), and Observation::PVL_PDS().

◆ FPGA_last_response_stim_LEDs_on() [2/2]

Science_Channel_Header & FPGA_last_response_stim_LEDs_on ( u_int_32  stim_LEDs_map)

Sets the bit map in the FPGA_Last_Response Element that indicate which stim lamps were on during the observation.

Bits 14-16 contain the bit map.

Parameters
stim_LEDs_mapA 32-bit integer in which the least significant STIMULATOR_LEDS contain the stim lamp map in which a set bit indicates the lamp was on.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_HEATERS_ON_BIT_MASK, Science_Channel_Header::FPGA_RESPONSE_STIM_LEDS_BIT_MASK, Science_Channel_Header::FPGA_RESPONSE_STIM_LEDS_BIT_MASK_SHIFT, Data_Component::get(), and Data_Component::put().

◆ FPGA_last_response_heaters_on() [1/2]

u_int_32 FPGA_last_response_heaters_on ( ) const

Gets the bit map from the FPGA_Last_Response Element that indicate which CCD heater elements were on during the observation.

Bits 0-13 contain the bit map.

Returns
A 32-bit integer in which the least significant CCDS contain the heater element map in which a set bit indicates the heater was on.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_HEATERS_ON_BIT_MASK, and Data_Component::get().

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

◆ FPGA_last_response_heaters_on() [2/2]

Science_Channel_Header & FPGA_last_response_heaters_on ( u_int_32  heaters_map)

Sets the bit map in the FPGA_Last_Response Element that indicate which CCD heater elements were on during the observation.

Bits 0-13 contain the bit map.

Parameters
heaters_mapA 32-bit integer in which the least significant CCDS contain the heater element map in which a set bit indicates the heater was on.
Returns
This Science_Channel_Header.

References Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_RESPONSE_HEATERS_ON_BIT_MASK, Data_Component::get(), and Data_Component::put().

◆ conversion()

const Science_Channel_Header::Conversion_Coefficients * conversion ( Index  element) const

Gets a Conversion_Coefficients set for an Element.

A Conversion_Coefficients set contains the polynomial coefficients for converting an Element sensor value to standard units, specifies what those units are.

Parameters
elementAn Element Index.
Returns
A Conversion_Coefficients pointer. This will be NULL if the Element has no Conversion_Coefficients.

References Science_Channel_Header::CONVERSION_COEFFICIENTS, Science_Channel_Header::Conversion_Coefficients::element, and Science_Channel_Header::Conversion_Coefficients::units.

Referenced by Science_Channel_Header::convert(), and Science_Channel_Header::converted_units().

◆ convert()

double convert ( Index  element,
Index  index = 0 
) const

Converts an Element sensor value to its standard units.

Parameters
elementAn Element Index.
indexAn array entry index for an Element with more than one value.
Returns
The selected value converted to its standard units. If the Element has no Conversion_Coefficients set the original value will be returned as a double type.
See also
conversion(Index) const
converted_units(Index) const

References Science_Channel_Header::Conversion_Coefficients::coefficient, Science_Channel_Header::conversion(), Data_Component::get(), and Science_Channel_Header::TOTAL_CONVERSION_COEFFICIENTS.

Referenced by Science_Channel_Header::print(), Science_Channel_Header::PVL(), and Observation::PVL_PDS().

◆ converted_units()

const char * converted_units ( Index  element) const

Gets the stadard units of representation for an Element.

Parameters
elementAn Element Index.
Returns
The C-string specifying the Element's standard units. This will be NULL if the Element has no Conversion_Coefficients set.
See also
conversion(Index) const
convert(Index, Index) const

References Science_Channel_Header::conversion(), and Science_Channel_Header::Conversion_Coefficients::units.

Referenced by Science_Channel_Header::print(), Science_Channel_Header::PVL(), and Observation::PVL_PDS().

◆ print()

ostream & print ( std::ostream &  stream = std::cout,
bool  verbose = false 
) const
virtual

Prints the component structure and contents.

Verbose printing includes the class ID and the Pad and Alignment Elements.

Parameters
streamThe ostream where the listing will be written.
verbosetrue if the listing is to be verbose, otherwise some structural details will be omitted for easier human consumption.
Returns
The stream that was written.
See also
Data_Component::print(std::ostream&, bool) const

Implements Data_Component.

References Science_Channel_Header::Alignment, Science_Channel_Header::Analog_Power_On_Start_Time, Science_Channel_Header::Analog_Power_On_Time, Science_Channel_Header::Analog_Power_Operation, Science_Channel_Header::Binning_Command_Received, Science_Channel_Header::Binning_Operation, UA::HiRISE::bits(), Data_Component::BOOLEAN, Instrument::CCD_NAMES, Instrument::CCDS, Science_Channel_Header::Channel, Science_Channel_Header::Channel_Readout_Bytes, Science_Channel_Header::Channel_Readout_Command, Science_Channel_Header::Channel_Readout_Response, Science_Channel_Header::Channel_Readout_Ticks, Science_Channel_Header::Checksum, Science_Channel_Header::CLOSED_LOOP, Science_Channel_Header::convert(), Science_Channel_Header::converted_units(), Data_Block::count_of(), Science_Channel_Header::CPMM, Science_Channel_Header::CPMM_Power_Command_Received, Science_Channel_Header::Default_Binning, Science_Channel_Header::Default_Line_Count, Science_Channel_Header::Default_TDI, Science_Channel_Header::Default_Trimming, Science_Channel_Header::Digital_Power_Operation, Science_Channel_Header::DUTY_CYCLES, Data_Component::element_location_print_width(), Science_Channel_Header::Expose_Command, Science_Channel_Header::Expose_HiRISE_Time, Science_Channel_Header::Expose_MRO_Time, Science_Channel_Header::Expose_Response, Science_Channel_Header::Expose_Time_Command_Received, Science_Channel_Header::Expose_Time_Milliseconds, Science_Channel_Header::Expose_Time_Ticks, Science_Channel_Header::Exposure_Readout_Count, Science_Channel_Header::Exposure_Start_Time, Science_Channel_Header::Extra_Pixels, Science_Channel_Header::Focus_Position, Science_Channel_Header::FPGA_Last_Response, Science_Channel_Header::FPGA_last_response_CPMM_PWS_enabled(), Science_Channel_Header::FPGA_last_response_FM_moving(), Science_Channel_Header::FPGA_last_response_FM_overheated(), Science_Channel_Header::FPGA_last_response_FM_relay_PHA_closed(), Science_Channel_Header::FPGA_last_response_FM_relay_PHB_closed(), Science_Channel_Header::FPGA_last_response_heaters_on(), Science_Channel_Header::FPGA_last_response_stim_LEDs_on(), Science_Channel_Header::FPGA_last_response_telemetry_gathering(), Data_Component::get(), Science_Channel_Header::Heater_Control_Mode, Science_Channel_Header::Heater_Controls, Science_Channel_Header::Heater_Disabled_For_Exposure, Science_Channel_Header::Heater_Zones_Enabled, Science_Channel_Header::Heater_Zones_Pre_Exposure_State, Science_Channel_Header::Heater_Zones_State, Data_Component::HEX, Science_Channel_Header::ID, Science_Channel_Header::IEA_Positive_5_Voltage, Data_Component::internet_checksum(), Science_Channel_Header::Last_Command_Time, Science_Channel_Header::Line_Count_Command_Received, Science_Channel_Header::Line_Count_Operation, Science_Channel_Header::Line_Header_Bytes, Science_Channel_Header::Line_Time_Command_Received, Science_Channel_Header::Line_Time_Nanoseconds, Science_Channel_Header::Line_Time_Operation, Science_Channel_Header::LUT_Command_Received, Science_Channel_Header::LUT_Operation, Science_Channel_Header::Max_Storable_Lines, Science_Channel_Header::Max_Storable_Lines_Exceeded, Science_Channel_Header::NAME, Science_Channel_Header::Optical_Bench_Flexure_Temperature, Science_Channel_Header::Pad_0, Science_Channel_Header::Pad_1, Science_Channel_Header::Pad_2, Science_Channel_Header::Pixel_Bytes, Science_Channel_Header::Pixel_Data_Bytes, Science_Channel_Header::Pixels_Per_Line, Science_Channel_Header::Post_Binned_Lines, Science_Channel_Header::Post_Binned_Pixels_Per_Line, Science_Channel_Header::Powered_CPMMs_Count, Science_Channel_Header::Powered_CPMMs_Map, Data_Component::print_element(), Data_Component::print_element_location(), UA::HiRISE::print_value(), Data_Component::put(), Science_Channel_Header::Readout_Pad_Bytes, Science_Channel_Header::Readout_Start_Time, Instrument::STIMULATOR_LEDS, Science_Channel_Header::Sync, Science_Channel_Header::SYNC, Science_Channel_Header::TDI_Command_Received, Science_Channel_Header::TDI_Operation, Observation_ID::text(), Science_Channel_Header::time(), Science_Channel_Header::Total_Image_Bytes, Science_Channel_Header::Total_Lines_Collected, Science_Channel_Header::Total_Lines_Exposed, Science_Channel_Header::Transaction_ID, Science_Channel_Header::Trimming_Operation, and Data_Block::value_size_of().

Referenced by list_data(), and list_selections().

◆ PVL()

Aggregate * PVL ( ) const
virtual

Produces a PVL rendition of the component.

Elements are organized into logical groupings. The Pad, Alignment and Checksum Elements are not included.

Returns
A pointer to a PVL::Aggregate.
See also
Data_Component::PVL() const

Implements Data_Component.

References Aggregate::add(), Array::add(), Science_Channel_Header::Analog_Power_On_Start_Time, Science_Channel_Header::Analog_Power_On_Time, Science_Channel_Header::Analog_Power_Operation, Science_Channel_Header::Binning_Command_Received, Science_Channel_Header::Binning_Operation, Instrument::CCD_NAMES, Instrument::CCDS, Science_Channel_Header::Channel, Science_Channel_Header::Channel_Readout_Bytes, Science_Channel_Header::Channel_Readout_Command, Science_Channel_Header::Channel_Readout_Response, Science_Channel_Header::Channel_Readout_Ticks, Vectal< T >::clear(), Science_Channel_Header::CLOSED_LOOP, Science_Channel_Header::convert(), Science_Channel_Header::converted_units(), Data_Block::count_of(), Science_Channel_Header::CPMM, Science_Channel_Header::CPMM_Negative_5_Current, Science_Channel_Header::CPMM_Positive_29_Voltage, Science_Channel_Header::CPMM_Power_Command_Received, Science_Channel_Header::CPMM_PWS_Board_Temperature, Science_Channel_Header::Default_Binning, Science_Channel_Header::Default_TDI, Science_Channel_Header::Digital_Power_Operation, Science_Channel_Header::DUTY_CYCLES, Science_Channel_Header::Expose_Command, Science_Channel_Header::Expose_HiRISE_Time, Science_Channel_Header::Expose_MRO_Time, Science_Channel_Header::Expose_Response, Science_Channel_Header::Expose_Time_Milliseconds, Science_Channel_Header::Expose_Time_Ticks, Science_Channel_Header::Exposure_Readout_Count, Science_Channel_Header::Exposure_Start_Time, Science_Channel_Header::Extra_Pixels, Science_Channel_Header::Focus_Motor_Temperature, Science_Channel_Header::Focus_Position, Science_Channel_Header::FPGA_last_response_CPMM_PWS_enabled(), Science_Channel_Header::FPGA_last_response_FM_moving(), Science_Channel_Header::FPGA_last_response_FM_overheated(), Science_Channel_Header::FPGA_last_response_FM_relay_PHA_closed(), Science_Channel_Header::FPGA_last_response_FM_relay_PHB_closed(), Science_Channel_Header::FPGA_last_response_heaters_on(), Science_Channel_Header::FPGA_last_response_stim_LEDs_on(), Science_Channel_Header::FPGA_last_response_telemetry_gathering(), Data_Component::get(), Science_Channel_Header::Heater_Control_Mode, Science_Channel_Header::Heater_Controls, Science_Channel_Header::Heater_Current, Science_Channel_Header::Heater_Disabled_For_Exposure, Science_Channel_Header::Heater_Zones_Enabled, Science_Channel_Header::Heater_Zones_Pre_Exposure_State, Science_Channel_Header::Heater_Zones_State, Science_Channel_Header::IE_PWS_Board_Temperature, Science_Channel_Header::IEA_Positive_5_Voltage, Science_Channel_Header::Instrument_Control_Board_Temperature, Science_Channel_Header::Instrument_Control_FPGA_Positive_2_5_Voltage, Science_Channel_Header::Last_Command_Time, Science_Channel_Header::Line_Count_Command_Received, Science_Channel_Header::Line_Count_Operation, Science_Channel_Header::Line_Header_Bytes, Science_Channel_Header::Line_Time_Command_Received, Science_Channel_Header::Line_Time_Nanoseconds, Science_Channel_Header::Line_Time_Operation, Science_Channel_Header::LUT_Operation, Science_Channel_Header::Max_Storable_Lines, Science_Channel_Header::Max_Storable_Lines_Exceeded, Science_Channel_Header::Mech_TLM_Board_Temperature, Science_Channel_Header::NAME, Science_Channel_Header::NAMES, Science_Channel_Header::Optical_Bench_Flexure_Temperature, Science_Channel_Header::Pixel_Bytes, Science_Channel_Header::Pixel_Data_Bytes, Science_Channel_Header::Pixels_Per_Line, Science_Channel_Header::Post_Binned_Lines, Science_Channel_Header::Post_Binned_Pixels_Per_Line, Science_Channel_Header::Powered_CPMMs_Count, Science_Channel_Header::Powered_CPMMs_Map, Science_Channel_Header::Readout_Pad_Bytes, Science_Channel_Header::Readout_Start_Time, Instrument::STIMULATOR_LEDS, Science_Channel_Header::TDI_Command_Received, Science_Channel_Header::TDI_Operation, Science_Channel_Header::time(), Science_Channel_Header::Total_Image_Bytes, Science_Channel_Header::Total_Lines_Collected, Science_Channel_Header::Total_Lines_Exposed, Science_Channel_Header::Transaction_ID, Science_Channel_Header::Trimming_Operation, Value::units(), and Data_Block::value_size_of().

Referenced by list_selections().

◆ PVL_description()

Aggregate * PVL_description ( ) const

Produces a PVL description of the component for a PDS label.

The description is an OBJECT that contains the basic PDS parameters required to describe a data product binary data object. The detailed description is referenced as being in an external file named with the value of FORMAT_FILENAME.

Returns
A pointer to a PVL::Aggregate. The object pointed to is a copy of an internal static object.

References Science_Channel_Header::FORMAT_FILENAME, Parser::get_parameters(), Science_Channel_Header::ID, and UA::HiRISE::PVL_value().

Referenced by Observation::PVL_PDS().

◆ is_valid()

bool is_valid ( ) const
virtual

Tests if the component data is valid.

The Sync Element values must equal the expected SYNC constants and the internet_checksum should produce a zero value.

Returns
true if the component has valid data; false otherwise.
See also
Data_Component::internet_checksum() const

Implements Data_Component.

References Data_Component::get(), Data_Component::internet_checksum(), Science_Channel_Header::Sync, and Science_Channel_Header::SYNC.

◆ is_sync()

bool is_sync ( const void *  data_at)
static

Tests if some data contains a sync sequence.

The data must contain at least two 32-bit, MSB ordered, values each of which is a Science_Channel_Header::SYNC value for the test to be true.

Parameters
data_atA pointer to the data to be tested.
Returns
true if the data contains two sequential SYNC values; false otherwise.

References Data_Block::MSB, Data_Block::native_order(), Science_Channel_Header::SYNC, and Science_Channel_Header::SYNC_BYTES.

Referenced by Science_Channel_Header::sync_at().

◆ sync_at()

void * sync_at ( void *  begin,
void *  end 
)
static

Searches a range of bytes for a Science Channel Header sync pattern.

N.B.: If the search range does not have at least at least enough bytes to contain the sync pattern (i.e. SYNC_BYTES) then no search can be done. The last byte sequence that will be checked starts at end - SYNC_BYTES. The bytes following this location may contain the beginning of a sync pattern, but this will not produce a match.

Parameters
beginA pointer to the beginning of the search range.
endA pointer to the end of the search range; i.e. the location immediately following the last byte in the search range.
Returns
A pointer to the sync pattern. This will be NULL if no sync pattern was found.
See also
is_sync()

References Science_Channel_Header::is_sync(), and Science_Channel_Header::SYNC_BYTES.

Member Data Documentation

◆ ID

const char *const ID
static
Initial value:
=
"UA::HiRISE::Science_Channel_Header (1.54 2020/05/12 22:59:48)"

Class identification name with source code version and date.

Referenced by Science_Channel_Header::clock_count(), Science_Channel_Header::id(), main(), Science_Channel_Header::print(), and Science_Channel_Header::PVL_description().

◆ NAME

const char *const NAME = "Science Channel Header"
static

◆ NAMES

const char * NAMES
static

◆ COMPONENT_BYTES

const Index COMPONENT_BYTES = SCIENCE_CHANNEL_HEADER_BYTES
static

Total number of bytes in the Data_Block.

Referenced by Observation::components(), Observation::line(), and Observation::PVL_PDS().

◆ OFFSETS

const Index OFFSETS
static

Data_Block data storage address offset for each Element.

◆ ARRAY_COUNTS

const Index ARRAY_COUNTS
static
Initial value:
=
{
{Sync, 2},
{Alignment, 2},
{Pad_0, 8},
{Pad_1, 12},
{Pad_2, 126},
{0,0}
}
static const unsigned int CCDS
static const unsigned int CCD_CHANNELS
@ LUT_Operation
Definition: Science_Channel_Header.hh:303
@ Pad_0
Definition: Science_Channel_Header.hh:296
@ Pad_2
Definition: Science_Channel_Header.hh:398
@ Channel_Readout_Response
Definition: Science_Channel_Header.hh:321
@ Trimming_Operation
Definition: Science_Channel_Header.hh:299
@ Last_Command_Time
Definition: Science_Channel_Header.hh:397
@ Analog_Power_Operation
Definition: Science_Channel_Header.hh:298
@ Expose_HiRISE_Time
Definition: Science_Channel_Header.hh:279
@ TDI_Operation
Definition: Science_Channel_Header.hh:300
@ Heater_Controls
Definition: Science_Channel_Header.hh:396
@ Readout_Start_Time
Definition: Science_Channel_Header.hh:306
@ Pad_1
Definition: Science_Channel_Header.hh:322
@ Line_Time_Operation
Definition: Science_Channel_Header.hh:286
@ Exposure_Start_Time
Definition: Science_Channel_Header.hh:282
@ Sync
Definition: Science_Channel_Header.hh:268
@ Analog_Power_On_Time
Definition: Science_Channel_Header.hh:280
@ Line_Count_Operation
Definition: Science_Channel_Header.hh:301
@ Alignment
Definition: Science_Channel_Header.hh:271
@ Analog_Power_On_Start_Time
Definition: Science_Channel_Header.hh:281
@ Binning_Operation
Definition: Science_Channel_Header.hh:302
@ Digital_Power_Operation
Definition: Science_Channel_Header.hh:297
@ Channel_Readout_Command
Definition: Science_Channel_Header.hh:320
@ Expose_MRO_Time
Definition: Science_Channel_Header.hh:278

Data_Block array element value counts each keyed to an Element Index.

All values of an array element are the same size (the total size of the Element divided by the count of array entries). Any Element not listed here has only one value.

ARRAY_COUNTS[*][0]
An Element Index.
ARRAY_COUNTS[*][1]
The number of array values for the indexed Element.
This list must be zero-terminated.

@see    Data_Block::size_of(Index)
@see    Data_Block::count_of(Index)

◆ SYNC

const u_int_32 SYNC = 0xFFFF0000
static

◆ SYNC_BYTES

const int SYNC_BYTES = 2 * sizeof (SYNC)
static

The number of bytes in the sync pattern.

Referenced by Science_Channel_Header::is_sync(), and Science_Channel_Header::sync_at().

◆ FPGA_RESPONSE_CPMM_PWS_ENABLED_BIT_MASK

const u_int_32 FPGA_RESPONSE_CPMM_PWS_ENABLED_BIT_MASK = (1 << 22)
static

FPGA_Last_Response Element bit fields.

Referenced by Science_Channel_Header::FPGA_last_response_CPMM_PWS_enabled().

◆ FPGA_RESPONSE_TELEMETRY_GATHERING_BIT_MASK

const u_int_32 FPGA_RESPONSE_TELEMETRY_GATHERING_BIT_MASK = (1 << 21)
static

◆ FPGA_RESPONSE_FM_RELAY_PHB_CLOSED_BIT_MASK

const u_int_32 FPGA_RESPONSE_FM_RELAY_PHB_CLOSED_BIT_MASK = (1 << 20)
static

◆ FPGA_RESPONSE_FM_RELAY_PHA_CLOSED_BIT_MASK

const u_int_32 FPGA_RESPONSE_FM_RELAY_PHA_CLOSED_BIT_MASK = (1 << 19)
static

◆ FPGA_RESPONSE_FM_OVERHEATED_BIT_MASK

const u_int_32 FPGA_RESPONSE_FM_OVERHEATED_BIT_MASK = (1 << 18)
static

◆ FPGA_RESPONSE_FM_MOVING_BIT_MASK

const u_int_32 FPGA_RESPONSE_FM_MOVING_BIT_MASK = (1 << 17)
static

◆ FPGA_RESPONSE_STIM_LEDS_BIT_MASK

const u_int_32 FPGA_RESPONSE_STIM_LEDS_BIT_MASK
static
Initial value:
= ((1 << 16) |
(1 << 15) |
(1 << 14))

Referenced by Science_Channel_Header::FPGA_last_response_stim_LEDs_on().

◆ FPGA_RESPONSE_STIM_LEDS_BIT_MASK_SHIFT

const u_int_32 FPGA_RESPONSE_STIM_LEDS_BIT_MASK_SHIFT = 14
static

◆ FPGA_RESPONSE_HEATERS_ON_BIT_MASK

const u_int_32 FPGA_RESPONSE_HEATERS_ON_BIT_MASK = 0x3FFF
static

◆ CONVERSION_COEFFICIENTS

const Science_Channel_Header::Conversion_Coefficients CONVERSION_COEFFICIENTS
static

◆ CELSIUS_TO_KELVINS_OFFSET

const double CELSIUS_TO_KELVINS_OFFSET
static

Offset to be added to Celsius degrees to obtain Kelvins.

◆ FORMAT_FILENAME

const char *const FORMAT_FILENAME = SCIENCE_CHANNEL_HEADER_FORMAT_FILE
static

The name of the external PDS format description file.

Referenced by Science_Channel_Header::PVL_description().


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