HiRISE

HiRISE.HiCat.Utilities
Class Stereo_Completion_Reminder

java.lang.Object
  extended by HiRISE.HiCat.Utilities.Stereo_Completion_Reminder

public class Stereo_Completion_Reminder
extends Object

This class retrieves a list of second half stereo suggestions that can be acquired in an upcoming cycle. Currently the utility is expected to be used in an automated context, meaning that the class needs to be able to do several things:

Once the current date has been acquired from the system, the cycle is determined by querying the Cycle_map table within the database. The notifications need to be sent at the beginning of IO week 0, approximately three weeks before the cycle begins executing on the spacecraft, so the cycle is selected based on this criteria. If the currrent date is not within IO week 0 of a cycle listed in the database, then the application will exit without sending an email.

The list of suggestions is retrieved using a query similar to, but not exactly the same as the one used by HiTList.

The email addresses to send to are retrieved from the notify parameter in the input Configuration file.

Max Data Volume Percentage

Due to changes in the thermal constraints on the focal plane electronics, images longer than ~80,0000 lines in bin 1 can no longer be taken. This change resulted in incomplete stereo pairs where the first half was taken under different thermal contraints, and were longer than the current 80,0000 line limit. In order to notify STLs that they may need to take action in such cases, the Max Data Volume Percentage was added to the report. This value indicates as a percentage above or below the 80,000 line limit that the first half has. Currently this value is stored in terms of bytes, the default value of which is found in the DEFAULT_MAX_DATA_VOLUME_BYTES_THRESHOLD static variable. This value can be overridden by adding a MAX_DATA_VOLUME_BYTES_THRESHOLD parameter with the appropriate value to the input configuration file.

TODO

Currently this task is tailored to the very specific purpose it is needed for, however, a few additional methods, would give this class more general reusability. At the moment, this utility is expected to be run from cron on the Sunday morning of IO Week0. Running this utility at other times may not give the expected results.

Version:
1.29
Author:
Rodney Heyd UA/PIRL
See Also:
HiTList

Nested Class Summary
static class Stereo_Completion_Reminder.ExitCode
           
 
Field Summary
static String DEBUG_EMAIL_PROPERTY
          System properties related to debugging.
static String DEBUG_FILTER_PROPERTY
          System properties related to debugging.
static String DEBUG_MAIN_PROPERTY
          System properties related to debugging.
static String DEBUG_SECOND_STEREO_PROPERTY
          System properties related to debugging.
static String DEFAULT_CONFIGURATION_FILE
           
static int DEFAULT_MAX_DATA_VOLUME_BYTES_THRESHOLD
          This value determines the threshold for flagging stereo 2 suggestions that have a potentially high data volume based on the size of the stereo 1.
static String ID
           
 
Constructor Summary
Stereo_Completion_Reminder(Configuration configuration)
          Initialize the class given a Configuration.
 
Method Summary
 Vector<Vector<String>> Find_Out_Of_Bounds_LsubS(Vector<Vector<String>> data_vector, double min_lsubs, double max_lsubs)
          Run a vector of suggestions through a filter based on a minimum and maximum solar longitude.
 void forceCycle(int cycle)
          Force a report using the input cycle id.
 String Get_Single_STL_Emails(String theme)
          Looks to the database for the email address(es) of the science theme leader(s) for one particular theme.
static void main(String[] arguments)
          Get a list of second half stereo suggestions that are available in the upcoming cycle and email them to a list of addresses found in a Configuration file.
 void NOOP(boolean noop)
          Sets the noop option of the class.
 void Send_Out_Of_Order_Warnings()
          Looks for stereo pairs that were taken out of order and have different L_s ranges, and sends a warning email to the appropriate science theme leader(s) for any such pair.
 void Send_Stereo_Notification(int which_half)
          Sends a list of second half stereo suggestions in an html table format to a list of email addresses found in the configuration.
 Vector<Vector<String>> Stereo_Search(int which_half, Cycle cycle)
          Retrieve the complete list of available second half stereo suggestions from the database.
 Vector<Vector<String>> Wrong_Order_Search()
          Retrieve the list of out-of-order stereo pairs with different T_s ranges from the database.
 
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
See Also:
Constant Field Values

DEFAULT_CONFIGURATION_FILE

public static final String DEFAULT_CONFIGURATION_FILE
See Also:
Constant Field Values

DEFAULT_MAX_DATA_VOLUME_BYTES_THRESHOLD

public static final int DEFAULT_MAX_DATA_VOLUME_BYTES_THRESHOLD
This value determines the threshold for flagging stereo 2 suggestions that have a potentially high data volume based on the size of the stereo 1. This value is in bytes.

See Also:
Constant Field Values

DEBUG_MAIN_PROPERTY

public static final String DEBUG_MAIN_PROPERTY
System properties related to debugging. Setting any of these system properties to true will cause additional debugging information to be output during the program execution that relates to operations named by the property. In addition, full stack traces will be output to stdout for any exceptions that are thrown during the execution of the program while if any of these properties are set prior to the initialization of the class.

See Also:
Constant Field Values

DEBUG_FILTER_PROPERTY

public static final String DEBUG_FILTER_PROPERTY
System properties related to debugging. Setting any of these system properties to true will cause additional debugging information to be output during the program execution that relates to operations named by the property. In addition, full stack traces will be output to stdout for any exceptions that are thrown during the execution of the program while if any of these properties are set prior to the initialization of the class.

See Also:
Constant Field Values

DEBUG_EMAIL_PROPERTY

public static final String DEBUG_EMAIL_PROPERTY
System properties related to debugging. Setting any of these system properties to true will cause additional debugging information to be output during the program execution that relates to operations named by the property. In addition, full stack traces will be output to stdout for any exceptions that are thrown during the execution of the program while if any of these properties are set prior to the initialization of the class.

See Also:
Constant Field Values

DEBUG_SECOND_STEREO_PROPERTY

public static final String DEBUG_SECOND_STEREO_PROPERTY
System properties related to debugging. Setting any of these system properties to true will cause additional debugging information to be output during the program execution that relates to operations named by the property. In addition, full stack traces will be output to stdout for any exceptions that are thrown during the execution of the program while if any of these properties are set prior to the initialization of the class.

See Also:
Constant Field Values
Constructor Detail

Stereo_Completion_Reminder

public Stereo_Completion_Reminder(Configuration configuration)
                           throws Database_Exception,
                                  Configuration_Exception
Initialize the class given a Configuration. The configuration should contain database connection parameters as well as a notify parameter containing a list of email addresses.

Parameters:
configuration - - The configuration to use for the class
Throws:
Database_Exception - if a database connection error occurs
Configuration_Exception - if there is a problem with the configuration parameters
Method Detail

Stereo_Search

public Vector<Vector<String>> Stereo_Search(int which_half,
                                            Cycle cycle)
                                     throws Database_Exception,
                                            Configuration_Exception
Retrieve the complete list of available second half stereo suggestions from the database.

Returns:
The list of stereo suggestions as a Vector of Vectors
Throws:
Database_Exception - if a database error occurs.
Configuration_Exception

Wrong_Order_Search

public Vector<Vector<String>> Wrong_Order_Search()
                                          throws Database_Exception
Retrieve the list of out-of-order stereo pairs with different T_s ranges from the database.

Returns:
The list of stereo suggestions as a Vector of Vectors
Throws:
Database_Exception - if a database error occurrs.

Find_Out_Of_Bounds_LsubS

public Vector<Vector<String>> Find_Out_Of_Bounds_LsubS(Vector<Vector<String>> data_vector,
                                                       double min_lsubs,
                                                       double max_lsubs)
Run a vector of suggestions through a filter based on a minimum and maximum solar longitude. This method does not remove records from the input vector, it just returns a list of suggestions that are outside the bounds of the input solar longitude range.

Parameters:
data_vector - A vector of suggestions
min_lsubs - the minimum lsubs value
max_lsubs - the maximum lsubs value
Returns:
A vector of suggestion vectors that are outside the input solar longitude range.

Send_Stereo_Notification

public void Send_Stereo_Notification(int which_half)
                              throws Database_Exception,
                                     Configuration_Exception
Sends a list of second half stereo suggestions in an html table format to a list of email addresses found in the configuration.

Throws:
Database_Exception - if a database error occurs.
Configuration_Exception - if an error occurs while setting up the stereo search

Send_Out_Of_Order_Warnings

public void Send_Out_Of_Order_Warnings()
                                throws Database_Exception
Looks for stereo pairs that were taken out of order and have different L_s ranges, and sends a warning email to the appropriate science theme leader(s) for any such pair.

Throws:
Database_Exception - if a database error occurs.

Get_Single_STL_Emails

public String Get_Single_STL_Emails(String theme)
                             throws Database_Exception
Looks to the database for the email address(es) of the science theme leader(s) for one particular theme.

Throws:
Database_Exception - if a database error occurs.

forceCycle

public void forceCycle(int cycle)
Force a report using the input cycle id. This is only useful for testing purposes.

Parameters:
cycle - - an integer cycle id. This id should exist in the database.

NOOP

public void NOOP(boolean noop)
Sets the noop option of the class. If set to true, then the database will be queried, but no email will be sent.


main

public static void main(String[] arguments)
Get a list of second half stereo suggestions that are available in the upcoming cycle and email them to a list of addresses found in a Configuration file.

Command line syntax is describe in the Usage(Options) method.

Exit Status Values:

0 - Success 1 - Configuration Error 2 - Database Error 3 - Invalid Command Line Syntax

Parameters:
arguments - Array of command line argument Strings
See Also:
Usage(Options)

HiRISE

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