read_observations¶
- rubin_sim.moving_objects.read_observations(simfile, colmap, constraint=None, footprint='camera', dbcols=None)¶
Read the opsim database.
- Parameters:
- simfile
str
Name (& path) of the opsim database file.
- colmap
dict
colmap dictionary (from rubin_sim.maf.batches.ColMapDict)
- constraint
str
, optional Optional SQL constraint (minus ‘where’) on the opsim data to read from db. Default is None.
- footprint
str
, 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.
- dbcols
list
ofstr
, optional List of additional columns to query from the db and add to the output observations. Default None.
- simfile
- Returns:
- np.ndarray, dictionary
The OpSim data read from the database, and the dictionary mapping the column names to the data.