From fe9d197a1a2ee4d9e9013871fb5a646d71792c6d Mon Sep 17 00:00:00 2001 From: glass-ships Date: Tue, 4 Feb 2025 15:08:34 -0500 Subject: [PATCH] change defaults and precision --- RefRed/interfaces/instrument_settings.py | 19 ++++++++------- RefRed/interfaces/instrument_settings.ui | 30 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/RefRed/interfaces/instrument_settings.py b/RefRed/interfaces/instrument_settings.py index 7bd48551..1c929830 100644 --- a/RefRed/interfaces/instrument_settings.py +++ b/RefRed/interfaces/instrument_settings.py @@ -123,17 +123,20 @@ def accept(self): class InstrumentSettings(GlobalSettings): - """Dataclass to store instrument geometry parameters. These are global options""" + """Dataclass to store instrument geometry parameters. These are global options + + Default values are determined by settings.json from lr_reduction + """ # pydantic fields apply_instrument_settings: bool = False - source_detector_distance: float = 0.0 - sample_detector_distance: float = 0.0 - num_x_pixels: int = 0 - num_y_pixels: int = 0 - pixel_width: float = 0.0 - xi_reference: float = 0.0 - s1_sample_distance: float = 0.0 + source_detector_distance: float = 15.75 + sample_detector_distance: float = 1.83 + num_x_pixels: int = 256 + num_y_pixels: int = 304 + pixel_width: float = 0.70 + xi_reference: float = 445 + s1_sample_distance: float = 1.485 # class variable, translates fields to XML tag names, same names as the lr_reduction package def to_xml(self, indent: str = "") -> str: diff --git a/RefRed/interfaces/instrument_settings.ui b/RefRed/interfaces/instrument_settings.ui index 3130267e..7ec6176d 100644 --- a/RefRed/interfaces/instrument_settings.ui +++ b/RefRed/interfaces/instrument_settings.ui @@ -55,6 +55,12 @@ 1000000000.000000000000000 + + 3 + + + 0.1 + @@ -62,6 +68,12 @@ 1000000000.000000000000000 + + 3 + + + 0.1 + @@ -129,6 +141,12 @@ 1000000000.000000000000000 + + 3 + + + 0.1 + @@ -150,6 +168,12 @@ 1000000000.000000000000000 + + 3 + + + 0.1 + @@ -224,6 +248,12 @@ 1000000000.000000000000000 + + 3 + + + 0.1 +