lightcurvelynx.obstable.ztf_obstable

Attributes

ZTFCAM_PIXEL_SCALE

The pixel scale for the ZTF camera in arcseconds per pixel.

Classes

ZTFObsTable

A subclass for ZTF exposure table.

Functions

create_random_ztf_obs_data(num_obs[, seed])

Create a random ObsTable pointings drawn uniformly from (RA, dec).

Module Contents

ZTFCAM_PIXEL_SCALE = 1.01[source]

The pixel scale for the ZTF camera in arcseconds per pixel.

class ZTFObsTable(table, colmap=None, saturation_mags=None, **kwargs)[source]

Bases: lightcurvelynx.obstable.obs_table.ObsTable

A subclass for ZTF exposure table.

Parameters:
  • table (dict or pandas.core.frame.DataFrame) – The table with all the observation 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 ZTF 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, ZTF-specific defaults will be used.

  • **kwargs (dict) –

    Additional keyword arguments to pass to the ObsTable 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 CCD gain (in e-/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 standard deviation of the count of readout electrons per pixel.

classmethod from_db(filename, sql_query='SELECT * from exposures', colmap=None)[source]

Create an ObsTable object from the data in a db file.

Parameters:
  • filename (str) – The name of the db file.

  • sql_query (str) – The SQL query to use when loading the table. Default: “SELECT * FROM observations”

  • colmap (dict, optional) – A mapping of short column names to their names in the underlying table. If None then defaults to the ZTF column names.

Returns:

obstable – A table with all of the pointing data.

Return type:

ZTFObsTable

Raises:
  • FileNotFoundError – if the file does not exist.

  • ValueError – if unable to load the table.

create_random_ztf_obs_data(num_obs, seed=None)[source]

Create a random ObsTable pointings drawn uniformly from (RA, dec).

Parameters:
  • num_obs (int) – The size of the ObsTable to generate.

  • seed (int) – The seed to used for random number generation. If None then uses a default random number generator. Default: None

Returns:

obstable – The data for the ObsTable.

Return type:

pd.DataFrame