grs.pds.edr
Class NsEdrRecord

java.lang.Object
  |
  +--grs.pds.BasePdsRecord
        |
        +--grs.pds.TimeSeriesRecord
              |
              +--grs.pds.edr.PositionedEdrRecord
                    |
                    +--grs.pds.edr.NsEdrRecord
All Implemented Interfaces:
PdsRecord

public class NsEdrRecord
extends PositionedEdrRecord

Neutron Spectrometer records from the ns_hist_tab.

Version:
$Revision: 1.5 $
Author:
$Author: guym $

Field Summary
 long bad_code
           
 byte[] cat1_1_hist
           
 byte[] cat1_2_hist
           
 byte[] cat1_3_hist
           
 int cat1_3seg_cnt
           
 byte[] cat1_4_hist
           
 int cat1_4seg_cnt
           
 byte[] cat1_sum_hist
           
 int cat2_3seg_cnt
           
 int cat2_4seg_cnt
           
 int cat2_cnt
           
 byte[] cat2_early_1_hist
           
 byte[] cat2_early_2_hist
           
 byte[] cat2_early_3_hist
           
 byte[] cat2_early_4_hist
           
 byte[] cat2_early_sum_hist
           
 byte[] cat2_late_1_hist
           
 byte[] cat2_late_2_hist
           
 byte[] cat2_late_3_hist
           
 byte[] cat2_late_4_hist
           
 byte[] cat2_late_sum_hist
           
 byte counter
           
 long dead_cnt
           
 int early_2nd_pulse_cnt
           
 int early_time
           
 Event[] events
           
 int gcr_cnt
           
 byte grs_compressed
           
 int late_time
           
 byte ns_compressed
           
 short ns_instrument_memory_side
           
 
Fields inherited from class grs.pds.edr.PositionedEdrRecord
ceb_time, day_index, delta_theta, instrboresight_mars, intersecting, latitude, local_hour, local_min, longitude, mars_sol, marspos_instr, marsvel_instr, ody_orbit, orbit, pixel, pointing, sc_ev_time, sc_recv_time, scalt, scpos_inert, scpos_mars, scvel_inert, subsc_mars, 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
NsEdrRecord(DataInputStream in)
          Construct a NsEdrRecord from a DataInputStream source.
NsEdrRecord(ResultSet rs)
          Construct record using a ResultSet.
 
Method Summary
static String[] createInsertString(String schema)
          Create the SQL query used to insert gamma data into the PDS schema.
static String[] createSelectString(String schema)
          Create the SQL query string for ns records.
static void main(String[] args)
          Demonstrates use of this class to parse an Ns EDR record.
 int prepareInsert(PreparedStatement pstmt)
          Bind values to the PreparedStatement
 String[] toStringArray()
          Print this record to a String array.
 void writeTo(DataOutputStream out)
          Write data out to DataOutputStream.
 
Methods inherited from class grs.pds.edr.PositionedEdrRecord
getSCLK, getUTC, readHeader, readHeader, toStringArray
 
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

bad_code

public long bad_code

counter

public byte counter

ns_compressed

public byte ns_compressed

grs_compressed

public byte grs_compressed

ns_instrument_memory_side

public short ns_instrument_memory_side

early_time

public int early_time

late_time

public int late_time

dead_cnt

public long dead_cnt

gcr_cnt

public int gcr_cnt

early_2nd_pulse_cnt

public int early_2nd_pulse_cnt

cat1_3seg_cnt

public int cat1_3seg_cnt

cat1_4seg_cnt

public int cat1_4seg_cnt

cat2_3seg_cnt

public int cat2_3seg_cnt

cat2_4seg_cnt

public int cat2_4seg_cnt

cat2_cnt

public int cat2_cnt

cat1_1_hist

public byte[] cat1_1_hist

cat1_2_hist

public byte[] cat1_2_hist

cat1_3_hist

public byte[] cat1_3_hist

cat1_4_hist

public byte[] cat1_4_hist

cat1_sum_hist

public byte[] cat1_sum_hist

cat2_early_1_hist

public byte[] cat2_early_1_hist

cat2_early_2_hist

public byte[] cat2_early_2_hist

cat2_early_3_hist

public byte[] cat2_early_3_hist

cat2_early_4_hist

public byte[] cat2_early_4_hist

cat2_early_sum_hist

public byte[] cat2_early_sum_hist

cat2_late_1_hist

public byte[] cat2_late_1_hist

cat2_late_2_hist

public byte[] cat2_late_2_hist

cat2_late_3_hist

public byte[] cat2_late_3_hist

cat2_late_4_hist

public byte[] cat2_late_4_hist

cat2_late_sum_hist

public byte[] cat2_late_sum_hist

events

public Event[] events
Constructor Detail

NsEdrRecord

public NsEdrRecord(DataInputStream in)
            throws IOException,
                   ParseException
Construct a NsEdrRecord from a DataInputStream source.

Parameters:
in - Stream to read from.
Throws:
IOException - error reading from the stream.
ParseException - UTC date from stream is in an invalid format.

NsEdrRecord

public NsEdrRecord(ResultSet rs)
            throws SQLException
Construct record using a ResultSet.

Parameters:
rs - ResultSet to read from.
Throws:
SQLException - Error reading from ResultSet.
See Also:
createSelectString(java.lang.String)
Method Detail

createSelectString

public static String[] createSelectString(String schema)
Create the SQL query string for ns records.

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

createInsertString

public static String[] createInsertString(String schema)
Create the SQL query used to insert gamma data into the PDS schema.

Parameters:
schema - DB Schema to use.
Returns:
SQL query array.

prepareInsert

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

Overrides:
prepareInsert in class PositionedEdrRecord
Parameters:
pstmt - prepared statement
Returns:
number of values bound
Throws:
SQLException - Error in binding binding

writeTo

public void writeTo(DataOutputStream out)
             throws IOException
Write data out to DataOutputStream.

Overrides:
writeTo in class PositionedEdrRecord
Parameters:
out - Stream to write to.
Throws:
IOException - Error writing to stream.

toStringArray

public String[] toStringArray()
Print this record to a String array. Does not display histograms, or events data.

Specified by:
toStringArray in class BasePdsRecord
Returns:
Fields and values.

main

public static final void main(String[] args)
Demonstrates use of this class to parse an Ns EDR record.

Parameters:
args - Filename


2001 Mars Odyssey Gamma Ray Spectrometer Team