API Reference
- class marstimeconverter.converter.MarsTimeConverter(mission_config_file: str = None, mission: str = 'InSight')
Bases:
objectClass for converting UTC time to Martian time (LMST) and performing additional calculations based on the Mars24 algorithm.
- CONSISTENT_JULIAN_DAY = 2451545.0
- JULIAN_UNIX_EPOCH = 2440587.5
- K = 0.0009626
- KNORM = 44796.0
- MARS_MILLIS_IN_A_YEAR = 59355000000
- MARS_SOLS_IN_YEAR = 668.5991
- MILLISECONDS_IN_A_DAY = 86400000.0
- SECONDS_IN_A_DAY = 86400.0
- SECONDS_IN_A_SOL = 88775.0
- SECONDS_PER_MARS_DAY = 88775.243971
- SOL01_START_TIME = datetime.datetime(2018, 11, 27, 5, 50, 25, 580014, tzinfo=datetime.timezone.utc)
- SOL02_START_TIME = datetime.datetime(2018, 11, 28, 6, 30, 0, 823990, tzinfo=datetime.timezone.utc)
- SOL_RATIO = 1.0274912517
- TAI_UTC = 0.0003725
- TIME_COEFFICIENT = 60.0
- alpha_fms(j2000_offset: float = None) float
Calculate the Fictional Mean Sun (FMS) angle.
Uses equation B-2 from AM2000, eq. 17.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
FMS angle in degrees.
- Return type:
float
- coordinated_mars_time(j2000_offset: float = None) float
Calculate the Coordinated Mars Time (MTC), similar to UTC on Earth.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Coordinated Mars Time in decimal hours.
- Return type:
float
- datetime2jdutc(date: datetime = None) float
Convert a datetime object to a UTC Julian day number.
- Parameters:
date (datetime, optional) – UTC datetime. Defaults to current UTC time.
- Returns:
UTC Julian day.
- Return type:
float
- delta_t_j2000(jday_tt: float = None) float
Compute the time offset from the J2000 epoch in TT.
Uses equation A-6 from the Mars24 algorithm.
- Parameters:
jday_tt (float, optional) – TT Julian day. Defaults to current TT.
- Returns:
Offset from J2000 in Julian days.
- Return type:
float
- equation_of_center(j2000_offset: float = None) float
Calculate the Equation of Center (EOC), the angular difference between the true and mean anomaly.
Uses equation B-4 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Equation of Center in degrees.
- Return type:
float
- equation_of_time(j2000_offset: float = None) float
Calculate the Equation of Time (EOT), the difference between solar time and mean solar time.
Uses equation C-1 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Equation of Time in degrees.
- Return type:
float
- get_j2000_epoch() float
Return the J2000 epoch as a Julian day number.
- Returns:
J2000 epoch value in Julian days.
- Return type:
float
- get_landing_date() datetime
Return the landing date of the mission in UTC.
- Returns:
The landing date as a timezone-aware UTC datetime.
- Return type:
datetime
- get_landing_site() str
Return the name of the landing site.
- Returns:
Name of the Mars landing site.
- Return type:
str
- get_lmst2utc(lmst_date=None)
[Deprecated] Use lmst2utc() instead.
- Parameters:
lmst_date (str or float) – LMST input.
- Returns:
Corresponding UTC datetime.
- Return type:
datetime
- get_lmst_results(utc_date=None) dict
Compute a dictionary of conversion results for a given UTC date.
Returns a structured set of Mars time-related values including LMST, LTST, Ls, MTC, MSD, and anomalies.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Dictionary of calculated Mars time values.
- Return type:
dict
- get_longitude() float
Return the longitude of the mission’s landing site.
- Returns:
Longitude in degrees.
- Return type:
float
- get_millis() float
Return the current time in milliseconds since the Unix epoch.
- Returns:
Time in milliseconds.
- Return type:
float
- get_origindate() datetime
Return the sol origin date in UTC.
- Returns:
Sol origin date as a timezone-aware UTC datetime.
- Return type:
datetime
- get_sol(utc_date=None, fmt='decimal')
Return the sol number since the mission’s sol origin.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
fmt (str, optional) – “int” returns the integer sol, “decimal” returns the sol as a float. Defaults to “decimal”.
- Returns:
Sol number, either integer or decimal.
- Return type:
int or float
- get_sol_origin_ref() int
Return the sol origin reference number.
- Returns:
The sol reference value (typically 0 or 1).
- Return type:
int
- get_utc2lmst(utc_date=None, output: str = 'date')
[Deprecated] Use utc2lmst() instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
output (str, optional) – “date” or “decimal”.
- Returns:
Local Mean Solar Time.
- Return type:
str or float
- get_utc2ls(utc_date=None, output: str = 'date')
[Deprecated] Use utc2ls() instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
- Returns:
Areocentric solar longitude (Ls).
- Return type:
float
- get_utc2ltst(utc_date=None, output: str = 'date')
[Deprecated] Use utc2ltst() instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
output (str, optional) – “date” or “decimal”.
- Returns:
Local True Solar Time.
- Return type:
str or float
- jdutc2datetime(jd_utc: float = None) datetime
Convert a UTC Julian day number to a datetime object.
- Parameters:
jd_utc (float) – UTC Julian day.
- Returns:
Timezone-aware UTC datetime.
- Return type:
datetime
- l_s(j2000_offset: float = None) float
Calculate the areocentric solar longitude (Ls).
This angle defines Mars’s position in its orbit relative to the Sun.
Uses equation B-5 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Solar longitude (Ls) in degrees.
- Return type:
float
- lmst2utc(lmst_date=None) datetime
Convert Local Mean Solar Time (LMST) to UTC datetime.
- Parameters:
lmst_date (str or float) – LMST formatted string (e.g., “0012T14:25:00”) or decimal sol time.
- Returns:
Corresponding UTC datetime.
- Return type:
datetime
- Raises:
ValueError – If the LMST format is invalid or cannot be parsed.
- local_solar_azimuth(utc_date=None) float
Calculate the local solar azimuth angle on Mars.
Uses equation D-5 from the Mars24 algorithm.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Solar azimuth angle in degrees.
- Return type:
float
- local_solar_elevation(utc_date=None) float
Calculate the local solar elevation angle on Mars.
Uses equation D-5 from the Mars24 algorithm.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Solar elevation angle in degrees.
- Return type:
float
- mars_mean_anomaly(j2000_offset: float = None) float
Calculate the Mars Mean Anomaly (M) in degrees.
Uses equation B-1 from AM2000, eq. 16.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Mars Mean Anomaly in degrees.
- Return type:
float
- mars_sol_date(j2000_offset: float = None) float
Calculate the Mars Sol Date (MSD), the Martian equivalent of Julian Day.
Uses equation C-2 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Mars Sol Date.
- Return type:
float
- mean_solar_time(j2000_offset: float = None) float
Calculate the Mean Solar Time (MST) at Mars’s prime meridian.
This is the average solar time without accounting for the Equation of Time.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Mean Solar Time in decimal hours.
- Return type:
float
- pbs(j2000_offset: float = None) float
Calculate the periodic perturbations to the mean Sun angle (PBS).
Uses equation B-3 from AM2000, eq. 18.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Perturbation angle in degrees.
- Return type:
float
- solar_declination(utc_date=None) float
Calculate the solar declination angle on Mars for a given UTC date.
Uses equation D-1 from the Mars24 algorithm.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Solar declination angle in degrees.
- Return type:
float
- utc2eot(utc_date=None) float
Convert a UTC date to the Equation of Time (EOT).
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Equation of Time in degrees.
- Return type:
float
- utc2julian(date: datetime = None) float
Calculate the Julian day number for a given UTC datetime.
This uses equation A-2 from the Mars24 algorithm.
- Parameters:
date (datetime, optional) – UTC datetime. If None, uses current UTC.
- Returns:
Julian day number.
- Return type:
float
- utc2julian_tt(jday_utc: float = None) float
Convert a UTC Julian day to a TT Julian day.
Uses equation A-5 from the Mars24 algorithm.
- Parameters:
jday_utc (float, optional) – UTC Julian day. Defaults to now.
- Returns:
TT Julian day.
- Return type:
float
- utc2lmst(utc_date=None, output: str = 'date', split: bool = False)
Convert a UTC date to Local Mean Solar Time (LMST).
- Parameters:
utc_date (datetime, str, or list-like, optional) – UTC datetime or array-like of dates. Defaults to current UTC time.
output (str, optional) – “decimal” returns float sol; “date” returns formatted string. Defaults to “date”.
split (bool, optional) – If True, returns [sol, hour, minute, second, microsecond]. Defaults to False.
- Returns:
LMST as formatted string, float, or list.
- Return type:
str, float, or list
- utc2lmst_2tab(utc_date=None)
[Deprecated] Use utc2lmst(…, split=True) instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
- Returns:
[sol, hour, minute, second, microsecond]
- Return type:
list
- utc2lmst_test(utc_date=None)
Print a formatted summary of LMST conversion results to the logger.
Used for quick testing and debugging.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- utc2ls(utc_date=None) float
Convert a UTC date to areocentric solar longitude (Ls).
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Ls angle in degrees.
- Return type:
float
- utc2ltst(utc_date=None, output: str = 'date')
Convert a UTC date to Local True Solar Time (LTST).
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
output (str, optional) – If “decimal”, returns LTST in float hours. If “date”, returns formatted sol time. Defaults to “date”.
- Returns:
LTST as a formatted string or decimal hours.
- Return type:
str or float
- utc2tt_offset(jday: float = None) float
Return the offset in seconds from UTC to Terrestrial Time (TT).
Uses the mathematical approximation from equation A-3.
- Parameters:
jday (float, optional) – Julian day. If None, current UTC is used.
- Returns:
TT offset in seconds.
- Return type:
float
- utc2tt_offset_math(jday: float = None) float
Compute the offset in seconds from UTC to TT using predefined tables.
Uses equation A-4 from the Mars24 algorithm.
- Parameters:
jday (float, optional) – Julian day. If None, current UTC is used.
- Returns:
TT offset in seconds.
- Return type:
float
- class marstimeconverter.converter.MarsTimeConverter(mission_config_file: str = None, mission: str = 'InSight')
Bases:
objectClass for converting UTC time to Martian time (LMST) and performing additional calculations based on the Mars24 algorithm.
- CONSISTENT_JULIAN_DAY = 2451545.0
- JULIAN_UNIX_EPOCH = 2440587.5
- K = 0.0009626
- KNORM = 44796.0
- MARS_MILLIS_IN_A_YEAR = 59355000000
- MARS_SOLS_IN_YEAR = 668.5991
- MILLISECONDS_IN_A_DAY = 86400000.0
- SECONDS_IN_A_DAY = 86400.0
- SECONDS_IN_A_SOL = 88775.0
- SECONDS_PER_MARS_DAY = 88775.243971
- SOL01_START_TIME = datetime.datetime(2018, 11, 27, 5, 50, 25, 580014, tzinfo=datetime.timezone.utc)
- SOL02_START_TIME = datetime.datetime(2018, 11, 28, 6, 30, 0, 823990, tzinfo=datetime.timezone.utc)
- SOL_RATIO = 1.0274912517
- TAI_UTC = 0.0003725
- TIME_COEFFICIENT = 60.0
- alpha_fms(j2000_offset: float = None) float
Calculate the Fictional Mean Sun (FMS) angle.
Uses equation B-2 from AM2000, eq. 17.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
FMS angle in degrees.
- Return type:
float
- coordinated_mars_time(j2000_offset: float = None) float
Calculate the Coordinated Mars Time (MTC), similar to UTC on Earth.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Coordinated Mars Time in decimal hours.
- Return type:
float
- datetime2jdutc(date: datetime = None) float
Convert a datetime object to a UTC Julian day number.
- Parameters:
date (datetime, optional) – UTC datetime. Defaults to current UTC time.
- Returns:
UTC Julian day.
- Return type:
float
- delta_t_j2000(jday_tt: float = None) float
Compute the time offset from the J2000 epoch in TT.
Uses equation A-6 from the Mars24 algorithm.
- Parameters:
jday_tt (float, optional) – TT Julian day. Defaults to current TT.
- Returns:
Offset from J2000 in Julian days.
- Return type:
float
- equation_of_center(j2000_offset: float = None) float
Calculate the Equation of Center (EOC), the angular difference between the true and mean anomaly.
Uses equation B-4 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Equation of Center in degrees.
- Return type:
float
- equation_of_time(j2000_offset: float = None) float
Calculate the Equation of Time (EOT), the difference between solar time and mean solar time.
Uses equation C-1 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Equation of Time in degrees.
- Return type:
float
- get_j2000_epoch() float
Return the J2000 epoch as a Julian day number.
- Returns:
J2000 epoch value in Julian days.
- Return type:
float
- get_landing_date() datetime
Return the landing date of the mission in UTC.
- Returns:
The landing date as a timezone-aware UTC datetime.
- Return type:
datetime
- get_landing_site() str
Return the name of the landing site.
- Returns:
Name of the Mars landing site.
- Return type:
str
- get_lmst2utc(lmst_date=None)
[Deprecated] Use lmst2utc() instead.
- Parameters:
lmst_date (str or float) – LMST input.
- Returns:
Corresponding UTC datetime.
- Return type:
datetime
- get_lmst_results(utc_date=None) dict
Compute a dictionary of conversion results for a given UTC date.
Returns a structured set of Mars time-related values including LMST, LTST, Ls, MTC, MSD, and anomalies.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Dictionary of calculated Mars time values.
- Return type:
dict
- get_longitude() float
Return the longitude of the mission’s landing site.
- Returns:
Longitude in degrees.
- Return type:
float
- get_millis() float
Return the current time in milliseconds since the Unix epoch.
- Returns:
Time in milliseconds.
- Return type:
float
- get_origindate() datetime
Return the sol origin date in UTC.
- Returns:
Sol origin date as a timezone-aware UTC datetime.
- Return type:
datetime
- get_sol(utc_date=None, fmt='decimal')
Return the sol number since the mission’s sol origin.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
fmt (str, optional) – “int” returns the integer sol, “decimal” returns the sol as a float. Defaults to “decimal”.
- Returns:
Sol number, either integer or decimal.
- Return type:
int or float
- get_sol_origin_ref() int
Return the sol origin reference number.
- Returns:
The sol reference value (typically 0 or 1).
- Return type:
int
- get_utc2lmst(utc_date=None, output: str = 'date')
[Deprecated] Use utc2lmst() instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
output (str, optional) – “date” or “decimal”.
- Returns:
Local Mean Solar Time.
- Return type:
str or float
- get_utc2ls(utc_date=None, output: str = 'date')
[Deprecated] Use utc2ls() instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
- Returns:
Areocentric solar longitude (Ls).
- Return type:
float
- get_utc2ltst(utc_date=None, output: str = 'date')
[Deprecated] Use utc2ltst() instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
output (str, optional) – “date” or “decimal”.
- Returns:
Local True Solar Time.
- Return type:
str or float
- jdutc2datetime(jd_utc: float = None) datetime
Convert a UTC Julian day number to a datetime object.
- Parameters:
jd_utc (float) – UTC Julian day.
- Returns:
Timezone-aware UTC datetime.
- Return type:
datetime
- l_s(j2000_offset: float = None) float
Calculate the areocentric solar longitude (Ls).
This angle defines Mars’s position in its orbit relative to the Sun.
Uses equation B-5 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Solar longitude (Ls) in degrees.
- Return type:
float
- lmst2utc(lmst_date=None) datetime
Convert Local Mean Solar Time (LMST) to UTC datetime.
- Parameters:
lmst_date (str or float) – LMST formatted string (e.g., “0012T14:25:00”) or decimal sol time.
- Returns:
Corresponding UTC datetime.
- Return type:
datetime
- Raises:
ValueError – If the LMST format is invalid or cannot be parsed.
- local_solar_azimuth(utc_date=None) float
Calculate the local solar azimuth angle on Mars.
Uses equation D-5 from the Mars24 algorithm.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Solar azimuth angle in degrees.
- Return type:
float
- local_solar_elevation(utc_date=None) float
Calculate the local solar elevation angle on Mars.
Uses equation D-5 from the Mars24 algorithm.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Solar elevation angle in degrees.
- Return type:
float
- mars_mean_anomaly(j2000_offset: float = None) float
Calculate the Mars Mean Anomaly (M) in degrees.
Uses equation B-1 from AM2000, eq. 16.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Mars Mean Anomaly in degrees.
- Return type:
float
- mars_sol_date(j2000_offset: float = None) float
Calculate the Mars Sol Date (MSD), the Martian equivalent of Julian Day.
Uses equation C-2 from the Mars24 algorithm.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Mars Sol Date.
- Return type:
float
- mean_solar_time(j2000_offset: float = None) float
Calculate the Mean Solar Time (MST) at Mars’s prime meridian.
This is the average solar time without accounting for the Equation of Time.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Mean Solar Time in decimal hours.
- Return type:
float
- pbs(j2000_offset: float = None) float
Calculate the periodic perturbations to the mean Sun angle (PBS).
Uses equation B-3 from AM2000, eq. 18.
- Parameters:
j2000_offset (float, optional) – Offset from J2000. Defaults to now.
- Returns:
Perturbation angle in degrees.
- Return type:
float
- solar_declination(utc_date=None) float
Calculate the solar declination angle on Mars for a given UTC date.
Uses equation D-1 from the Mars24 algorithm.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Solar declination angle in degrees.
- Return type:
float
- utc2eot(utc_date=None) float
Convert a UTC date to the Equation of Time (EOT).
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Equation of Time in degrees.
- Return type:
float
- utc2julian(date: datetime = None) float
Calculate the Julian day number for a given UTC datetime.
This uses equation A-2 from the Mars24 algorithm.
- Parameters:
date (datetime, optional) – UTC datetime. If None, uses current UTC.
- Returns:
Julian day number.
- Return type:
float
- utc2julian_tt(jday_utc: float = None) float
Convert a UTC Julian day to a TT Julian day.
Uses equation A-5 from the Mars24 algorithm.
- Parameters:
jday_utc (float, optional) – UTC Julian day. Defaults to now.
- Returns:
TT Julian day.
- Return type:
float
- utc2lmst(utc_date=None, output: str = 'date', split: bool = False)
Convert a UTC date to Local Mean Solar Time (LMST).
- Parameters:
utc_date (datetime, str, or list-like, optional) – UTC datetime or array-like of dates. Defaults to current UTC time.
output (str, optional) – “decimal” returns float sol; “date” returns formatted string. Defaults to “date”.
split (bool, optional) – If True, returns [sol, hour, minute, second, microsecond]. Defaults to False.
- Returns:
LMST as formatted string, float, or list.
- Return type:
str, float, or list
- utc2lmst_2tab(utc_date=None)
[Deprecated] Use utc2lmst(…, split=True) instead.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string.
- Returns:
[sol, hour, minute, second, microsecond]
- Return type:
list
- utc2lmst_test(utc_date=None)
Print a formatted summary of LMST conversion results to the logger.
Used for quick testing and debugging.
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- utc2ls(utc_date=None) float
Convert a UTC date to areocentric solar longitude (Ls).
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
- Returns:
Ls angle in degrees.
- Return type:
float
- utc2ltst(utc_date=None, output: str = 'date')
Convert a UTC date to Local True Solar Time (LTST).
- Parameters:
utc_date (datetime or str, optional) – UTC datetime or ISO string. Defaults to current UTC time.
output (str, optional) – If “decimal”, returns LTST in float hours. If “date”, returns formatted sol time. Defaults to “date”.
- Returns:
LTST as a formatted string or decimal hours.
- Return type:
str or float
- utc2tt_offset(jday: float = None) float
Return the offset in seconds from UTC to Terrestrial Time (TT).
Uses the mathematical approximation from equation A-3.
- Parameters:
jday (float, optional) – Julian day. If None, current UTC is used.
- Returns:
TT offset in seconds.
- Return type:
float
- utc2tt_offset_math(jday: float = None) float
Compute the offset in seconds from UTC to TT using predefined tables.
Uses equation A-4 from the Mars24 algorithm.
- Parameters:
jday (float, optional) – Julian day. If None, current UTC is used.
- Returns:
TT offset in seconds.
- Return type:
float
plotting.py
This module provides visualization functions for the MarsTimeConverter tool. It includes plots for Local Mean Solar Time (LMST), solar longitude (Ls), solar declination, and comparisons between multiple Mars missions.
- marstimeconverter.plotting.compare_missions_lmst(MTC_missions, utc_date=None)
Compare LMST conversion results for a list of Mars missions.
- Parameters:
MTC_missions (list) – List of MarsTimeConverter instances.
utc_date (datetime or str, optional) – UTC time. Defaults to now.
- marstimeconverter.plotting.plot_declination_vs_eot(mtc_instance, start_utc, end_utc, num_points=1000)
Plot solar declination as a function of the Equation of Time (EOT).
- Parameters:
mtc_instance (MarsTimeConverter) – An instance of the converter.
start_utc (str or datetime) – Start UTC time.
end_utc (str or datetime) – End UTC time.
num_points (int, optional) – Number of sample points. Defaults to 1000.
- marstimeconverter.plotting.plot_lmst_vs_utc(mtc_instance, start_utc, num_days, num_points=1000)
Plot Local Mean Solar Time (LMST) in decimal format as a function of UTC.
- Parameters:
mtc_instance (MarsTimeConverter) – An instance of the converter.
start_utc (str or datetime) – Start UTC time.
num_days (int) – Number of days to simulate.
num_points (int, optional) – Number of sample points. Defaults to 1000.
- marstimeconverter.plotting.plot_ls_vs_utc(mtc_instance, start_utc, end_utc, num_points=1000)
Plot the areocentric solar longitude (Ls) as a function of UTC.
- Parameters:
mtc_instance (MarsTimeConverter) – An instance of the converter.
start_utc (str or datetime) – Start UTC time.
end_utc (str or datetime) – End UTC time.
num_points (int, optional) – Number of sample points. Defaults to 1000.
- marstimeconverter.plotting.refresh_lmst_display(MTC_missions, frequency: float)
Continuously refresh the LMST display for multiple missions.
- Parameters:
MTC_missions (list) – List of MarsTimeConverter instances.
frequency (float) – Refresh interval in seconds.