lightcurvelynx.obstable.lsst_obstable
A class for storing and working with Rubin Observatory (LSST) observation tables.
Attributes
The pixel scale for the LSST camera in arcseconds per pixel. |
|
Classes
An ObsTable for observations from the Rubin Observatory data releases. |
Module Contents
- class LSSTObsTable(table, colmap=None, saturation_mags=None, **kwargs)[source]
Bases:
lightcurvelynx.obstable.obs_table.ObsTableAn ObsTable for observations from the Rubin Observatory data releases.
- Parameters:
table (dict or pandas.core.frame.DataFrame) – The table with all the LSST survey information.
colmap (dict) – A mapping of standard column names to a list of possible names in the input table. Each value in the dictionary can be a string or a list of strings. Defaults to the Rubin CCDVisit column names, stored in _default_colnames.
saturation_mags (dict, optional) – A dictionary mapping filter names to their saturation thresholds in magnitudes. The filters provided must match those in the table. If not provided, LSST-specific defaults will be used.
**kwargs (dict) –
Additional keyword arguments to pass to the constructor. This includes overrides for survey parameters such as:
dark_current : The dark current for the camera in electrons per second per pixel.
gain: The gain for the camera in electrons per ADU.
pixel_scale: The pixel scale for the camera in arcseconds per pixel.
radius: The angular radius of the observations (in degrees).
read_noise: The readout noise for the camera in electrons per pixel.
- classmethod from_ccdvisit_table(table, make_detector_footprint=True, **kwargs)[source]
Construct an LSSTObsTable object from a CCDVisit table.
As an example we could access the DP1 CCDVisit table from RSP as:
from lsst.rsp import get_tap_service service = get_tap_service("tap") table = service.search("SELECT * FROM dp1.CcdVisit").to_table().to_pandas()
Or you can read a table from a file (e.g. using the read_sqlite_table function):
from lightcurvelynx.utils.io_utils import read_sqlite_table table = read_sqlite_table("path_to_file.db", sql_query="SELECT * FROM observations")
Note that this will load a single pointing per-ccd. If you do not use make_detector_footprint=True, you will observe multiple points in your light curve with the same time stamp whenever the point falls near the edge of a chip.
- Parameters:
table (pandas.core.frame.DataFrame) – The CCDVisit table containing the LSSTObsTable data.
make_detector_footprint (bool, optional) – If True, the detector footprint will be created based on the specified survey values for number of x pixels, number of y pixels, and pixel_scale. Default is True
**kwargs (dict) – Additional keyword arguments to pass to the LSSTObsTable constructor.
- Returns:
obstable – An LSSTObsTable object containing the data from the CCDVisit table.
- Return type:
- classmethod from_sv_visits_table(table, **kwargs)[source]
Construct an LSSTObsTable object from a science validation visits table. https://survey-strategy.lsst.io/progress/sv_status/sv_20250930.html Note this table uses a combination of the schemas (e.g. OpSim and ConsDB).
As an example we can read a table from a file (e.g. using the read_sqlite_table function):
from lightcurvelynx.utils.io_utils import read_sqlite_table table = read_sqlite_table("path_to_file.db", sql_query="SELECT * FROM observations")
- Parameters:
table (pandas.core.frame.DataFrame) – The science validation visits table containing the LSSTObsTable data.
**kwargs (dict) – Additional keyword arguments to pass to the LSSTObsTable constructor.
- Returns:
obstable – An LSSTObsTable object containing the data from the science validation visits table.
- Return type: