ephemeris.py Functions

Functions to create ephemeris DataFrame.

obsfind.ephemeris.call_horizons_moon(mpc_code: str, epochs: dict, obj_name='301')

Calls JPL Horizons for the moon and returns a DataFrame with ephemerides.

Inputs

mpc_code : MPC code for the observatory - https://www.minorplanetcenter.net/iau/lists/ObsCodes.html epochs : Dictionary with ‘start’, ‘stop’, and ‘step’ keys for the time range. obj_name : Name of the object to query, default is ‘301’ for the moon.

Output

DataFrame with ephemerides for the moon.

obsfind.ephemeris.call_horizons_obj(obj_name: str, mpc_code: str, epochs: dict) DataFrame

Calls JPL Horizons for a single object and returns a DataFrame with ephemerides.

Inputs

obj_name : Name of the object to query. mpc_code : MPC code for the observatory - https://www.minorplanetcenter.net/iau/lists/ObsCodes.html epochs : Dictionary with ‘start’, ‘stop’, and ‘step’ keys for the time range.

Output

DataFrame with ephemerides for the object.

obsfind.ephemeris.create_horizon_dataframe(twilight_times: DataFrame, mpc_code: str, target_list: list[str]) DataFrame

Calls JPL Horizons for a list of targets and returns a DataFrame with ephemerides.

Inputs

start_date : astropy Time() object for the start date of the ephemerides. end_date : astropy Time() object for the end date of the ephemerides. mpc_code : MPC code for the observatory - https://www.minorplanetcenter.net/iau/lists/ObsCodes.html target_list : list of target names (strings) to query.

Output

eph_all_targets : DataFrame with ephemerides for all targets.

obsfind.ephemeris.get_twilight_times(mpc_code: str, date_list: list[astropy.time.core.Time]) dict[datetime.datetime]

Calculates twilight times for a given observatory code and list of dates.

Inputs

mpc_code : MPC code for the observatory - https://www.minorplanetcenter.net/iau/lists/ObsCodes.html date_list : List of astropy Time objects representing the nights to calculate twilight times for.

Output

Dictionary with twilight times for each night, including sunrise, sunset, and twilight times.

obsfind.ephemeris.limit_cuts(eph_df, mag_limit, elevation_limit, t_vis_limit, twilight_times)

Applies magnitude, elevation, and time visible limit cuts to the ephemeris DataFrame. Inputs

eph_df : DataFrame with ephemerides for all targets. mag_limit : Magnitude limit for filtering targets. elevation_limit: Minimum elevation limit for filtering targets. t_vis_limit : Minimum time visible limit in hours for filtering targets.

Output

DataFrame with ephemerides after applying the cuts.