grs.pds.and
Class NsAveragedRecord

java.lang.Object
  |
  +--grs.pds.BasePdsRecord
        |
        +--grs.pds.SpatialSeriesRecord
              |
              +--grs.pds.SeasonalSeriesRecord
                    |
                    +--grs.pds.and.NsAveragedRecord
All Implemented Interfaces:
PdsRecord

public class NsAveragedRecord
extends SeasonalSeriesRecord

AND : Averaged Neutron Data. Product will contain fluxes for thermal, epithermal and fast neutrons over Martian seasons (15° of Ls) The table will contain the flux values for each cell in a 5°x5° grid. E.g. the first row will contain the data for the cell centered on +87.5°, 2.5°E, the second row will be centered on +82.5°, 7.5°E and so on, progressing eastward then southward.

Author:
guym

Field Summary
 float cepi
           
 float cfast
           
 float ctherm
          centerpoint longitude of 5x5 cell
 float latitude
           
 float longitude
          centerpoint latitude of 5x5 cell
 int mars_year
           
 float nepi
           
 float nfast
           
 float ntherm
           
 long sc_start_time
           
 long sc_stop_time
           
 int season
           
 float sepi
           
 float sfast
           
 float stherm
           
 Date utc_start_time
           
 Date utc_stop_time
           
 
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
NsAveragedRecord(DataInputStream in)
          Read values in from a data input stream.
NsAveragedRecord(ResultSet rs)
          Constructor for NsDerivedRecord.
 
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 to fetch AND records.
 long getSCLKStart()
          Return start time of record.
 long getSCLKStop()
          Return stop time of record.
 Date getUTCStart()
          Get start time of this record.
 Date getUTCStop()
          Get stop time of this record.
static void main(String[] args)
          Demonstrates use of this class to parse an AND file.
 int prepareInsert(PreparedStatement pstmt)
          Bind values insert AND records into the pds schema.
 String[] toStringArray()
          Subclasses will override this to display records as text, suitable for display.
 void writeTo(DataOutputStream out)
          Write this record in binary format.
 
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

utc_start_time

public Date utc_start_time

utc_stop_time

public Date utc_stop_time

sc_start_time

public long sc_start_time

sc_stop_time

public long sc_stop_time

mars_year

public int mars_year

season

public int season

latitude

public float latitude

longitude

public float longitude
centerpoint latitude of 5x5 cell


ctherm

public float ctherm
centerpoint longitude of 5x5 cell


ntherm

public float ntherm

stherm

public float stherm

cepi

public float cepi

nepi

public float nepi

sepi

public float sepi

cfast

public float cfast

nfast

public float nfast

sfast

public float sfast
Constructor Detail

NsAveragedRecord

public NsAveragedRecord(ResultSet rs)
                 throws SQLException
Constructor for NsDerivedRecord.

Parameters:
rs -

NsAveragedRecord

public NsAveragedRecord(DataInputStream in)
                 throws IOException
Read values in from a data input stream.

Throws:
IOException - Could not read from stream.
Method Detail

createSelectString

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

Parameters:
schema - Schema to use (e.g. "map1").
Returns:
SQL to be used in PreparedStatement

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 insert AND records into the pds schema.

Specified by:
prepareInsert in class BasePdsRecord
Parameters:
pstmt -
Returns:
number of columns bound
Throws:
SQLException

toStringArray

public String[] toStringArray()
Description copied from class: BasePdsRecord
Subclasses will override this to display records as text, suitable for display.

Specified by:
toStringArray in class BasePdsRecord
Returns:
Array of column values.

getSCLKStart

public long getSCLKStart()
Return start time of record.

Specified by:
getSCLKStart in class SeasonalSeriesRecord
Returns:
ticks

getSCLKStop

public long getSCLKStop()
Return stop time of record.

Specified by:
getSCLKStop in class SeasonalSeriesRecord
Returns:
ticks

getUTCStart

public Date getUTCStart()
Get start time of this record.

Specified by:
getUTCStart in class SeasonalSeriesRecord
Returns:
UNIX time

getUTCStop

public Date getUTCStop()
Get stop time of this record.

Specified by:
getUTCStop in class SeasonalSeriesRecord
Returns:
UNIX time

writeTo

public void writeTo(DataOutputStream out)
             throws IOException
Write this record in binary format.

Specified by:
writeTo in class BasePdsRecord
Parameters:
out - Stream to write to.
Throws:
IOException - Could not write to stream.

main

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

Parameters:
args - Filename
Exception


2001 Mars Odyssey Gamma Ray Spectrometer Team