rss_ringoccs.tools.history module

Purpose:

Functions related to recording processing history.

Dependencies:
  1. sys
  2. time
  3. os
  4. platform
  5. pandas
  6. numpy
rss_ringoccs.tools.history.date_to_rev(year, doy, rss_file='../tables/RSSActivities_all_rings_only.txt')

Pull rev number from a table given the year and doy from a RSS activities file with columns for CIMS request, sequence number, year, doy, start earth-received time in HH:MM, end earth-received time in HH:MM

Arguments
year (int):Year of occultation
doy (int):Day of year of occultation
Returns
rev_number (str):
 3-digit rev number (e.g. ‘007’)
Note:
  1. Given default ‘rss_file’ location, this script must be run
    one directory from the top-level rss_ringoccs directory
rss_ringoccs.tools.history.get_rev_info(rsr_inst)

This returns a dictionary with information related to the ring occultation.

Arguments
rsr_inst (class):
 Instance of RSRReader class
Returns:
rev_info (dict):
 Dictionary with keys: rsr_file, band, year, doy dsn, rev, occ_dir, planetary_occ_flag
rss_ringoccs.tools.history.rev_to_occ_info(rev, sroc_info_file='../tables/list_of_sroc_dir_all_events.txt')

Pull occultation direction from a text file given rev.

Arguments
rev (str):Revolution/orbit number in ‘XXX’ format
Keyword Arguments
sroc_info_file (str):
 Path to csv file with columns: rev number, occultation direction, planetary occultation flag
Returns
occ_dir (str):Occultation direction (over entire, I&E, occultation) This is not to be confused with profile direction.
Note:
  1. Given default ‘sroc_info_file’ location, this script must be run
    one directory from the top-level rss_ringoccs directory
rss_ringoccs.tools.history.write_history_dict(input_vars, input_kwds, source_file, add_info=None)

This creates a dictionary of processing history for an instance.

Arguments:
input_vars (dict):
 Dictionary of all input variables to the instance.
input_kwds (dict):
 Dictionary of all input keywords to the instance.
source_file (str):
 Full path to the script used to run the instance.
Keyword Arguments:
add_info (dict):
 Dictionary of additional info
Returns:
history (dict):Dictionary with keys: “User Name”, “Host Name”, “Run Date”, “Python Version”, “Operating System”, “Source File”, “Positional Args”, “Keyword Args”