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

  • 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.


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


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


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

Return type:


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.

  • 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)