read_observations

rubin_sim.moving_objects.read_observations(simfile, colmap, constraint=None, footprint='camera', dbcols=None)

Read the opsim database.

Parameters:
simfilestr

Name (& path) of the opsim database file.

colmapdict

colmap dictionary (from rubin_sim.maf.batches.ColMapDict)

constraintstr, optional

Optional SQL constraint (minus ‘where’) on the opsim data to read from db. Default is None.

footprintstr, optional

Footprint option for the final matching of object against OpSim FOV. Default ‘camera’ means that ‘rotSkyPos’ must be fetched from the db. Any other value will not require rotSkyPos.

dbcolslist of str, optional

List of additional columns to query from the db and add to the output observations. Default None.

Returns:
np.ndarray, dictionary

The OpSim data read from the database, and the dictionary mapping the column names to the data.