Module: kbmod_info#

class kbmod.kbmod_info.KbmodInfo(results_filename, image_filename, visit_list, visit_mjd, results_visits, observatory)[source]#

Hold and process the information describing the input data and results from a KBMOD search.

Methods

format_results_mpc()

This method will take in a row from the results file and output the astrometry of the object in the searched observations into a file with MPC formatting.

get_searched_radec(obj_idx)

This will take an image and use its WCS to calculate the ra, dec locations of the object in the searched data.

mpc_reader(filename)

Read in a file with observations in MPC format and return the coordinates.

save_results_mpc(file_out)

Save the MPC-formatted observations to file.

format_results_mpc()[source]#

This method will take in a row from the results file and output the astrometry of the object in the searched observations into a file with MPC formatting.

Returns:
mpc_lines: list of strings

List where each entry is an observation as an MPC-formatted string

get_searched_radec(obj_idx)[source]#

This will take an image and use its WCS to calculate the ra, dec locations of the object in the searched data.

Parameters:
obj_idx: int

The index of the object in the KBMOD results for which we want to calculate orbital elements/predictions.

static mpc_reader(filename)[source]#

Read in a file with observations in MPC format and return the coordinates.

Parameters:
filename: str

The name of the file with the MPC-formatted observations.

Returns:
coords: astropy SkyCoord object

A SkyCoord object with the ra, dec of the observations.

times: astropy Time object

Times of the observations

save_results_mpc(file_out)[source]#

Save the MPC-formatted observations to file.

Parameters:
file_out: str

The output filename with the MPC-formatted observations of the KBMOD search result. If None, then it will save the output as ‘kbmod_mpc.dat’ and will be the default file in other methods below where file_in=None.