HiRISE

HiRISE.HiPlan.HiTemp
Class Temperature_Profile

java.lang.Object
  extended by HiRISE.HiPlan.HiTemp.Temperature_Profile

public class Temperature_Profile
extends Object

A set of data representing the temperature profile of the HiRISE focal plane assembly (FPA) and focal planet electronics assembly (FPEA) over an interval of time. The profile contains regularly sampled data from the HiRISE thermal model as well as peak data. Each sample consists of a time, an FPA temperature, and an FPEA temperature. Temperature is in units of degrees Celsius.

The toXySeries(Sensor,boolean) method may be used to create a JFreeChart XYSeries for either the FPA temperatures or the FPEA temperatures. The series is suitable for plotting in a JFreeChart.

Version:
1.19
Author:
Christian Schaller - UA/PIRL

Nested Class Summary
static class Temperature_Profile.Data
          A data sample from the HiTemp temperature profile.
static class Temperature_Profile.Sensor
          An enumeration of the sensor points in the temperature profile.
 
Field Summary
static int DEFAULT_INITIAL_CAPACITY
          The default initial capacity of the regular samples list.
static String ID
          Class identification name with source code version and date.
 
Constructor Summary
Temperature_Profile()
          Creates a temperature profile with a default initial sample capacity.
Temperature_Profile(int initialCapacity)
          Creates a new temperature profile with a specified initial sample capacity.
 
Method Summary
 void addPeak(Date date, double fpaTemperature, double fpeaTemperature)
           
 void addPeak(Date date, Temperatures temperatures)
           
 void addPeak(long millis, double fpaTemperature, double fpeaTemperature)
           
 void addPeak(long millis, Temperatures temperatures)
           
 void addPeak(Temperature_Profile.Data data)
           
 void addSample(Date date, double fpaTemperature, double fpeaTemperature)
           
 void addSample(Date date, Temperatures temperatures)
           
 void addSample(long millis, double fpaTemperature, double fpeaTemperature)
           
 void addSample(long millis, Temperatures temperatures)
           
 void addSample(Temperature_Profile.Data data)
           
 void exportToFile(File file, Thermal_Model thermalModel, Double initialFpaTemperature, Double initialFpeaTemperature)
           
 List<Temperature_Profile.Data> getAllData()
          Gets the union of sampled and peak data from the profile.
 List<Temperature_Profile.Data> getFpaPeaks(double threshold)
          Gets every peak temperature point with an FPA temperature above a given threshold.
 List<Temperature_Profile.Data> getFpeaPeaks(double threshold)
          Gets every peak temperature point with an FPEA temperature above a given threshold.
 List<Temperature_Profile.Data> getPeaks()
          Gets every peak temperature point in the profile.
 List<Temperature_Profile.Data> getSamples()
          Gets the regularly sampled data.
 double getStartTime()
          Gets the start time of this data set in seconds.
 double getStopTime()
          Gets the stop time of this data set in seconds.
 XYSeries toXySeries(Temperature_Profile.Sensor sensor, boolean useMillis)
          Creates an XY data series from this temperature profile for one of its measured sensors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

DEFAULT_INITIAL_CAPACITY

public static final int DEFAULT_INITIAL_CAPACITY
The default initial capacity of the regular samples list.

See Also:
Constant Field Values
Constructor Detail

Temperature_Profile

public Temperature_Profile(int initialCapacity)
Creates a new temperature profile with a specified initial sample capacity. This initial capacity should be at least as large as the number of regular model samples to be stored in this profile.

Parameters:
initialCapacity - the initial sample capacity.

Temperature_Profile

public Temperature_Profile()
Creates a temperature profile with a default initial sample capacity.

See Also:
DEFAULT_INITIAL_CAPACITY
Method Detail

addSample

public void addSample(Temperature_Profile.Data data)

addSample

public void addSample(Date date,
                      Temperatures temperatures)

addSample

public void addSample(Date date,
                      double fpaTemperature,
                      double fpeaTemperature)

addSample

public void addSample(long millis,
                      Temperatures temperatures)

addSample

public void addSample(long millis,
                      double fpaTemperature,
                      double fpeaTemperature)

getSamples

public List<Temperature_Profile.Data> getSamples()
Gets the regularly sampled data.

Returns:
the regularly sampled data.

addPeak

public void addPeak(Temperature_Profile.Data data)

addPeak

public void addPeak(Date date,
                    Temperatures temperatures)

addPeak

public void addPeak(Date date,
                    double fpaTemperature,
                    double fpeaTemperature)

addPeak

public void addPeak(long millis,
                    Temperatures temperatures)

addPeak

public void addPeak(long millis,
                    double fpaTemperature,
                    double fpeaTemperature)

getPeaks

public List<Temperature_Profile.Data> getPeaks()
Gets every peak temperature point in the profile.

Returns:
all peak temperature points.

getFpaPeaks

public List<Temperature_Profile.Data> getFpaPeaks(double threshold)
Gets every peak temperature point with an FPA temperature above a given threshold. The returned list is sorted by date.

Parameters:
threshold - the threshold temperature.
Returns:
all peak data with an FPA temperature above the threshold.

getFpeaPeaks

public List<Temperature_Profile.Data> getFpeaPeaks(double threshold)
Gets every peak temperature point with an FPEA temperature above a given threshold. The returned list is sorted by date.

Parameters:
threshold - the threshold temperature.
Returns:
all peak data with an FPEA temperature above the threshold.

getAllData

public List<Temperature_Profile.Data> getAllData()
Gets the union of sampled and peak data from the profile. The returned list is sorted by date, and duplicates are removed.

Returns:
the union of all data in the profile.

getStartTime

public double getStartTime()
Gets the start time of this data set in seconds. This time is the earliest point in the set, either sampled data or peak data.

Returns:
the earliest time of the data set in seconds.

getStopTime

public double getStopTime()
Gets the stop time of this data set in seconds. This time is the latest point in the set, either sampled data or peak data.

Returns:
the latest time of the data set in seconds.

toXySeries

public XYSeries toXySeries(Temperature_Profile.Sensor sensor,
                           boolean useMillis)
Creates an XY data series from this temperature profile for one of its measured sensors. The series is suitable for plotting in a JFreeChart.

The x-axis is time. If useMillis is true, the time is converted from seconds to milliseconds, which is useful for a JFreeChart date axis; otherwise the time is left in seconds.

The y-axis is the temperature of the sensor in question, in degrees Celsius.

Parameters:
sensor - the sensor from which to derive the data set.
useMillis - if true, the time is converted to milliseconds; otherwise it is left as seconds.
Returns:
an XY data series describing the temperature of the FPEA.

exportToFile

public void exportToFile(File file,
                         Thermal_Model thermalModel,
                         Double initialFpaTemperature,
                         Double initialFpeaTemperature)
                  throws FileNotFoundException
Parameters:
file - the filename; if null, data are written to System.out.
Throws:
FileNotFoundException

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona