From de2a31d18e50d0c5c52a201740f6db9bb2270295 Mon Sep 17 00:00:00 2001 From: germanhydrogen Date: Fri, 9 Aug 2024 15:51:36 +0200 Subject: [PATCH] Updated example.yaml --- day_integration_test.yaml | 2 +- example.yaml | 86 ++++++++++++++----- night_integration_test.yaml | 2 +- .../cloud_info_calculator_factory.py | 2 +- .../cloud_info_calculator_options.py | 4 +- .../integration/test_day_pipeline_factory.py | 2 +- .../test_night_pipeline_factory.py | 2 +- tests/integration/test_pipeline_controller.py | 2 +- 8 files changed, 72 insertions(+), 30 deletions(-) diff --git a/day_integration_test.yaml b/day_integration_test.yaml index 5cd4a1c..f7a6257 100644 --- a/day_integration_test.yaml +++ b/day_integration_test.yaml @@ -44,7 +44,7 @@ modules: threshold: 3.5 coverage_info: - zenith_range: 80 + zenith_altitude: 80 comm: class: pyobs.comm.local.LocalComm diff --git a/example.yaml b/example.yaml index 24d759b..c263da0 100644 --- a/example.yaml +++ b/example.yaml @@ -3,23 +3,6 @@ class: pyobs_cloudcover.application.Application # Camera which images are used for cloud detection image_sender: "allskycam" -# Astronomical solution -# Possible models: -# Simple Model -# class: pyobs_cloudcover.world_model.SimpleModel -# parameters: (a0, F, R, c_x, c_y) see https://ui.adsabs.harvard.edu/abs/2019A&A...626A.105B -# WCS Model -# class: pyobs_cloudcover.world_model.WCSModel -# parameters: -# file_path: Path to FITS file containing WCS -model: - class: pyobs_cloudcover.world_model.SimpleModel - a0: 4.81426598e-03 - F: 2.00000000e+00 - R: 1.06352627e+03 - c_x: 7.57115607e+02 - c_y: 5.11194838e+02 - # Web Service server: # Host Name @@ -37,6 +20,39 @@ measurement_log: # Different image analysis pipelines can be used for different solar altitude intervals # Currently only the "night" pipeline is available, which works best after the astronomical dawn pipelines: + day: + alt_interval: + start: 18 + end: + + options: + # Astronomical solution + # Possible models: + # Simple Model + # class: pyobs_cloudcover.world_model.SimpleModel + # parameters: (a0, F, R, c_x, c_y) see https://ui.adsabs.harvard.edu/abs/2019A&A...626A.105B + # WCS Model + # class: pyobs_cloudcover.world_model.WCSModel + # parameters: + # file_path: Path to FITS file containing WCS + world_model: + class: pyobs_cloudcover.world_model.SimpleModel + a0: 4.81426598e-03 + F: 2.00000000e+00 + R: 1.06352627e+03 + c_x: 7.57115607e+02 + c_y: 5.11194838e+02 + + # Filepath to the image mask + mask_filepath: "data/mask.npy" + + cloud_map: + # Under which color ratio a pixel is considered cloudy (blue/red + blue/green) + threshold: 3.5 + + coverage_info: + # Altitude which is considered to be the lower boundary of the zenith to average for the zenith cloud fraction measurement (in degree) + zenith_altitude: 80 night: # Solar altitude interval (in degree), in which this pipeline should be used alt_interval: @@ -44,6 +60,23 @@ pipelines: end: -18 options: + # Astronomical solution + # Possible models: + # Simple Model + # class: pyobs_cloudcover.world_model.SimpleModel + # parameters: (a0, F, R, c_x, c_y) see https://ui.adsabs.harvard.edu/abs/2019A&A...626A.105B + # WCS Model + # class: pyobs_cloudcover.world_model.WCSModel + # parameters: + # file_path: Path to FITS file containing WCS + world_model: + class: pyobs_cloudcover.world_model.SimpleModel + a0: 4.81426598e-03 + F: 2.00000000e+00 + R: 1.06352627e+03 + c_x: 7.57115607e+02 + c_y: 5.11194838e+02 + preprocessor: # Filepath to the image mask mask_filepath: "tests/integration/mask.npy" @@ -72,14 +105,23 @@ pipelines: # Rectangle around the calculated star position with 2 * window_size + 1 length, in which the star searched for (in px) window_size: 6.0 - cloud_map: + # Determines at which celestial positions the limiting magnitude is evaluated + altaz_grid: + # Number of equidistant points on the hole celestial sphere + point_number: 100000 + # Lower boundary for altitude + limiting_altitude: 30 + + lim_mag_map: # Radius in which to use stars for estimating the limiting magnitude (in degree) radius: 7.0 # Number of consecutive images in which a star has to be visible to be considered visible for the limiting magnitude estimation integration_length: 1 - coverage_info: + cloud_map: # Under which limiting magnitude a pixel is considered cloudy (in mag) - cloud_threshold: 5.5 - # Radius around the zenith to average for the zenith cloud fraction measurement (in degree) - zenith_radius: 20 + threshold: 5.5 + + coverage_info: + # Altitude which is considered to be the lower boundary of the zenith to average for the zenith cloud fraction measurement (in degree) + zenith_altitude: 80 diff --git a/night_integration_test.yaml b/night_integration_test.yaml index 0eba0ca..a01672a 100644 --- a/night_integration_test.yaml +++ b/night_integration_test.yaml @@ -58,7 +58,7 @@ modules: threshold: 5.5 coverage_info: - zenith_range: 80 + zenith_altitude: 80 comm: class: pyobs.comm.local.LocalComm diff --git a/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_factory.py b/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_factory.py index 9d2b630..f671dac 100644 --- a/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_factory.py +++ b/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_factory.py @@ -12,7 +12,7 @@ def __init__(self, options: CloudInfoCalculatorOptions): def __call__(self) -> CoverageInfoCalculator: coverage_change_calculator = CoverageChangeCalculator() - zenith_masker = ZenithCloudCoverageCalculator(self._options.zenith_range) + zenith_masker = ZenithCloudCoverageCalculator(self._options.zenith_altitude) cloud_coverage_info_calculator = CoverageInfoCalculator(coverage_change_calculator, zenith_masker) return cloud_coverage_info_calculator diff --git a/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_options.py b/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_options.py index f4745d0..70073d2 100644 --- a/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_options.py +++ b/pyobs_cloudcover/cloud_info_calculator/cloud_info_calculator_options.py @@ -4,8 +4,8 @@ class CloudInfoCalculatorOptions(object): - def __init__(self, zenith_range: float) -> None: - self.zenith_range = zenith_range + def __init__(self, zenith_altitude: float) -> None: + self.zenith_altitude = zenith_altitude @classmethod def from_dict(cls, options: Dict[str, Any]) -> CloudInfoCalculatorOptions: diff --git a/tests/integration/test_day_pipeline_factory.py b/tests/integration/test_day_pipeline_factory.py index 255395d..f0f525e 100644 --- a/tests/integration/test_day_pipeline_factory.py +++ b/tests/integration/test_day_pipeline_factory.py @@ -35,7 +35,7 @@ def test_day_pipeline() -> None: "threshold": 3.5 }, "coverage_info": { - "zenith_range": 80 + "zenith_altitude": 80 } } diff --git a/tests/integration/test_night_pipeline_factory.py b/tests/integration/test_night_pipeline_factory.py index 930c720..4b5edb6 100644 --- a/tests/integration/test_night_pipeline_factory.py +++ b/tests/integration/test_night_pipeline_factory.py @@ -57,7 +57,7 @@ def test_night_pipeline() -> None: "threshold": 0.5 }, "coverage_info": { - "zenith_range": 80 + "zenith_altitude": 80 } } diff --git a/tests/integration/test_pipeline_controller.py b/tests/integration/test_pipeline_controller.py index 376a92b..0f23a58 100644 --- a/tests/integration/test_pipeline_controller.py +++ b/tests/integration/test_pipeline_controller.py @@ -64,7 +64,7 @@ def test_night_pipeline() -> None: "threshold": 0.5 }, "coverage_info": { - "zenith_range": 80 + "zenith_altitude": 80 } } }