rss_ringoccs.tools.CSV_tools module

Purpose:

Provide tools for reading in .TAB and .CSV files and converting the data into a usable instance of the DLP class.

Dependencies:
  1. pandas
  2. numpy
  3. scipy
class rss_ringoccs.tools.CSV_tools.ExtractCSVData(geo, cal, dlp, tau=None, verbose=True, use_deprecate=False)

Bases: object

Purpose:
Read three csv files (Geo, Cal, and DLP) and return an instance containing all necessary attributes to run diffraction correction. This instance can be fed directly into the DiffractionCorrection class.
Variables:
geo (str):A string that contains the location of the requested Geo file. Ex: geo = “/path/to/geo.CSV”
cal (str):A string that contains the location of the requested Cal file. Ex: cal = “/path/to/cal.CSV”
dlp (str):
A string that contains the location of the requested dlp file. Ex: dlp = “/path/to/dlp.CSV”
Keywords:
tau (str):A string that contains the location of the requested Tau file. If not set, variables from the tau file will have NoneType. Ex: tau = “/path/to/tau.CSV”
verbose (bool):A Boolean for specifying if various status updates will be printed to the command line.
Attributes:
B_rad_vals:The ring opening angle of the ring plane with respect to the line of sight from Earth to the spacecraft.
D_km_vals:The distance from the spacecraft to the ring-intercept point.
f_sky_hz_vals:The sky frequency of the incoming signal.
p_norm_vals:The normalized diffracted power.
phase_rad_vals:The diffracted phase, in radians.
phase_vals:The reconstructed phase contained in the tau file. If tau is not set, this will be a NoneType variable. Units are in radians.
phi_rad_vals:The observed ring azimuth angle, in radians.
phi_rl_rad_vals:
 The observed ring longitude angle, in radians.
power_vals:The reconstructed power contained in the tau file. If tau is not set, this will be a NoneType variable. Power is normalized to one in free space regions.
raw_tau_threshold_vals:
 The threshold optical depth corresponding to the diffracted optical depth profile.
rho_corr_pole_km_vals:
 Corrections for the ring-intercept point computed by taking into account Saturn’s pole direction.
rho_corr_timing_km_vals:
 Timing offset corrections to the ring-intercept point.
rho_dot_kms_vals:
 The rate of change of the ring-intercept point as a function of time. That is, drho/dt.
rho_km_vals:The ring intercept point, in kilometers.
t_oet_spm_vals:Observed event time, the time the signal is recieved on Earth, computed in Seconds Past Midnight.
t_ret_spm_vals:Ring event time, the time the signal crosses the rings, computed in Seconds Past Midnight.
t_set_spm_vals:Spacecraft Event Time, the time the signal was transmitted from the spacecraft, computed in Seconds Past Midnight.
tau_rho:The ring-intercept point corresponding to the values in the tau file. If tau is not set, this will be a NoneType variable. Units are in kilometers.
tau_vals:The normalized optical depth contained in the tau file. If tau is not set, this will be a NoneType variable.
rss_ringoccs.tools.CSV_tools.get_cal(cal, verbose=True)
Purpose:
To extract a pandas DataFrame from a given CAL.TAB or CAL.CSV file.
Arguments:
cal (str):A string containing the location of the requested cal file. Ex: cal = “/path/to/cal.CSV” File must contain the following columns, in the following order: | spm_vals | f_sky_pred_vals | f_sky_resid_fit_vals | p_free_vals
Keywords:
verbose (bool):A Boolean for printing out auxiliary information to the command line.
rss_ringoccs.tools.CSV_tools.get_dlp(dlp, verbose=True, use_deprecate=False)
Purpose:
To extract a pandas DataFrame from a given DLP.TAB or DLP.CSV file.
Arguments:
dlp (str):A string containing the location of the requested dlp file. Ex: dlp = “/path/to/dlp.CSV” File must contain the following columns, in the following order: | rho_km_vals | rho_corr_pole_km_vals | rho_corr_timing_km_vals | phi_rl_deg_vals | phi_ora_deg_vals | p_norm_vals | raw_tau_vals | phase_deg_vals | raw_tau_threshold_vals | t_oet_spm_vals | t_ret_spm_vals | t_set_spm_vals | B_deg_vals
Keywords:
verbose (bool):A Boolean for printing out auxiliary information to the command line.
rss_ringoccs.tools.CSV_tools.get_geo(geo, verbose=True, use_deprecate=False)

To extract a pandas DataFrame from a given GEO.TAB or GEO.CSV file.

Arguments
geo (str):A string containing the location of the requested geo file. Ex: geo = “/path/to/geo.CSV” File must contain the following columns, in the following order: | t_oet_spm_vals | t_ret_spm_vals | t_set_spm_vals | rho_km_vals | phi_rl_deg_vals | phi_ora_deg_vals | B_deg_vals | D_km_vals | rho_dot_kms_vals | phi_rl_dot_kms_vals | F_km_vals | R_imp_km_vals | rx_km_vals | ry_km_vals | rz_km_vals | vx_kms_vals | vy_kms_vals | vz_kms_vals | obs_spacecract_lat_deg_vals
Keywords
verbose (bool):A Boolean for printing out auxiliary information to the command line.
rss_ringoccs.tools.CSV_tools.get_tau(tau, verbose=True, use_deprecate=False)
Purpose:
To extract a pandas DataFrame from a given TAU.TAB or TAU.CSV file.
Arguments:
tau (str):A string containing the location of the requested tau file. Ex: tau = “/path/to/tau.CSV” File must contain the following columns, in the following order: | rho_km_vals | rho_corr_pole_km_vals | rho_corr_timing_km_vals | phi_rl_deg_vals | phi_ora_deg_vals | p_norm_vals | raw_tau_vals | phase_deg_vals | raw_tau_threshold_vals | t_oet_spm_vals | t_ret_spm_vals | t_set_spm_vals | B_deg_vals
Keywords:
verbose (bool):A Boolean for printing out auxiliary information to the command line.