grs.pds.cgs
Class CorrectedGammaSpectraRecord

java.lang.Object
  |
  +--grs.pds.BasePdsRecord
        |
        +--grs.pds.TimeSeriesRecord
              |
              +--grs.pds.cgs.CorrectedGammaSpectraRecord
All Implemented Interfaces:
PdsRecord

public class CorrectedGammaSpectraRecord
extends TimeSeriesRecord

CGS: Corrected Gamma Spectrum.


Field Summary
 short apps_gain_dhk
           
 float b170k_norm_temp
           
 float b170k_temp
           
 float b170k_tempco
           
 long bad_code
          defined in bad_flags.txt
 long ceb_time
          GRS CEB count in milliseconds
 byte[] corrected_spectrum
          the corrected gamma spectrum
 short day_index
          mars day of year
 double delta_angle
          pointing angle in degrees from
 short first_channel
          first valid channel, typically zero
 short first_full_channel
           
 float gain
          target gain and offset
 float gain_correction
           
 float gamma_vref_temp
           
 double[] gpa_coefficients
           
 float gpa_temp
           
 int grs_orbit_number
          GRS orbit number
 int grs_pixel_number
          pixel number since the start of GRS orbit number
 float hvbs_monitor
           
 double[] inl_coefficients
           
 RCoords instrboresight_mars
          instrument normal vector
 byte intersecting
          1 = pointed at planet, 0 = not
 float is_norm_temp
           
 float is_temp_a
          smoothed, interpolated engineering values
 float is_temp_b
          smoothed, interpolated engineering values
 float is_tempco
           
 int l1_cntr
           
 int l2_cntr
           
 int l3_cntr
           
 short last_channel
          last valid channel, typically 16383
 short last_full_channel
           
 double latitude
          centerpoint latitude (degrees)
 int lld_cntr
           
 byte local_hour
          position of sun at sub-spacecraft point
 byte local_min
          position of sun at sub-spacecraft point
 double longitude
          centerpoint longitude, east (degrees)
 double mars_sol
          solar longitude
 int ody_orbit_number
          spacecraft orbit number
 float offset
          target gain and offset
 float offset_correction
           
 float os_temp_a
          smoothed, interpolated engineering values
 float os_temp_b
          smoothed, interpolated engineering values
 int pha_cntr
           
 long pha_timer
           
 short pixel_duration
          collection interval
 byte pointing
          1 = pointing data available, 0 = not
 long sc_ev_time
          middle of the pixel interval, in ticks
 long sc_recv_time
          time packet was recieved by spacecraft, in ticks
 double scalt
          spacecraft altitude
static int SPECTRUM_LENGTH
          number of bytes in gamma spectrum
 RCoords subsc_pos_mars
          vector from planet center to nadir intersection
 int uld_cntr
           
 Date utc
          sc_ev_time in UTC
 
Fields inherited from class grs.pds.BasePdsRecord
PdsTimeFormat
 
Fields inherited from interface grs.pds.PdsRecord
GAMMA_CHANNELS, int10, int12, int2, int3, logger, MESSAGE_LENGTH, NS_MAX_EVENTS, PEF_COMMANDS, prec10, prec12, prec13, prec14, prec15, prec16, prec17, prec5, prec6, prec7, PROFILE_LENGTH, PROFILE_SIZE, PULSER_CHANNELS, QUERY_DATE_FMT, SC_ID
 
Constructor Summary
CorrectedGammaSpectraRecord(DataInputStream in)
          Read CGS record from binary stream.
CorrectedGammaSpectraRecord(ResultSet rs)
          Create a CGS record from a database ResultSet.
 
Method Summary
static String[] createInsertString(String schema)
          Create the SQL to insert CGS records into the PDS schema.
static String[] createSelectString(String schema)
          Create the SQL to fetch CGS records.
 long getSCLK()
          The time of this record.
 Date getUTC()
          Get the UTC time that this record was observed on.
static void main(String[] args)
          Demonstrates use of this class to parse a CGS file.
 int prepareInsert(PreparedStatement pstmt)
          Bind values to the insert statement.
 String[] toStringArray()
          Fetch this record as an array of strings.
 void writeTo(DataOutputStream out)
          Write this record to a stream in the format specified in the label.
 
Methods inherited from class grs.pds.BasePdsRecord
endianSwapShort
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECTRUM_LENGTH

public static final int SPECTRUM_LENGTH
number of bytes in gamma spectrum

See Also:
Constant Field Values

sc_recv_time

public long sc_recv_time
time packet was recieved by spacecraft, in ticks


sc_ev_time

public long sc_ev_time
middle of the pixel interval, in ticks


ceb_time

public long ceb_time
GRS CEB count in milliseconds


utc

public Date utc
sc_ev_time in UTC


pixel_duration

public short pixel_duration
collection interval


grs_pixel_number

public int grs_pixel_number
pixel number since the start of GRS orbit number


grs_orbit_number

public int grs_orbit_number
GRS orbit number


ody_orbit_number

public int ody_orbit_number
spacecraft orbit number


latitude

public double latitude
centerpoint latitude (degrees)


longitude

public double longitude
centerpoint longitude, east (degrees)


instrboresight_mars

public RCoords instrboresight_mars
instrument normal vector


subsc_pos_mars

public RCoords subsc_pos_mars
vector from planet center to nadir intersection


scalt

public double scalt
spacecraft altitude


delta_angle

public double delta_angle
pointing angle in degrees from


mars_sol

public double mars_sol
solar longitude


day_index

public short day_index
mars day of year


local_hour

public byte local_hour
position of sun at sub-spacecraft point


local_min

public byte local_min
position of sun at sub-spacecraft point


is_temp_a

public float is_temp_a
smoothed, interpolated engineering values


is_temp_b

public float is_temp_b
smoothed, interpolated engineering values


os_temp_a

public float os_temp_a
smoothed, interpolated engineering values


os_temp_b

public float os_temp_b
smoothed, interpolated engineering values


b170k_temp

public float b170k_temp

b170k_norm_temp

public float b170k_norm_temp

is_norm_temp

public float is_norm_temp

gpa_temp

public float gpa_temp

gamma_vref_temp

public float gamma_vref_temp

is_tempco

public float is_tempco

b170k_tempco

public float b170k_tempco

hvbs_monitor

public float hvbs_monitor

apps_gain_dhk

public short apps_gain_dhk

lld_cntr

public int lld_cntr

uld_cntr

public int uld_cntr

l1_cntr

public int l1_cntr

l2_cntr

public int l2_cntr

l3_cntr

public int l3_cntr

pha_cntr

public int pha_cntr

pha_timer

public long pha_timer

first_channel

public short first_channel
first valid channel, typically zero


last_channel

public short last_channel
last valid channel, typically 16383


first_full_channel

public short first_full_channel

last_full_channel

public short last_full_channel

gain

public float gain
target gain and offset


offset

public float offset
target gain and offset


gain_correction

public float gain_correction

offset_correction

public float offset_correction

gpa_coefficients

public double[] gpa_coefficients

inl_coefficients

public double[] inl_coefficients

corrected_spectrum

public byte[] corrected_spectrum
the corrected gamma spectrum


bad_code

public long bad_code
defined in bad_flags.txt


pointing

public byte pointing
1 = pointing data available, 0 = not


intersecting

public byte intersecting
1 = pointed at planet, 0 = not

Constructor Detail

CorrectedGammaSpectraRecord

public CorrectedGammaSpectraRecord(ResultSet rs)
                            throws SQLException
Create a CGS record from a database ResultSet.

Parameters:
rs - ResultSet from query.
Throws:
SQLException - Error reading from ResultSet.

CorrectedGammaSpectraRecord

public CorrectedGammaSpectraRecord(DataInputStream in)
                            throws IOException,
                                   ParseException
Read CGS record from binary stream.

Parameters:
in - Stream in CGS format.
Throws:
IOException - Error reading from stream.
ParseException - Unparseable date (utc)
Method Detail

getSCLK

public long getSCLK()
The time of this record.

Specified by:
getSCLK in class TimeSeriesRecord
Returns:
ticks

getUTC

public Date getUTC()
Description copied from class: TimeSeriesRecord
Get the UTC time that this record was observed on.

Specified by:
getUTC in class TimeSeriesRecord
Returns:
UTC.

toStringArray

public String[] toStringArray()
Fetch this record as an array of strings.

Specified by:
toStringArray in class BasePdsRecord
Returns:
Single row, one value per column.

createSelectString

public static String[] createSelectString(String schema)
Create the SQL to fetch CGS records.

Parameters:
schema - DB schema to use.
Returns:
SQL query strings.

createInsertString

public static String[] createInsertString(String schema)
Create the SQL to insert CGS records into the PDS schema.

Parameters:
schema - DB schema to use.
Returns:
SQL insert strings.

prepareInsert

public int prepareInsert(PreparedStatement pstmt)
                  throws SQLException
Bind values to the insert statement.

Specified by:
prepareInsert in class BasePdsRecord
Parameters:
pstmt -
Returns:
Number of values bound.
Throws:
SQLException

writeTo

public void writeTo(DataOutputStream out)
             throws IOException
Write this record to a stream in the format specified in the label.

Specified by:
writeTo in class BasePdsRecord
Parameters:
out - Data stream to write to.
Throws:
IOException - Error writing to stream.

main

public static final void main(String[] args)
                       throws Exception
Demonstrates use of this class to parse a CGS file.

Parameters:
args - Filename
Exception


2001 Mars Odyssey Gamma Ray Spectrometer Team