opihiexarata.orbit.orbfit module

This contains the Python wrapper class around Orbfit, assuming the installation procedure was followed.

class opihiexarata.orbit.orbfit.OrbfitOrbitDeterminerEngine[source]

Bases: OrbitEngine

Uses the Orbfit package to determine the orbital elements of an astroid provided observations. This assumes that the installation instructions provided were followed.

orbital_elements

The six Keplarian orbital elements.

Type:

dict

orbital_elements_errors

The errors of the orbital elements.

Type:

dict

classmethod __check_installation(no_raise: bool = False) bool

Check if the installation was completed according to the documentation provided. This functions only checks for the existence of the template files.

Parameters:

no_raise (bool, default = False) – By default, an invalid install will raise. Set this if a False return without interrupting the flow of the program is desired.

Returns:

valid_install – If the installation is detected to be valid, then this returns True.

Return type:

bool

__init__() None[source]

Instantiation of the orbfit package.

Parameters:

None

Return type:

None

_clean_orbfit_files() None[source]

This function cleans up the operational directory of Orbfit. If there are leftover files, the program may try to use them in a manner which is not desired. It is usually better to start from scratch each time to avoid these issues.

Parameters:

None

Return type:

None

_prepare_orbfit_files() None[source]

This function prepares the operational directory for Orbfit inside of the temporary directory. This allows for files to be generated for useage by the binary orbfit.

Parameters:

None

Return type:

None

_solve_single_orbit(observation_table: Table) tuple[dict, dict, float][source]

This uses the Orbfit program to an orbit provided a record of observations. If it cannot be solved, an error is raised.

This function is not intended to solve an entire set of observations, but instead a subset of them. The rational being that orbfit tends to fail on larger sets; averaging the values of smaller sets is a little more robust against failure. Use the non-hidden function to compute orbital elements for a full range of observations.

Parameters:

observation_table (Astropy Table) – The table of observations; this will be converted to the required formats for processing.

Returns:

  • kepler_elements (dict) – The Keplarian orbital elements.

  • kepler_error (dict) – The error on the Keplarian orbital elements.

  • modified_julian_date (float) – The modified Julian date corresponding to the osculating orbit and the Keplerian orbital parameters provided.

solve_orbit(observation_table: Table) tuple[dict, dict, float][source]

Attempts to compute Keplarian orbits provided a table of observations.

This function attempts to compute the orbit using the entire observation table. If it is unable to, then the observations are split into subsets based on the year of observations. The derived orbital elements are averaged and errors propagated. If no orbit is found, then an error is raised.

Parameters:

observation_record (Astropy Table) – The table of observational records; this will be converted to the required MPC 80 column format.

Returns:

  • kepler_elements (dict) – The Keplarian orbital elements.

  • kepler_error (dict) – The error on the Keplarian orbital elements.

  • modified_julian_date (float) – The modified Julian date corresponding to the osculating orbit and the Keplerian orbital parameters provided.

solve_orbit_via_record(observation_record: list[str]) tuple[dict, dict, float][source]
Attempts to compute Keplarian orbits provided a standard 80-column

record of observations.

This function calls and depends on solve_orbfit.

Parameters:

observation_record (Astropy Table) – The record of observations in the standard 80-column format.

Returns:

  • kepler_elements (dict) – The Keplarian orbital elements.

  • kepler_error (dict) – The error on the Keplarian orbital elements.

  • modified_julian_date (float) – The modified Julian date corresponding to the osculating orbit and the Keplerian orbital parameters provided.