Skybrightness Pre API

class rubin_scheduler.skybrightness_pre.SkyModelPre(data_path=None, init_load_length=10, load_length=365, verbose=False, mjd0=None, location=None, sun_alt_limit=-8.0)[source]

Bases: SkyModelPreWithResources

rubin_scheduler.skybrightness_pre.dark_m5(decs, filtername, latitude_rad, fiducial_FWHMEff, exptime=30.0, nexp=1)[source]

Return a nominal best-depth map of the sky

Parameters:
  • decs (float) – The declinations for the desired points. Float or adday-like. (radians)

  • filtername (str) – Name of filter, one of ugrizy.

  • latitude_rad (float) – Latitude of the observatory (radians)

  • fiducial_FWHMEff (float) – The fiducial seeing FWHMeff to use (arcsec).

  • exptime (float) – The fiducial exposure time to assume (seconds). Default 30.

  • nexp (int) – The number of exposures per visit. Default 1.

rubin_scheduler.skybrightness_pre.dark_sky(nside=32)[source]

Load an array of HEALpix maps that have the darkest expected sky backgrounds per filter.

Parameters:

nside (int) – Desired nside resolution (default=DEFAULT_NSIDE).

Returns:

dark_sky_data – Named array with dark sky data for each band.

Return type:

np.ndarray

rubin_scheduler.skybrightness_pre.interp_angle(x_out, xp, anglep, degrees=False)[source]

Interpolate angle values (handle wrap around properly). Does nearest neighbor interpolation if values out of range.

Parameters:
  • x_out (float or array) – The points to interpolate to.

  • xp (array) – Points to interpolate between (must be sorted)

  • anglep (array) – The angles ascociated with xp

  • degrees (bool (False)) – Set if anglep is degrees (True) or radidian (False)