pyRTX.classes.Atmosphere

Classes

VenusGram([dataFolder, execFolder, tmpFolder])

A utility class for providing a Python interface to VenusGram2005.

class pyRTX.classes.Atmosphere.VenusGram(dataFolder='/home/cascioli/VenusGram2005/', execFolder='/home/cascioli/VenusGram2005/', tmpFolder='./tmp')[source]

A utility class for providing a Python interface to VenusGram2005.

This class allows users to compute atmospheric density and temperature at Venus for a given epoch, latitude, longitude, and height.

Parameters:
  • dataFolder (str, default '/home/cascioli/VenusGram2005/') – The path to the data folder of VenusGram2005.

  • execFolder (str, default '/home/cascioli/VenusGram2005/') – The path to the VenusGram2005 executable.

  • tmpFolder (str, default './tmp') – The path to a temporary folder for caching VenusGram inputs and outputs.

__init__(dataFolder='/home/cascioli/VenusGram2005/', execFolder='/home/cascioli/VenusGram2005/', tmpFolder='./tmp')[source]

Initializes the VenusGram object.

Parameters:
  • dataFolder (str, default '/home/cascioli/VenusGram2005/') – The path to the data folder of VenusGram2005.

  • execFolder (str, default '/home/cascioli/VenusGram2005/') – The path to the VenusGram2005 executable.

  • tmpFolder (str, default './tmp') – The path to a temporary folder for caching VenusGram inputs and outputs.

namelistWriter(epoch, lat, lon, height)[source]

Writes the input file for the VenusGram executable.

Parameters:
  • epoch (float) – The epoch in TDB seconds past J2000.

  • lat (float) – The latitude.

  • lon (float) – The longitude.

  • height (float) – The height above the reference ellipsoid in km.

epoch_converter(epoch, inputFormat='TDB', outputformat='UTC')[source]

Converts a SPICE epoch to a calendar date.

Parameters:
  • epoch (float) – The epoch in TDB seconds past J2000.

  • inputFormat (str, default 'TDB') – The format of the input epoch.

  • outputformat (str, default 'UTC') – The format of the output date.

Returns:

A tuple containing the month, day, year, hour, minute, and second.

Return type:

tuple

readResults()[source]

Reads the output file from the VenusGram executable.

Returns:

A tuple containing the density, temperature, pressure, and composition.

Return type:

tuple

readVariabilities(kind)[source]

Reads the variability results from the VenusGram output.

Parameters:

kind (str) – The variable to read (e.g., ‘Density’).

Returns:

A tuple containing the low, average, and high values of the variable.

Return type:

tuple

compute(epoch, lat, lon, height, inputUnits='deg', variabilities=None)[source]

Computes the atmospheric density and temperature.

Parameters:
  • epoch (float or list of float) – The epoch(s) in TDB seconds past J2000.

  • lat (float or list of float) – The latitude(s).

  • lon (float or list of float) – The longitude(s).

  • height (float or list of float) – The height(s) above the reference ellipsoid in km.

  • inputUnits (str, default 'deg') – The units of the input latitude and longitude (‘deg’ or ‘rad’).

  • variabilities (str, optional) – If specified, returns the variabilities for the given variable (e.g., ‘Density’).

Returns:

A tuple containing the density, temperature, pressure, and composition. If variabilities is specified, the tuple also contains the low, average, and high values of the variable.

Return type:

tuple