Coverage for python/lsst/sims/utils/Site.py : 91%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Site Class
Class defines the attributes of the site unless overridden ajc@astro 2/23/2010
Restoring this so that the astrometry mixin in Astrometry.py can inherit the site information danielsf 1/27/2014
"""
""" This is a struct containing the LSST site parameters as defined in
https://docushare.lsstcorp.org/docushare/dsweb/ImageStoreViewer/LSE-30
(accessed on 4 January 2016)
This class only exists for initializing Site with LSST parameter values. Users should not be accessing this class directly. """
# the lapse rate was not specified by LSE-30; # 0.0065 K/m appears to be the "standard" value # see, for example http://mnras.oxfordjournals.org/content/365/4/1235.full
""" This class will store site information for use in Catalog objects.
Defaults values are LSST site values taken from the Observatory System Specification document
https://docushare.lsstcorp.org/docushare/dsweb/ImageStoreViewer/LSE-30
on 4 January 2016
Attributes ---------- longitude: in degrees
longitude_rad: longitude in radians
latitude: in degrees
latitude_rad: latitude in radians
height: in meters
temperature: mean temperature in Centigrade
temperature_kelvin: mean temperature in Kelvin
pressure: in millibars
humidity: relative humidity (range 0-1)
lapseRate: change in temperature in Kelvins per meter
name: name of the observatory. If set to 'LSST' any unspecified values will default to LSST values as defined in
https://docushare.lsstcorp.org/docushare/dsweb/ImageStoreViewer/LSE-30
i.e. longitude=-70.7494 degrees latitude=-30.2444 degrees height=2650.0 meters temperature=11.5 centigrade pressure=750.0 millibars humidity=0.4 lapseRate=0.0065in Kelvin per meter """ name=None, longitude=None, latitude=None, height=None, temperature=None, pressure=None, humidity=None, lapseRate=None): """ Parameters ---------- name: a string denoting the name of the observator. Set to 'LSST' for other parameters to default to LSST values.
i.e. longitude=-70.7494 degrees latitude=-30.2444 degrees height=2650.0 meters temperature=11.5 centigrade pressure=750.0 millibars humidity=0.4 lapseRate=0.0065 in Kelvin per meter
longitude: in degrees
latitude: in degrees
height: in meters
temperature: in Centigrade
pressure: in millibars
humidity: relative (range 0-1)
lapseRate: in Kelvin per meter """
else:
else:
else:
# Go through all the attributes of this Site. # Raise a warning if any are None so that the user # is not surprised when some use of this Site fails # because something that should have beena a float # is NoneType raise RuntimeError("in Site: longitude is None but longitude_rad is not") raise RuntimeError("in Site: longitude_rad is None but longitude is not")
raise RuntimeError("in Site: latitude is None but latitude_rad is not") raise RuntimeError("in Site: latitude_rad is None but latitude is not")
raise RuntimeError("in Site: temperature_kelvin is None but temperature is not") raise RuntimeError("in Site: temperature is None but temperature_kelvin is not")
return False
return False
def name(self): """ observatory name """
def longitude_rad(self): """ observatory longitude in radians """
def longitude(self): """ observatory longitude in degrees """
def latitude_rad(self): """ observatory latitude in radians """
def latitude(self): """ observatory latitude in degrees """
def temperature(self): """ mean temperature in centigrade """
def temperature_kelvin(self): """ mean temperature in Kelvin """
def height(self): """ height in meters """
def pressure(self): """ mean pressure in millibars """
def humidity(self): """ mean humidity in the range 0-1 """
def lapseRate(self): """ temperature lapse rate (in Kelvin per meter) """ |