survey.lsst#

This module defines the LSST survey class and utilities for loading and parsing LSST OpSim observation databases.

skysurvey.survey.lsst.get_lsst_footprint()[source]#

Get the LSST footprint, a (3 5 5 5 3) ccd structure centered on 0 with a 9.6 deg**2 area.

Return type:

shapely.geometry.Polygon

skysurvey.survey.lsst.read_opsim(filepath, columns=['fieldRA', 'fieldDec', 'observationStartMJD', 'visitExposureTime', 'filter', 'skyBrightness', 'fiveSigmaDepth', 'night', 'numExposures', 'observationId'], sql_where=None)[source]#

Parse input opsim database and returns a dataframe.

Parameters:
  • filepath (str, path) – path to the opsim db.

  • columns (list, None) – list of column to load from the db. Is ‘None’, all loaded.

  • sql_where (str, None) – options to select rows to load. e.g. night<365.

Return type:

pandas.DataFrame

class skysurvey.survey.lsst.LSST(footprint=None, nside=200, data=None)[source]#

Bases: Survey

A class to model the LSST survey.

Parameters:
  • footprint (shapely.geometry) – footprint in the sky of the observing camera

  • nside (int) – healpix nside parameter

  • data (pandas.DataFrame) – observing data.

  • _FOOTPRINT (shapely.geometry.Polygon) – The LSST camera footprint loaded via get_lsst_footprint().

classmethod from_opsim(filepath, sql_where=None, zp=30, backend='pandas', **kwargs)[source]#

Load a LSST survey object from an opsim db path.

Parameters:
  • filepath (str, path) – path to the opsim db.

  • sql_where (str, None) – options to select rows to load. e.g. night<365.

  • zp (float) – zp to convert maglimit into skynoise and used for LC flux definition

  • backend (str) –

    backend used to merge the data:

    • polars (fastest): requires polars installed -> converted to pandas at the end

    • pandas (classic): the normal way

    • dask (lazy): as persisted dask.dataframe is returned

  • read_opsim() (**kwargs goes to)

Return type:

LSST