sorcha.utilities.sorchaConfigs
Classes
Data class for holding INPUTS section configuration file keys and validating them. |
|
Data class for holding SIMULATION section configuration file keys and validating them |
|
Data class for holding FILTERS section configuration file keys and validating them |
|
Data class for holding SATURATION section configuration file keys and validating them |
|
Data class for holding PHASECURVES section configuration file keys and validating them |
|
Data class for holding FOV section configuration file keys and validating them |
|
Data class for holding FADINGFUNCTION section configuration file keys and validating them |
|
Data class for holding LINKINGFILTER section configuration file keys and validating them. |
|
Data class for holding OUTPUT section configuration file keys and validating them. |
|
Data class for holding LIGHTCURVE section configuration file keys and validating them. |
|
Data class for holding Activity section configuration file keys and validating them. |
|
Data class for holding expert section configuration file keys and validating them. |
|
Data class for holding auxiliary section configuration file keys and validating them. |
|
Dataclass which stores configuration file keywords in dataclasses, |
|
Set the dataclass to load from a file |
Functions
|
Checks to confirm that a mandatory config file value is present and has been read into the dataclass as truthy. Returns an error if value is falsy |
|
Checks to confirm that a config file value is not present and has been read into the dataclass as falsy. Returns an error if value is truthy |
|
Checks to see if value can be cast as an interger. |
|
Checks to see if value can be cast as a float. |
|
Checks to see if value can be cast as a boolen. |
|
Checks to see if a config variable is in a list of permissible variables. |
|
Checks to see if value can be cast as a boolen and if not set (equals None) gives default bool. |
|
Prints all the values from the config file and command line to the log. |
Module Contents
- class inputConfigs[source]
Data class for holding INPUTS section configuration file keys and validating them.
- class simulationConfigs[source]
Data class for holding SIMULATION section configuration file keys and validating them
- ar_fov_buffer: float = None[source]
the buffer zone around the field of view we want to include, in degrees
- ar_picket: float = None[source]
imprecise discretization of time that allows us to move progress our simulations forward without getting too granular when we don't have to. the unit is number of days.
- ar_obs_code: str = None[source]
the obscode is the MPC observatory code for the provided telescope.
- ar_healpix_order: int = None[source]
the order of healpix which we will use for the healpy portions of the code.
- class filtersConfigs[source]
Data class for holding FILTERS section configuration file keys and validating them
- observing_filters: str = None[source]
Filters of the observations you are interested in, comma-separated.
- class saturationConfigs[source]
Data class for holding SATURATION section configuration file keys and validating them
- bright_limit: float = None[source]
Upper magnitude limit on sources that will overfill the detector pixels/have counts above the non-linearity regime of the pixels where one can’t do photometry. Objects brighter than this limit (in magnitude) will be cut.
- class phasecurvesConfigs[source]
Data class for holding PHASECURVES section configuration file keys and validating them
- class fovConfigs[source]
Data class for holding FOV section configuration file keys and validating them
- camera_model: str = None[source]
Choose between circular or actual camera footprint, including chip gaps.
- footprint_path: str = None[source]
Path to camera footprint file. Uncomment to provide a path to the desired camera detector configuration file if not using the default built-in detector configuration for the actual camera footprint.
- fill_factor: str = None[source]
Fraction of detector surface area which contains CCD -- simulates chip gaps for OIF output. Comment out if using camera footprint.
- circle_radius: float = None[source]
Radius of the circle for a circular footprint (in degrees). Float. Comment out or do not include if using footprint camera model.
- footprint_edge_threshold: float = None[source]
The distance from the edge of a detector (in arcseconds on the focal plane) at which we will not correctly extract an object. By default this is 10px or 2 arcseconds. Comment out or do not include if not using footprint camera model.
- _validate_fov_configs()[source]
Validates the fov config attributes after initialisation.
- Parameters:
None.
- Return type:
None
- _camera_footprint()[source]
Validates the fov config attributes for a footprint camera model.
- Parameters:
None.
- Return type:
None
- class fadingfunctionConfigs[source]
Data class for holding FADINGFUNCTION section configuration file keys and validating them
- fading_function_on: bool = None[source]
Detection efficiency fading function on or off. Default True
- fading_function_width: float = None[source]
Width parameter for fading function. Should be greater than zero and less than 0.5.
- fading_function_peak_efficiency: float = None[source]
Peak efficiency for the fading function, called the 'fill factor' in Chesley and Veres (2017).
- des_transient_efficency: float = None[source]
Overall transient efficiency for moving object detection
- class linkingfilterConfigs[source]
Data class for holding LINKINGFILTER section configuration file keys and validating them.
- ssp_detection_efficiency: float = None[source]
ssp detection efficiency. Which fraction of the observations of an object will the automated solar system processing pipeline successfully link? Float.
- ssp_number_observations: int = None[source]
Length of tracklets. How many observations of an object during one night are required to produce a valid tracklet?
- ssp_separation_threshold: float = None[source]
Minimum separation (in arcsec) between two observations of an object required for the linking software to distinguish them as separate and therefore as a valid tracklet.
- ssp_maximum_time: float = None[source]
Maximum time separation (in days) between subsequent observations in a tracklet. Default is 0.0625 days (90mins).
- ssp_number_tracklets: int = None[source]
Number of tracklets for detection. How many tracklets are required to classify an object as detected?
- ssp_track_window: int = None[source]
The number of tracklets defined above must occur in <= this number of days to constitute a complete track/detection.
- ssp_night_start_utc: float = None[source]
The time in UTC at which it is noon at the observatory location (in standard time). For the LSST, 12pm Chile Standard Time is 4pm UTC.
- distance_cut_on: bool = None[source]
flag for DES for object-sun light-time-corrected distance cuts
- distance_cut_upper: float = None[source]
The upper distance limit for object-sun light-time-corrected distance for DES to detect objects. in km
- distance_cut_lower: float = None[source]
The lower distance limit for object-sun light-time-corrected distance for DES to detect objects. in km
- class outputConfigs[source]
Data class for holding OUTPUT section configuration file keys and validating them.
- class lightcurveConfigs[source]
Data class for holding LIGHTCURVE section configuration file keys and validating them.
- class activityConfigs[source]
Data class for holding Activity section configuration file keys and validating them.
- class expertConfigs[source]
Data class for holding expert section configuration file keys and validating them.
- snr_limit: float = None[source]
Drops observations with signal to noise ratio less than limit given
- vignetting_on: bool = None[source]
flag for calculating effects of vignetting on limiting magnitude
- class auxiliaryConfigs[source]
Data class for holding auxiliary section configuration file keys and validating them.
- planet_ephemeris_url: str = 'https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/planets/de440s.bsp'[source]
url for planet_ephemeris
- earth_predict_url: str = 'https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/earth_2025_250826_2125_predict.bpc'[source]
url for earth_predict
- earth_historical_url: str = 'https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/earth_620120_250826.bpc'[source]
url for earth_historical
- earth_high_precision_url: str = 'https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/earth_latest_high_prec.bpc'[source]
url of earth_high_precision
- jpl_planets_url: str = 'https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/de440/linux_p1550p2650.440'[source]
url of jpl_planets
- jpl_small_bodies_url: str = 'https://ssd.jpl.nasa.gov/ftp/eph/small_bodies/asteroids_de441/sb441-n16.bsp'[source]
url of jpl_small_bodies
- leap_seconds_url: str = 'https://naif.jpl.nasa.gov/pub/naif/generic_kernels/lsk/naif0012.tls'[source]
url of leap_seconds
- observatory_codes_compressed: str = 'ObsCodes.json.gz'[source]
filename of observatory_codes_compressed
- observatory_codes_compressed_url: str = 'https://minorplanetcenter.net/Extended_Files/obscodes_extended.json.gz'[source]
url of observatory_codes_compressed
- orientation_constants_url: str = 'https://naif.jpl.nasa.gov/pub/naif/generic_kernels/pck/pck00010.tpc'[source]
url of observatory_constants
- ordered_kernel_files: list = None[source]
list of kernels ordered from least to most precise - used to assemble meta_kernel file
- registry: list = None[source]
Default Pooch registry to define which files will be tracked and retrievable
- property default_url[source]
returns a dictionary of the default urls used in this version of sorcha
- property default_filenames[source]
returns a dictionary of the default filenames used in this version
- class basesorchaConfigs[source]
Dataclass which stores configuration file keywords in dataclasses, Usefull for using runLSSTSimulation without a dedicated config file. Use sorchaConfigs to read config files.
- input: inputConfigs = None[source]
inputConfigs dataclass which stores the keywords from the INPUT section of the config file.
- simulation: simulationConfigs = None[source]
simulationConfigs dataclass which stores the keywords from the SIMULATION section of the config file.
- filters: filtersConfigs = None[source]
filtersConfigs dataclass which stores the keywords from the FILTERS section of the config file.
- saturation: saturationConfigs = None[source]
saturationConfigs dataclass which stores the keywords from the SATURATION section of the config file.
- phasecurves: phasecurvesConfigs = None[source]
phasecurveConfigs dataclass which stores the keywords from the PHASECURVES section of the config file.
- fov: fovConfigs = None[source]
fovConfigs dataclass which stores the keywords from the FOV section of the config file.
- fadingfunction: fadingfunctionConfigs = None[source]
fadingfunctionConfigs dataclass which stores the keywords from the FADINGFUNCTION section of the config file.
- linkingfilter: linkingfilterConfigs = None[source]
linkingfilterConfigs dataclass which stores the keywords from the LINKINGFILTER section of the config file.
- output: outputConfigs = None[source]
outputConfigs dataclass which stores the keywords from the OUTPUT section of the config file.
- lightcurve: lightcurveConfigs = None[source]
lightcurveConfigs dataclass which stores the keywords from the LIGHTCURVE section of the config file.
- activity: activityConfigs = None[source]
activityConfigs dataclass which stores the keywords from the ACTIVITY section of the config file.
- expert: expertConfigs = None[source]
expertConfigs dataclass which stores the keywords from the EXPERT section of the config file.
- auxiliary: auxiliaryConfigs = None[source]
auxiliaryConfigs dataclass which stores the keywords from the AUXILIARY section of the config file.
- class sorchaConfigs(config_file_location=None, survey_name=None)[source]
Bases:
basesorchaConfigsSet the dataclass to load from a file
- check_key_exists(value, key_name)[source]
Checks to confirm that a mandatory config file value is present and has been read into the dataclass as truthy. Returns an error if value is falsy
- Parameters:
value (object attribute) -- value of the config file attribute
key_name (string) -- The key being checked.
- Return type:
None.
- check_key_doesnt_exist(value, key_name, reason)[source]
Checks to confirm that a config file value is not present and has been read into the dataclass as falsy. Returns an error if value is truthy
- Parameters:
value (object attribute) -- value of the config file attribute
key_name (string) -- The key being checked.
reason (string) -- reason given in the error message on why this value shouldn't be in the config file
- Return type:
None.
- cast_as_int(value, key)[source]
Checks to see if value can be cast as an interger.
- Parameters:
value (object attribute) -- value of the config file attribute
key (string) -- The key being checked.
- Return type:
value as an integer
- cast_as_float(value, key)[source]
Checks to see if value can be cast as a float.
- Parameters:
value (object attribute) -- value of the config file attribute
key (string) -- The key being checked.
- Return type:
value as a float
- cast_as_bool(value, key)[source]
Checks to see if value can be cast as a boolen.
- Parameters:
value (object attribute) -- value of the config file attribute
key (string) -- The key being checked.
- Return type:
value as a boolen
- check_value_in_list(value, valuelist, key)[source]
Checks to see if a config variable is in a list of permissible variables.
- Parameters:
value (object attribute) -- value of the config file value
valuelist (list) -- list of permissible values for attribute
key (string) -- The key being checked.
- Return type:
None.
- cast_as_bool_or_set_default(value, key, default)[source]
Checks to see if value can be cast as a boolen and if not set (equals None) gives default bool.
- Parameters:
value (object attribute) -- value of the config file attribute
key (string) -- The key being checked.
default (bool) -- default bool if value is None
- Return type:
value as a boolen