threshold module¶
A module providing analysis methods for determining cloudiness thresholds.
The predominant function of this module is to analyze saved cloudiness data to try and determine the cloudiness value that corresponds to whether or not the telescope dome is closed or open. The main method analyzes the cloudiness of each image relative to the mean cloudiness for the phase of the moon on that night. Each night images were taken when the dome was closed. Images whose cloudiness is above a certain value are considered to have been taken when the dome was closed. If the proportion of images above this value is approximately equal to the known percentage of the night when the dome was closed then this value is designated the threshold for each night. Two helper methods are provided: one to find the number of days into a year a given date is, and one to convert a date to a format accepted by pyephem.
-
threshold.daynum(date)[source]¶ Find the number of the days into a year a given date is.
Parameters: date (str) – Date in yyyymmdd format. Returns: num – The number of days into the year the given date is. Return type: int
-
threshold.find_threshold()[source]¶ Find the mean cloudiness threshold for 2016 and 2017 combined.
Returns: - total (float) – The threshold value if each day is considered individually.
- weektotal (float) – The threshold value if the days are grouped by week.
Notes
The method analyzes the cloudiness of each image relative to the mean cloudiness for the phase of the moon on that night. Each night images were taken when the dome was closed. Images whose cloudiness is above a certain value are considered to have been taken when the dome was closed. This method finds that value by using the percentage of each night when the dome is closed, which is already known. The proportion of images above this value will be approximately equal to the known percentage. This value is designated the threshold for each night. The method finds this threshold for every night and then returns the median of that dataset.
This method additionally runs the same analysis where an entire week is considered at a time, rather than single nights. The returned value is the median of the 52 week thresholds.