slsim.LsstSciencePipeline package

Submodules

slsim.LsstSciencePipeline.lsst_science_pipeline module

slsim.LsstSciencePipeline.opsim_pipeline module

slsim.LsstSciencePipeline.opsim_pipeline.opsim_time_series_images_data(ra_list, dec_list, obs_strategy, MJD_min=60000, MJD_max=64500, num_pix=101, moffat_beta=3.1, readout_noise=10, delta_pix=0.2, print_warning=True, opsim_path=None)[source]

Creates time series data from opsim database.

Parameters:
  • ra_list – a list of ra points (in degrees) from objects we want to collect observations for

  • dec_list – a list of dec points (in degrees) from objects we want to collect observations for

  • obs_strategy – version of observing strategy corresponding to opsim database. for example “baseline_v3.0_10yrs” (string)

  • MJD_min – minimum MJD for the observations

  • MJD_max – maximum MJD for the observations

  • num_pix – cutout size of images (in pixels)

  • moffat_beta – power index of the moffat psf kernel

  • readout_noise – noise added per readout

  • delta_pix – size of pixel in units arcseonds

  • print_warning – if True, prints a warning of coordinates outside of the LSST footprint

  • opsim_path – optional: provide a path to the opsim database. if None: use “../data/OpSim_database/” + obs_strategy + “.db” as default path.

Returns:

a list of astropy tables containing observation information for each coordinate

slsim.LsstSciencePipeline.slsim_object module

class slsim.LsstSciencePipeline.slsim_object.SLSimObject(image_array, psfkernel, pixelscale)[source]

Bases: object

Class to manage image, corresponding psf, and other properties.

Provides all the information about an image and can be used this object in add_object() function.

class ImageWrapper(image_array)[source]

Bases: object

Wrapper class to access the ‘array’ attribute directly.

property image

Returns image array.

property pixel_scale

Returns pixel scale.

property psf_kernel

Returns psf kernel.

slsim.LsstSciencePipeline.util_lsst module

slsim.LsstSciencePipeline.util_lsst.extract_lightcurves_in_different_bands(transient_data_table)[source]

Extract lightcurves and images in different bands from the given catalog. This a function written to read data table from transient_data_with_cadence function above.

Parameters:

transient_data_table – An astropy table containing lightcurves in a certain cadence. This table must contain magnitude and corresponding errors. The column name for magnitude should be “mag_image_n”, and column names for the error should be “mag_error_image_n_low” and “mag_error_image_n_high”, where n could be 1, 2, 3, or 4.

Returns:

A dictionary of magnitudes, associated errors, observation times, structured by band.

slsim.LsstSciencePipeline.util_lsst.multiple_variable_lens_injection(lens_class_list, band, num_pix, transform_matrices_list, exposure_data_list, output_file=None)[source]

Injects multiple variable lenses to multiple dp0 time series data.

Parameters:
  • lens_class_list – list of Lens() object

  • band – imaging band

  • num_pix – number of pixels per axis

  • transform_matrices_list – list of transformation matrix (2x2) of pixels into coordinate displacements for each exposure

  • exposure_data – list of astropy table of exposure data for each set of time series images. It must contain calexp images or generated noisy background image (column name should be “time_series_images”, these images are single exposure images of the same part of the sky at different time), magnitude zero point (column name should be “zero_point”, these are zero point magnitudes for each single exposure images in time series image) , psf kernel for each exposure (column name should be “psf_kernel”, these are pixel psf kernel for each single exposure images in time series image), exposure time (column name should be “expo_time”, these are exposure time for each single exposure images in time series images), observation time (column name should be “obs_time”, these are observation time in days for each single exposure images in time series images)

  • output_file – path to the output FITS file where data will be saved

Returns:

list of astropy table of injected lenses and exposure information of dp0 data for each time series lenses. If output_file path is provided, it saves list of these astropy table in fits file with the given name.

slsim.LsstSciencePipeline.util_lsst.opsim_variable_lens_injection(lens_class, bands, num_pix, transform_pix2angle, exposure_data)[source]

Injects variable lens to the OpSim time series data (1 object).

Parameters:
  • lens_class – Lens() object

  • bands – list of imaging bands of interest

  • num_pix – number of pixels per axis

  • transform_pix2angle – transformation matrix (2x2) of pixels into coordinate displacements

  • exposure_data – An astropy table of exposure data. One entry of table_list_data generated from the opsim_time_series_images_data function. It must contain the rms of background noise fluctuations (column name should be “bkg_noise”), psf kernel for each exposure (column name should be “psf_kernel”, these are pixel psf kernel for each single exposure images in time series image), observation time (column name should be “obs_time”, these are observation time in days for each single exposure images in time series images), exposure time (column name should be “expo_time”, these are exposure time for each single exposure images in time series images), magnitude zero point (column name should be “zero_point”, these are zero point magnitudes for each single exposure images in time series image), coordinates of the object (column name should be “calexp_center”), these are the coordinates in (ra, dec), and the band in which the observation is taken (column name should be “band”).

Returns:

Astropy table of injected lenses and exposure information of dp0 data.

slsim.LsstSciencePipeline.util_lsst.transient_data_with_cadence(lens_class, exposure_data, noise=True, symmetric=False, pix_scale=0.2, random_seed=None)[source]

Puts lensed transient into the provided cadence. For LSST, this will be cadence from opsim.

Parameters:
  • lens_class – Lens() object

  • exposure_data – An astropy table of exposure data. One entry of table_list_data generated from the opsim_time_series_images_data function. It must contain the rms of background noise fluctuations (column name should be “bkg_noise”), psf kernel for each exposure (column name should be “psf_kernel”, these are pixel psf kernel for each single exposure images in time series image), observation time (column name should be “obs_time”, these are observation time in days for each single exposure images in time series images), exposure time (column name should be “expo_time”, these are exposure time for each single exposure images in time series images), magnitude zero point (column name should be “zero_point”, these are zero point magnitudes for each single exposure images in time series image), coordinates of the object (column name should be “calexp_center”), these are the coordinates in (ra, dec), and the band in which the observation is taken (column name should be “band”).

  • noise – Boolean. If True, a gaussian noise is added to the lightcurve flux.

  • symmetric – Boolean. If True, a symmetric error on magnitude is provided.

  • pixscale – pixel scale of the observing instrument.

Returns:

Astropy table of lightcurve and exposure information of dp0 data. The table contains: Observation time in days, lens id, magnitude of each image and associated errors, lens image. If the lens system produces fewer than four images, the missing magnitudes and errors are filled with -1.

slsim.LsstSciencePipeline.util_lsst.variable_lens_injection(lens_class, band, num_pix, transform_pix2angle, exposure_data)[source]

Injects variable lens to the dp0 time series data.

Parameters:
  • lens_class – Lens() object

  • band – imaging band

  • num_pix – number of pixels per axis

  • transform_pix2angle – transformation matrix (2x2) of pixels into coordinate displacements

  • exposure_data – An astropy table of exposure data. It must contain calexp images or generated noisy background image (column name should be “time_series_images”, these images are single exposure images of the same part of the sky at different time), magnitude zero point (column name should be “zero_point”, these are zero point magnitudes for each single exposure images in time series image) , psf kernel for each exposure (column name should be “psf_kernel”, these are pixel psf kernel for each single exposure images in time series image), exposure time (column name should be “expo_time”, these are exposure time for each single exposure images in time series images), observation time (column name should be “obs_time”, these are observation time in days for each single exposure images in time series images)

Returns:

Astropy table of injected lenses and exposure information of dp0 data

Module contents