sorcha.ephemeris.simulation_driver
Classes
Data class for holding parameters related to ephemeris geometry |
Functions
|
Extracts a vector from a Pandas dataframe row. |
|
Generate a set of observations given a collection of orbits |
Decomposes the vector into two unit vectors to facilitate computation of on-sky angles |
|
|
Calculate rates and geometry for objects within the field of view |
|
Writes the ephemeris out to an external file. |
Module Contents
- class EphemerisGeometryParameters[source]
Data class for holding parameters related to ephemeris geometry
- get_vec(row, vecname)[source]
Extracts a vector from a Pandas dataframe row.
- Parameters:
row (row from the dataframe)
vecname (name of the vector)
- Return type:
3D numpy array
- create_ephemeris(orbits_df, pointings_df, args, sconfigs)[source]
Generate a set of observations given a collection of orbits and set of pointings.
- Parameters:
orbits_df (pandas dataframe) -- The dataframe containing the collection of orbits.
pointings_df (pandas dataframe) -- The dataframe containing the collection of telescope/camera pointings.
args -- Various arguments necessary for the calculation
sconfigs --
Dataclass of configuration file arguments. Various configuration parameters necessary for the calculation ang_fov : float
The angular size (deg) of the field of view
- bufferfloat
The angular size (deg) of the buffer around the field of view. A buffer is required to allow for some motion between the time of the observation and the time of the picket (t_picket)
- picket_intervalfloat
The interval (days) between picket calculations. This is 1 day by default. Current there is only one such interval, used for all objects. It is currently possible for extremely fast-moving objects to be missed. This will be remedied in future releases.
- obsCodestring
The MPC code for the observatory. (This is current a configuration parameter, but these should be included in the visit information, to allow for multiple observatories.
- nsideinteger
The nside value used for the HEALPIx calculations. Must be a power of 2 (1, 2, 4, ...) nside=64 is current default.
- n_sub_intervals: int
Number of sub-intervals for the Lagrange interpolation (default: 101)
- Returns:
observations -- The dataframe of observations needed for Sorcha to continue
- Return type:
pandas dataframe
Notes
This works by calculating and regularly updating the sky-plane locations (unit vectors) of all the objects in the collection of orbits. The HEALPix index for each of the locations is calculated. A dictionary with pixel indices as keys and lists of ObjIDs for those objects in each HEALPix tile as values is generated. An individual one of these calculations is called a 'picket', as one element of a long picket fence. Typically, the interval between pickets is one day.
Given a specific pointing, the set of HEALPix tiles that are overlapped by the pointing (and a buffer region) is computed. Then the precise locations of just those objects within that set of HEALPix tiles are computed. Details for those that actually do land within the field of view are passed along.
- get_residual_vectors(v1)[source]
Decomposes the vector into two unit vectors to facilitate computation of on-sky angles The decomposition is such that A = (-sin (RA), cos(RA), 0) is in the direction of increasing RA, and D = (-sin(dec)cos (RA), -sin(dec) sin(RA), cos(dec)) is in the direction of increasing Dec The triplet (A,D,v1) forms an orthonormal basis of the 3D vector space.
- Parameters:
v1 (array, shape = (3,))) -- The vector to be decomposed
- Returns:
A (array, shape = (3,))) -- A vector
D (array, shape = (3,))) -- D vector
- calculate_rates_and_geometry(pointing: pandas.DataFrame, ephem_geom_params: EphemerisGeometryParameters)[source]
Calculate rates and geometry for objects within the field of view
- Parameters:
pointing (pandas dataframe) -- The dataframe containing the pointing database.
ephem_geom_params (EphemerisGeometryParameters) -- Various parameters necessary to calculate the ephemeris
- Returns:
Tuple containing the ephemeris parameters needed for Sorcha post processing.
- Return type:
tuple
- write_out_ephemeris_file(ephemeris_df, ephemeris_csv_filename, args, sconfigs)[source]
Writes the ephemeris out to an external file.
- Parameters:
ephemeris_df (Pandas DataFrame) -- The data frame of ephemeris information to be written out.
ephemeris_csv_filename (string) -- The filepath (without extension) to write the ephemeris file to.
args (sorchaArguments object or similar) -- Command-line arguments from Sorcha.
sconfigs (dataclass) -- Dataclass of configuration file arguments.
- Return type:
None.