From 1e85778ccedfebc3b77a53e946a5b53220cd9f79 Mon Sep 17 00:00:00 2001 From: oczoske Date: Tue, 3 Sep 2024 23:02:13 +0200 Subject: [PATCH 01/18] Setup METIS_WCU instrument --- METIS_WCU/METIS_WCU.yaml | 20 ++++++++++ METIS_WCU/default.yaml | 85 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 METIS_WCU/METIS_WCU.yaml create mode 100644 METIS_WCU/default.yaml diff --git a/METIS_WCU/METIS_WCU.yaml b/METIS_WCU/METIS_WCU.yaml new file mode 100644 index 0000000..d84da10 --- /dev/null +++ b/METIS_WCU/METIS_WCU.yaml @@ -0,0 +1,20 @@ +--- +### METIS Warm Calibration Unit effects + +object: warm calibration unit +alias : WCU +name: METIS +description: base configuration for METIS/WCU +date_modified: 2024-09-03 +changes: + - 2024-09-03 (OC) file created + +properties: + temperature: 15 # how warm is the WCU? - need temperatures for the source and for the mirrors! + +effects: + - name: wcu_mask + description: wcu mask (replace by Wheel) + class: PupilTransmission + kwargs: + transmission: 0.9 # change this, or provide a wheel diff --git a/METIS_WCU/default.yaml b/METIS_WCU/default.yaml new file mode 100644 index 0000000..968fb5c --- /dev/null +++ b/METIS_WCU/default.yaml @@ -0,0 +1,85 @@ +--- +### default configuration for METIS simulations using the WCU + +object: configuration +alias: OBS +name: METIS_WCU_default_configuration +description: default parameters and mode definitions for METIS/WCU +date_modified: 2024-09-03 +changes: + - 2024-09-03 (OC) file created + +packages: + - METIS_WCU + - METIS + +yamls: + - METIS_WCU.yaml + - METIS.yaml # applies to all modes + +properties: + instrument: "METIS_WCU" + modes: ["img_lm"] + exptime: 1. + dit: 1 # when exptime is given and auto_exposure is on, + ndit: 1 # these values are ignored + pupil_transmission: 1.0 # this is for the cold stop, should not be here + + # Default DPR keywords and template name. + # TODO: add those later + +mode_yamls: + - object: calibration + alias: OBS # or CAL? + name: img_lm + description: "METIS LM-band imaging with WCU" + yamls: + - METIS_IMG_LM.yaml + - METIS_DET_IMG_LM.yaml + properties: + psf_file: PSF_SCAO_9mag_06seeing.fits # TODO: change + filter_name: Lp + nd_filter_name: open + slit: false + adc: false + detector_readout_mode: fast + + - object: calibration + alias: OBS # or CAL? + name: img_n + description: "METIS N-band imaging with WCU" + yamls: + - METIS_IMG_N.yaml + - METIS_DET_IMG_N_GeoSnap.yaml + properties: + psf_file: PSF_SCAO_9mag_06seeing.fits + filter_name: N2 + nd_filter_name: open + slit: false + adc: false + chop_offsets: None # TODO: can we use this to turn of the ChopNodder? + nod_offsets: None + detector_readout_mode: high_capacity + + ### Define LSS and LMS modes + +--- +### default simulation parameters needed for a METIS simulation +# TODO: These appear here and in METIS/defaults.yaml +object: simulation +alias: SIM +name: METIS_simulation_parameters +description: RC simulation parameters which need to change for a METIS run + +properties: + random: + seed: None # 9001 + + spectral: + wave_min: 2.85 + wave_mid: 8.425 + wave_max: 14.0 + + computing: + spline_order: 1 + preload_field_of_views: True From bf1fe3b5a146e469e3ce5517de7733553c49d68a Mon Sep 17 00:00:00 2001 From: oczoske Date: Tue, 3 Sep 2024 23:36:03 +0200 Subject: [PATCH 02/18] a README with discussion of alternative implementations --- METIS_WCU/README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 METIS_WCU/README.md diff --git a/METIS_WCU/README.md b/METIS_WCU/README.md new file mode 100644 index 0000000..a4de942 --- /dev/null +++ b/METIS_WCU/README.md @@ -0,0 +1,61 @@ +# METIS WCU + +## Implementation + +Upstream of the METIS CFO, calibration observations use a different +OpticalTrain than science observations. The atmosphere and the ELT are +switched off, instead effects related to the optics of the WCU and the +relay are needed. Here, we attempt to implement this as a separate +instrument package built on top of the usual METIS +package. `METIS_WCU/default.yaml` defines the same modes as +`METIS/default.yaml`. Instead of importing the ELT and Armazones +packages (or the respective yaml files), it imports `METIS_WCU.yaml` +before handing over to `METIS/METIS.yaml` and the respective mode +yamls. + +The simulation is then built as follows: +``` +cmds = sim.UserCommands(use_instrument="METIS_WCU", set_modes=["img_lm"]) +metis = sim.OpticalTrain(cmds) +``` + +## Alternative implementation 1 + +With some rearrangement, `METIS/default.yaml` could define wcu modes in addition to the on-sky modes. In this case, each mode would need to define all necessary yamls, with no yamls being imported on the top level. For instance: +``` +- name: img_lm + yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml + - METIS_IMG_LMS.yaml + - METIS_DET_IMG_LM.yaml + +- name: wcu_img_lm + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_IMG_LM.yaml + - METIS_DET_IMG_LM.yaml +``` +This results in a long list of modes in a single file, although the total number of modes to be defined is the same as in the current implementation, where it is spread over two files (and two packages). This solution is backwards compatible as the existing modes are unchanged from the user perspective. + +## Alternative implementation 2 + +MICADO uses the fact that `set_modes` accepts a list to combine each of the instrument modes with either SCAO or MCAO, e.g. `set_modes=['MCAO', 'IMG_4mas']`. There is no default for the AO mode alone (the implicit default is "no AO"), so both modes must be provided. For METIS, one could use +``` +cmds1 = sim.UserCommands(use_instrument="METIS", set_modes=["ELT", "img_lm"]) +cmds2 = sim.UserCommands(use_instrument="METIS", set_modes=["WCU", "img_lm"]) +``` +The mode definitions would then look like this: +``` +- name: ELT + yamls: + - Armazones.yaml + - ELT.yaml + +- name: WCU + yamls: + - METIS_WCU.yaml +``` +This increases the number of modes to be defined in `default.yaml` by only two. However, the user interface, requiring explicit specification of `ELT` seems a little awkward (and not backwards compatible). From 06cde836ad4a6adb6f63311dc605f411ccc532d1 Mon Sep 17 00:00:00 2001 From: oczoske Date: Wed, 4 Sep 2024 00:04:47 +0200 Subject: [PATCH 03/18] more on effects --- METIS_WCU/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/METIS_WCU/README.md b/METIS_WCU/README.md index a4de942..85d8a22 100644 --- a/METIS_WCU/README.md +++ b/METIS_WCU/README.md @@ -1,5 +1,7 @@ # METIS WCU +Independent of the implementation options discussed below it may be necessary to move some parameter settings around. For instance, pixel scale is defined top-level in `METIS_IMG_N.yaml` (used in all implementations). It is not clear that this pixel scale is the same for WCU observations or whether it is at all a useful (or necessary) quantity. + ## Implementation Upstream of the METIS CFO, calibration observations use a different @@ -40,6 +42,8 @@ With some rearrangement, `METIS/default.yaml` could define wcu modes in addition ``` This results in a long list of modes in a single file, although the total number of modes to be defined is the same as in the current implementation, where it is spread over two files (and two packages). This solution is backwards compatible as the existing modes are unchanged from the user perspective. +In addition to the list of yamls, each mode definition includes a list of `properties`. There will be duplication both in this alternative and in the current implementation, but with the possibility of choosing different values for on-sky and wcu simulations if that is useful. + ## Alternative implementation 2 MICADO uses the fact that `set_modes` accepts a list to combine each of the instrument modes with either SCAO or MCAO, e.g. `set_modes=['MCAO', 'IMG_4mas']`. There is no default for the AO mode alone (the implicit default is "no AO"), so both modes must be provided. For METIS, one could use @@ -59,3 +63,9 @@ The mode definitions would then look like this: - METIS_WCU.yaml ``` This increases the number of modes to be defined in `default.yaml` by only two. However, the user interface, requiring explicit specification of `ELT` seems a little awkward (and not backwards compatible). +There is no way to set different `properties` settings for on-sky and wcu observations. + + +## WCU effects + +So far, only a `PupilTransmission` effect has been implemented, to represent the WCU flux controlling masks (E-REP-UZK-MET-1008, Sect. 3.3.2). In reality, this is a wheel with 16 fixed positions. The current effect is controlled by a float parameter, `transmission`, which can be changed with the (undocumented) method `update_transmission`. From a11f4ec8e86b5cc641b8cdc7e8cb4774c80f1e04 Mon Sep 17 00:00:00 2001 From: oczoske Date: Thu, 5 Sep 2024 09:35:14 +0200 Subject: [PATCH 04/18] Define wcu modes and tests --- {METIS_WCU => METIS}/METIS_WCU.yaml | 2 +- METIS/default.yaml | 159 +++++++++++++++++++++++++++- METIS/tests/test_modes.py | 38 +++++++ 3 files changed, 193 insertions(+), 6 deletions(-) rename {METIS_WCU => METIS}/METIS_WCU.yaml (96%) create mode 100644 METIS/tests/test_modes.py diff --git a/METIS_WCU/METIS_WCU.yaml b/METIS/METIS_WCU.yaml similarity index 96% rename from METIS_WCU/METIS_WCU.yaml rename to METIS/METIS_WCU.yaml index d84da10..e58fef0 100644 --- a/METIS_WCU/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -3,7 +3,7 @@ object: warm calibration unit alias : WCU -name: METIS +name: METIS_WCU description: base configuration for METIS/WCU date_modified: 2024-09-03 changes: diff --git a/METIS/default.yaml b/METIS/default.yaml index b2790b8..a7318b1 100644 --- a/METIS/default.yaml +++ b/METIS/default.yaml @@ -5,7 +5,7 @@ object: configuration alias: OBS name: METIS_default_configuration description: default parameters needed for a METIS simulation -date_modified: 2022-03-14 +date_modified: 2024-09-04 changes: - 2021-12-16 (OC) chopnod defaults to perpendicular - 2021-12-16 (OC) default slits renamed @@ -15,16 +15,17 @@ changes: - 2022-02-20 (OC) pupil_transmission now an OBS parameter - 2022-02-21 (OC) linear interpolation, cosmetics - 2022-03-14 (OC) use single PSF file + - 2024-09-04 (OC) rearrange to include WCU modes packages: - Armazones - ELT - METIS -yamls: - - Armazones.yaml - - ELT.yaml # overrides below - - METIS.yaml +#yamls: +# - Armazones.yaml +# - ELT.yaml # overrides below +# - METIS.yaml properties: instrument: "METIS" @@ -65,6 +66,9 @@ mode_yamls: name: img_lm description: "METIS LM-band imaging" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml - METIS_IMG_LM.yaml - METIS_DET_IMG_LM.yaml properties: @@ -80,6 +84,9 @@ mode_yamls: name: img_n description: "METIS N-band imaging" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml - METIS_IMG_N.yaml - METIS_DET_IMG_N_GeoSnap.yaml properties: @@ -97,6 +104,9 @@ mode_yamls: name: lss_l description: "METIS L-band slit spectroscopy" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml - METIS_IMG_LM.yaml - METIS_LSS.yaml - METIS_DET_IMG_LM.yaml @@ -115,6 +125,9 @@ mode_yamls: name: lss_m description: "METIS M-band slit spectroscopy" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml - METIS_IMG_LM.yaml - METIS_LSS.yaml - METIS_DET_IMG_LM.yaml @@ -133,6 +146,9 @@ mode_yamls: name: lss_n description: "METIS N-band slit spectroscopy" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml - METIS_IMG_N.yaml - METIS_LSS.yaml - METIS_DET_IMG_N_GeoSnap.yaml @@ -151,6 +167,9 @@ mode_yamls: name: lms description: "METIS LM-band integral-field spectroscopy, nominal mode" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml - METIS_LMS.yaml - METIS_DET_IFU.yaml properties: @@ -166,6 +185,136 @@ mode_yamls: name: lms_extended description: "METIS LM-band integral-field spectroscopy, extended mode" yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml + - METIS_LMS_EXT.yaml + - METIS_DET_IFU.yaml + properties: + slit: false + adc: false + detector_readout_mode: slow + + - object: observation + alias: OBS + name: wcu_img_lm + description: "METIS LM-band imaging with WCU" + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_IMG_LM.yaml + - METIS_DET_IMG_LM.yaml + properties: + psf_file: PSF_SCAO_9mag_06seeing.fits # REPLACE! + filter_name: Lp + nd_filter_name: open + slit: false + adc: false + detector_readout_mode: fast + + - object: observation + alias: OBS + name: wcu_img_n + description: "METIS N-band imaging" + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_IMG_N.yaml + - METIS_DET_IMG_N_GeoSnap.yaml + properties: + psf_file: PSF_SCAO_9mag_06seeing.fits # REPLACE! + filter_name: N2 + nd_filter_name: open + slit: false + adc: false + chop_offsets: [3, 0] # perpendicular chopping and nodding + nod_offsets: [0, 3] + detector_readout_mode: high_capacity + + - object: observation + alias: OBS + name: wcu_lss_l + description: "METIS L-band slit spectroscopy" + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_IMG_LM.yaml + - METIS_LSS.yaml + - METIS_DET_IMG_LM.yaml + properties: + psf_file: PSF_LM_9mag_06seeing.fits # REPLACE! + trace_file: TRACE_LSS_L.fits + efficiency_file: TER_grating_L.fits + slit: C-38_1 + adc: const_90 + filter_name: L_spec + nd_filter_name: open + detector_readout_mode: slow + + - object: observation + alias: OBS + name: wcu_lss_m + description: "METIS M-band slit spectroscopy" + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_IMG_LM.yaml + - METIS_LSS.yaml + - METIS_DET_IMG_LM.yaml + properties: + psf_file: PSF_LM_9mag_06seeing.fits # REPLACE! + trace_file: TRACE_LSS_M.fits + efficiency_file: TER_grating_M.fits + slit: C-38_1 + adc: const_90 + filter_name: M_spec + nd_filter_name: open + detector_readout_mode: slow + + - object: observation + alias: OBS + name: wcu_lss_n + description: "METIS N-band slit spectroscopy" + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_IMG_N.yaml + - METIS_LSS.yaml + - METIS_DET_IMG_N_GeoSnap.yaml + properties: + psf_file: PSF_N_9mag_06seeing.fits # REPLACE! + trace_file: TRACE_LSS_N.fits + efficiency_file: TER_grating_N.fits + slit: D-57_1 + adc: false + filter_name: N_spec + nd_filter_name: open + detector_readout_mode: low_capacity + + - object: observation + alias: OBS + name: wcu_lms + description: "METIS LM-band integral-field spectroscopy, nominal mode" + yamls: + - METIS_WCU.yaml + - METIS.yaml + - METIS_LMS.yaml + - METIS_DET_IFU.yaml + properties: + psf_file: PSF_LM_9mag_06seeing.fits # REPLACE! + slit: false + adc: false + trace_file: TRACE_LMS.fits + wavelen: 4.2 + detector_readout_mode: slow + + - object: observation # is this a separate mode from nominal LMS? + alias: OBS + name: wcu_lms_extended + description: "METIS LM-band integral-field spectroscopy, extended mode" + yamls: + - METIS_WCU.yaml + - METIS.yaml - METIS_LMS_EXT.yaml - METIS_DET_IFU.yaml properties: diff --git a/METIS/tests/test_modes.py b/METIS/tests/test_modes.py new file mode 100644 index 0000000..9843083 --- /dev/null +++ b/METIS/tests/test_modes.py @@ -0,0 +1,38 @@ +"""Tests for ELT vs. WCU modes + +These tests check that the yamls for the ELT/Armazones and METIS_WCU are loaded for the +modes where they belong (and not loaded where they do not belong). This is done by +checking the "elements" in the effects list of the OpticalTrain objects. +""" +# pylint: disable=missing-class-docstring +# pylint: disable=missing-function-docstring + +import os +import pytest + +import scopesim +PKGS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")) +scopesim.rc.__config__["!SIM.file.local_packages_path"] = PKGS_DIR + +ELT_MODES = ["img_lm", "img_n", "lss_l", "lss_m", "lss_n", "lms", "lms_extended"] +# Generate WCU_MODES automatically to ensure that each elt mode has a corresponding wcu mode +WCU_MODES = [("wcu_" + mode) for mode in ELT_MODES] + +class TestModes: + @pytest.mark.parametrize("themode", ELT_MODES) + def test_elt_modes_include_elt_effects(self, themode): + cmd = scopesim.UserCommands(use_instrument="METIS", + set_modes=[themode]) + metis = scopesim.OpticalTrain(cmd) + assert "ELT" in metis.effects["element"] + assert "armazones" in metis.effects["element"] + assert "METIS_WCU" not in metis.effects["element"] + + @pytest.mark.parametrize("themode", WCU_MODES) + def test_wcu_modes_include_wcu_effects(self, themode): + cmd = scopesim.UserCommands(use_instrument="METIS", + set_modes=[themode]) + metis = scopesim.OpticalTrain(cmd) + assert "ELT" not in metis.effects["element"] + assert "armazones" not in metis.effects["element"] + assert "METIS_WCU" in metis.effects["element"] From 3f9651ef4f756609a6c39788e8fa140cfe2ce8a3 Mon Sep 17 00:00:00 2001 From: oczoske Date: Thu, 5 Sep 2024 10:31:44 +0200 Subject: [PATCH 05/18] Remove METIS_WCU directory --- METIS_WCU/README.md | 71 ----------------------------------- METIS_WCU/default.yaml | 85 ------------------------------------------ 2 files changed, 156 deletions(-) delete mode 100644 METIS_WCU/README.md delete mode 100644 METIS_WCU/default.yaml diff --git a/METIS_WCU/README.md b/METIS_WCU/README.md deleted file mode 100644 index 85d8a22..0000000 --- a/METIS_WCU/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# METIS WCU - -Independent of the implementation options discussed below it may be necessary to move some parameter settings around. For instance, pixel scale is defined top-level in `METIS_IMG_N.yaml` (used in all implementations). It is not clear that this pixel scale is the same for WCU observations or whether it is at all a useful (or necessary) quantity. - -## Implementation - -Upstream of the METIS CFO, calibration observations use a different -OpticalTrain than science observations. The atmosphere and the ELT are -switched off, instead effects related to the optics of the WCU and the -relay are needed. Here, we attempt to implement this as a separate -instrument package built on top of the usual METIS -package. `METIS_WCU/default.yaml` defines the same modes as -`METIS/default.yaml`. Instead of importing the ELT and Armazones -packages (or the respective yaml files), it imports `METIS_WCU.yaml` -before handing over to `METIS/METIS.yaml` and the respective mode -yamls. - -The simulation is then built as follows: -``` -cmds = sim.UserCommands(use_instrument="METIS_WCU", set_modes=["img_lm"]) -metis = sim.OpticalTrain(cmds) -``` - -## Alternative implementation 1 - -With some rearrangement, `METIS/default.yaml` could define wcu modes in addition to the on-sky modes. In this case, each mode would need to define all necessary yamls, with no yamls being imported on the top level. For instance: -``` -- name: img_lm - yamls: - - Armazones.yaml - - ELT.yaml - - METIS.yaml - - METIS_IMG_LMS.yaml - - METIS_DET_IMG_LM.yaml - -- name: wcu_img_lm - yamls: - - METIS_WCU.yaml - - METIS.yaml - - METIS_IMG_LM.yaml - - METIS_DET_IMG_LM.yaml -``` -This results in a long list of modes in a single file, although the total number of modes to be defined is the same as in the current implementation, where it is spread over two files (and two packages). This solution is backwards compatible as the existing modes are unchanged from the user perspective. - -In addition to the list of yamls, each mode definition includes a list of `properties`. There will be duplication both in this alternative and in the current implementation, but with the possibility of choosing different values for on-sky and wcu simulations if that is useful. - -## Alternative implementation 2 - -MICADO uses the fact that `set_modes` accepts a list to combine each of the instrument modes with either SCAO or MCAO, e.g. `set_modes=['MCAO', 'IMG_4mas']`. There is no default for the AO mode alone (the implicit default is "no AO"), so both modes must be provided. For METIS, one could use -``` -cmds1 = sim.UserCommands(use_instrument="METIS", set_modes=["ELT", "img_lm"]) -cmds2 = sim.UserCommands(use_instrument="METIS", set_modes=["WCU", "img_lm"]) -``` -The mode definitions would then look like this: -``` -- name: ELT - yamls: - - Armazones.yaml - - ELT.yaml - -- name: WCU - yamls: - - METIS_WCU.yaml -``` -This increases the number of modes to be defined in `default.yaml` by only two. However, the user interface, requiring explicit specification of `ELT` seems a little awkward (and not backwards compatible). -There is no way to set different `properties` settings for on-sky and wcu observations. - - -## WCU effects - -So far, only a `PupilTransmission` effect has been implemented, to represent the WCU flux controlling masks (E-REP-UZK-MET-1008, Sect. 3.3.2). In reality, this is a wheel with 16 fixed positions. The current effect is controlled by a float parameter, `transmission`, which can be changed with the (undocumented) method `update_transmission`. diff --git a/METIS_WCU/default.yaml b/METIS_WCU/default.yaml deleted file mode 100644 index 968fb5c..0000000 --- a/METIS_WCU/default.yaml +++ /dev/null @@ -1,85 +0,0 @@ ---- -### default configuration for METIS simulations using the WCU - -object: configuration -alias: OBS -name: METIS_WCU_default_configuration -description: default parameters and mode definitions for METIS/WCU -date_modified: 2024-09-03 -changes: - - 2024-09-03 (OC) file created - -packages: - - METIS_WCU - - METIS - -yamls: - - METIS_WCU.yaml - - METIS.yaml # applies to all modes - -properties: - instrument: "METIS_WCU" - modes: ["img_lm"] - exptime: 1. - dit: 1 # when exptime is given and auto_exposure is on, - ndit: 1 # these values are ignored - pupil_transmission: 1.0 # this is for the cold stop, should not be here - - # Default DPR keywords and template name. - # TODO: add those later - -mode_yamls: - - object: calibration - alias: OBS # or CAL? - name: img_lm - description: "METIS LM-band imaging with WCU" - yamls: - - METIS_IMG_LM.yaml - - METIS_DET_IMG_LM.yaml - properties: - psf_file: PSF_SCAO_9mag_06seeing.fits # TODO: change - filter_name: Lp - nd_filter_name: open - slit: false - adc: false - detector_readout_mode: fast - - - object: calibration - alias: OBS # or CAL? - name: img_n - description: "METIS N-band imaging with WCU" - yamls: - - METIS_IMG_N.yaml - - METIS_DET_IMG_N_GeoSnap.yaml - properties: - psf_file: PSF_SCAO_9mag_06seeing.fits - filter_name: N2 - nd_filter_name: open - slit: false - adc: false - chop_offsets: None # TODO: can we use this to turn of the ChopNodder? - nod_offsets: None - detector_readout_mode: high_capacity - - ### Define LSS and LMS modes - ---- -### default simulation parameters needed for a METIS simulation -# TODO: These appear here and in METIS/defaults.yaml -object: simulation -alias: SIM -name: METIS_simulation_parameters -description: RC simulation parameters which need to change for a METIS run - -properties: - random: - seed: None # 9001 - - spectral: - wave_min: 2.85 - wave_mid: 8.425 - wave_max: 14.0 - - computing: - spline_order: 1 - preload_field_of_views: True From 1fe2547ec9b78a8b525ffa08fafa11650af9e89b Mon Sep 17 00:00:00 2001 From: oczoske Date: Mon, 9 Sep 2024 12:58:42 +0200 Subject: [PATCH 06/18] mirror list for WCU relay optics --- METIS/LIST_METIS_mirrors_wcu.dat | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 METIS/LIST_METIS_mirrors_wcu.dat diff --git a/METIS/LIST_METIS_mirrors_wcu.dat b/METIS/LIST_METIS_mirrors_wcu.dat new file mode 100644 index 0000000..ee4bb7a --- /dev/null +++ b/METIS/LIST_METIS_mirrors_wcu.dat @@ -0,0 +1,21 @@ +# author : Oliver Czoske +# source : E-REP-UZK-MET-1008_3-0 +# date_created : 2024-09-09 +# date_modified : 2024-09-09 +# status : FDR design +# type : mirror:list +# outer_unit : m +# inner_unit : m +# angle_unit : degree +# temperature_unit : deg_C +# changes: +# - 2024-09-09 (OC) created +# +name outer inner angle temperature action filename +WCU_table_fold_1 0.217 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat +WCU_table_fold_2 0.271 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat +WCU_CM1 0.274 0.0 0 !TEL.temperature reflection TER_mirror_gold.dat +WCU_CM2 0.100 0.0 0 !TEL.temperature reflection TER_mirror_gold.dat +WCU_CM3 0.196 0.0 0 !TEL.temperature reflection TER_mirror_gold.dat +WCU_fold_down 0.184 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat +WCU_periscopic_feed 0.217 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat From d2bd25896b07dbccd0168bb1657c82bc16b6739e Mon Sep 17 00:00:00 2001 From: oczoske Date: Mon, 9 Sep 2024 13:28:22 +0200 Subject: [PATCH 07/18] add relay optics effect; define WCU temperature --- METIS/LIST_METIS_mirrors_wcu.dat | 14 +++++++------- METIS/METIS_WCU.yaml | 6 ++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/METIS/LIST_METIS_mirrors_wcu.dat b/METIS/LIST_METIS_mirrors_wcu.dat index ee4bb7a..178bde9 100644 --- a/METIS/LIST_METIS_mirrors_wcu.dat +++ b/METIS/LIST_METIS_mirrors_wcu.dat @@ -12,10 +12,10 @@ # - 2024-09-09 (OC) created # name outer inner angle temperature action filename -WCU_table_fold_1 0.217 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat -WCU_table_fold_2 0.271 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat -WCU_CM1 0.274 0.0 0 !TEL.temperature reflection TER_mirror_gold.dat -WCU_CM2 0.100 0.0 0 !TEL.temperature reflection TER_mirror_gold.dat -WCU_CM3 0.196 0.0 0 !TEL.temperature reflection TER_mirror_gold.dat -WCU_fold_down 0.184 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat -WCU_periscopic_feed 0.217 0.0 45 !TEL.temperature reflection TER_mirror_gold.dat +WCU_table_fold_1 0.217 0.0 45 !WCU.temperature reflection TER_mirror_gold.dat +WCU_table_fold_2 0.271 0.0 45 !WCU.temperature reflection TER_mirror_gold.dat +WCU_CM1 0.274 0.0 0 !WCU.temperature reflection TER_mirror_gold.dat +WCU_CM2 0.100 0.0 0 !WCU.temperature reflection TER_mirror_gold.dat +WCU_CM3 0.196 0.0 0 !WCU.temperature reflection TER_mirror_gold.dat +WCU_fold_down 0.184 0.0 45 !WCU.temperature reflection TER_mirror_gold.dat +WCU_periscopic_feed 0.217 0.0 45 !WCU.temperature reflection TER_mirror_gold.dat diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index e58fef0..7ef0e01 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -18,3 +18,9 @@ effects: class: PupilTransmission kwargs: transmission: 0.9 # change this, or provide a wheel + + - name: wcu_relay_optics + description: surface list for METIS WCU relay optics + class: SurfaceList + kwargs: + filename: LIST_METIS_mirrors_wcu.dat From 213a8d0156ddefdc8f2c226453395009b3ba3797 Mon Sep 17 00:00:00 2001 From: oczoske Date: Wed, 6 Nov 2024 15:44:49 +0100 Subject: [PATCH 08/18] initialise WCU FP masks --- METIS/wcu/fp_mask_open.dat | 0 METIS/wcu/fp_mask_pinhole.dat | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 METIS/wcu/fp_mask_open.dat create mode 100644 METIS/wcu/fp_mask_pinhole.dat diff --git a/METIS/wcu/fp_mask_open.dat b/METIS/wcu/fp_mask_open.dat new file mode 100644 index 0000000..e69de29 diff --git a/METIS/wcu/fp_mask_pinhole.dat b/METIS/wcu/fp_mask_pinhole.dat new file mode 100644 index 0000000..e69de29 From e04c1e4e3d3576e6269d7d05be3ed3cc3482cf0c Mon Sep 17 00:00:00 2001 From: oczoske Date: Wed, 6 Nov 2024 16:08:04 +0100 Subject: [PATCH 09/18] preliminary FP masks --- METIS/METIS_WCU.yaml | 19 +++++++++++++++---- METIS/wcu/fp_mask_open.dat | 16 ++++++++++++++++ METIS/wcu/fp_mask_pinhole.dat | 16 ++++++++++++++++ 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index 7ef0e01..d3b761c 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -13,11 +13,22 @@ properties: temperature: 15 # how warm is the WCU? - need temperatures for the source and for the mirrors! effects: - - name: wcu_mask - description: wcu mask (replace by Wheel) - class: PupilTransmission + - name: bb_source + description: Black Body source + class: BlackBodySource kwargs: - transmission: 0.9 # change this, or provide a wheel + bb_temp: 1000 + wcu_temp: 300 + + - name: mask_wheel + description: WCU focal plane masks + class: SlitWheel + kwargs: + slit_names: + - open + - pinhole + filename_format: "wcu/fp_mask_{}.dat" + current_slit: "open" - name: wcu_relay_optics description: surface list for METIS WCU relay optics diff --git a/METIS/wcu/fp_mask_open.dat b/METIS/wcu/fp_mask_open.dat index e69de29..22bb979 100644 --- a/METIS/wcu/fp_mask_open.dat +++ b/METIS/wcu/fp_mask_open.dat @@ -0,0 +1,16 @@ +# description : WCU focal plane mask, open +# author : Oliver Czoske +# source : ... +# date_created : 2024-11-06 +# date_modified : 2024-11-06 +# status : ... +# type : aperture:aperture_mask +# x_unit : deg +# y_unit : deg +# changes : +# + x y +-10 -10 + 10 -10 + 10 10 +-10 10 diff --git a/METIS/wcu/fp_mask_pinhole.dat b/METIS/wcu/fp_mask_pinhole.dat index e69de29..2017b7e 100644 --- a/METIS/wcu/fp_mask_pinhole.dat +++ b/METIS/wcu/fp_mask_pinhole.dat @@ -0,0 +1,16 @@ +# description : WCU focal plane mask, pinhole +# author : Oliver Czoske +# source : ... +# date_created : 2024-11-06 +# date_modified : 2024-11-06 +# status : ... +# type : aperture:aperture_mask +# x_unit : arcsec +# y_unit : arcsec +# changes : +# + x y +-0.02 -0.02 + 0.02 -0.02 + 0.02 0.02 +-0.02 0.02 From f9b8e48c412b02d0169038ff57ec49f67c343430 Mon Sep 17 00:00:00 2001 From: oczoske Date: Sun, 17 Nov 2024 08:09:18 +0000 Subject: [PATCH 10/18] add BB source --- METIS/METIS_WCU.yaml | 5 +++-- METIS/wcu/fp_mask_pinhole.dat | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index d3b761c..3a60c51 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -8,16 +8,17 @@ description: base configuration for METIS/WCU date_modified: 2024-09-03 changes: - 2024-09-03 (OC) file created + - 2024-11-06 (OC) add BlackBodySource properties: - temperature: 15 # how warm is the WCU? - need temperatures for the source and for the mirrors! + temperature: 15 # Celsius! needed for relay optics effects: - name: bb_source description: Black Body source class: BlackBodySource kwargs: - bb_temp: 1000 + bb_temp: 1000 # Kelvin! wcu_temp: 300 - name: mask_wheel diff --git a/METIS/wcu/fp_mask_pinhole.dat b/METIS/wcu/fp_mask_pinhole.dat index 2017b7e..116a246 100644 --- a/METIS/wcu/fp_mask_pinhole.dat +++ b/METIS/wcu/fp_mask_pinhole.dat @@ -3,14 +3,14 @@ # source : ... # date_created : 2024-11-06 # date_modified : 2024-11-06 -# status : ... +# status : preliminary fantasy values # type : aperture:aperture_mask # x_unit : arcsec # y_unit : arcsec # changes : # x y --0.02 -0.02 - 0.02 -0.02 - 0.02 0.02 --0.02 0.02 +-0.2 -0.2 + 0.2 -0.2 + 0.2 0.2 +-0.2 0.2 From 53b665981918108bed42f8237ae2b804e650e60e Mon Sep 17 00:00:00 2001 From: oczoske Date: Tue, 19 Nov 2024 17:04:06 +0000 Subject: [PATCH 11/18] transfer BB to IS; yaml is a bit of a mess --- METIS/METIS_WCU.yaml | 16 +++- METIS/code/wcu_bb_to_is_throughput.py | 98 +++++++++++++++++++++++++ METIS/wcu/WCU_BB_to_IS_throughput.fits | Bin 0 -> 8640 bytes 3 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 METIS/code/wcu_bb_to_is_throughput.py create mode 100644 METIS/wcu/WCU_BB_to_IS_throughput.fits diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index 3a60c51..e0b88a2 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -13,13 +13,25 @@ changes: properties: temperature: 15 # Celsius! needed for relay optics + effects: - name: bb_source description: Black Body source class: BlackBodySource kwargs: - bb_temp: 1000 # Kelvin! - wcu_temp: 300 + bb_temp: 1000 # [K] temperature of BB source # Kelvin! + is_temp: 300 # [K] temperature of the integratig sphere + wcu_temp: 300 # [K] ambient temperature in the WCU + bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" + is_reflect: "wcu/WCU_IS_reflectivity.dat" + tube_reflect: "wcu/WCU_tube_reflectivity.dat" + mask_reflect: "wcu/WCU_mask_reflectivity.dat" + emiss_bb: 0.98 # E-REP-MPIA-MET-1203 + diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port + diam_is: 250 # [mm] diameter of integrating sphere + diam_is_out: 100 # [mm] diameter if integrating sphere output port + rho_is: 0.95 # [] reflectivity of integrating sphere + rho_tube: 0.95 # [] reflectivity of tube between BB and IS - name: mask_wheel description: WCU focal plane masks diff --git a/METIS/code/wcu_bb_to_is_throughput.py b/METIS/code/wcu_bb_to_is_throughput.py new file mode 100644 index 0000000..45a5e46 --- /dev/null +++ b/METIS/code/wcu_bb_to_is_throughput.py @@ -0,0 +1,98 @@ +"""Utility functions for the WCU radiometry + +These functions create lookup tables that are stored in the irdb. +""" +import os +from datetime import datetime +import numpy as np +from astropy.table import Table +from astropy.io import fits +from scopesim.utils import seq + +def bb_to_is_throughput(rho_tube, **kwargs): + """Compute the effective transmission through the tube between BB source + and integrating-sphere entrance port + + + """ + diam = 25.4 # diameter of the tube [mm]. + height = 28.2 # height of the tube [mm] + drad = 0.1 # grid step in radius [mm] + dalpha = 0.01 # grid step in "zenith angle" [rad] + dphi = 0.02 # grid step in azimuthal angle [rad] + + alpha = seq(dalpha/2, (np.pi - dalpha)/2, dalpha) + rad = seq(drad/2, (diam - drad)/2, drad) + phi = seq(dphi/2, np.pi - dphi/2, dphi) + + nalpha = len(alpha) + nrad = len(rad) + nphi = len(phi) + + # expand to grid + xyz = np.array(np.meshgrid(alpha, rad, phi)).reshape((3, nalpha * nrad * nphi)) + alpha = xyz[0,] + rad = xyz[1,] + phi = xyz[2,] + if "special" in kwargs: + nref = n_reflections(alpha, 0, phi, diam, height) + else: + nref = n_reflections(alpha, rad, phi, diam, height) + + result = np.zeros_like(rho_tube) + for i, rho in enumerate(rho_tube): + integrand = rho**nref * 0.5 * np.sin(2 * alpha) * rad * drad * dalpha * dphi + result[i] = np.sum(integrand) + return result * 16 / (np.pi * diam**2) + + + +def n_reflections(alpha, rad, phi, diam, height): + """Compute number of reflections of a photon emitted at radius r in direction alpha,phi""" + + beta = np.arcsin(2 * rad /diam * np.sin(phi)) + + numerator = height - diam * np.sin(phi + beta)/(2 * np.sin(phi)) * np.tan(np.pi/2 - alpha) + denominator = diam * np.cos(beta) * np.tan(np.pi/2 - alpha) + return (np.floor(1 + numerator/denominator)).astype(int) + + +#def integrating_sphere(wavelength): +# """Compute the magnification factor due to the integrating sphere""" + + +def make_pri_hdu(): + """Create primary header with meta data""" + pri_hdu = fits.PrimaryHDU() + + meta = {"author": "Oliver Czoske", + "descript": "METIS WCU, throughput from Blackbody to integrating sphere", + "source": "E-REP-MPIA-MET-1203", + "date-cre": "2024-11-19", + "date-mod": datetime.today().strftime("%Y-%m-%d"), + "status": "model", + "code": os.path.basename(__file__) + } + pri_hdu.header.update(meta) + return pri_hdu + +def do_main(): + """Create and write out lookup table for BB to IS transfer""" + rho_tube = seq(0, 1, 0.02) + t_general_no_gap = bb_to_is_throughput(rho_tube) + t_special_no_gap = bb_to_is_throughput(rho_tube, special=True) + + arr = {"rho_tube": rho_tube, + "t_gen_no_gap": t_general_no_gap, + "t_spec_no_gap": t_special_no_gap} + tab = Table(arr) + table_hdu = fits.table_to_hdu(tab) + table_hdu.header["EXTNAME"] = "BB_to_IS_throughput" + pri_hdu = make_pri_hdu() + hdul = fits.HDUList([pri_hdu, table_hdu]) + hdul.writeto("WCU_BB_to_IS_throughput.fits", overwrite=True) + + + +if __name__ == "__main__": + do_main() diff --git a/METIS/wcu/WCU_BB_to_IS_throughput.fits b/METIS/wcu/WCU_BB_to_IS_throughput.fits new file mode 100644 index 0000000000000000000000000000000000000000..c087a897ec6bb63e6b2a387e00d3b2e4e4dac6ca GIT binary patch literal 8640 zcmeH~c~BE~6vwR=Z|i8Ki~@DFm3Sd?cop%PW7ViRNESuJ$t)5=gd8M`6r8cvdg6gr zt=1M4wOWPJdQ_2mf{LQ3h$x0b!V!=Jq%yYk?(VV*?Su|g$4+PV{gYpQ^ULS={e9n? z%zJX7NIDZm5I@9DV2B4YU#AVz88k+O&>>TVm>e+@xHc3wgxWbzZt;YeR2bL_Z#>Dv z4F)_G3B?H-l<8;OdC8v$Q|NAikD(B0DQjFw@P>g)~Y<|E< zga|k2qE+GgXaWf{=rjl~5}zLtq6>|svZB@!N|ga8)LIo{)Q2k#Eiac#0%UwTzZ}$E zhDzNjrMN8N&y!`-T5+<)aNzY%g5c*)7^7I`!TPcP4h$&!JFdAF)kKB z77WSL=t7l|)8eC0P6tj z0P6tj0PDd2(E+NRlnW(dvftnd#Tb`26K&ZIcpxEaEp8zDG(03yi6}oMnwryApZZq& zXRr46&vZZTX}^E=@*#PVO09|rr~2{Gmz_95o^LH^o|k>z7|&LCb~=?(YeOQLmi;ngVHkO}savkDOPvU$j%?H zN|Rl%4zLce4zLdVhYoaL0y0Zew{ZqK!g(~w&G*C#*c@k`n$~X-WLZ!m*+m2wmJAuY zG%XeOF#G2kQ=U6M%7yIH7q{?+uY|O8f9vuO)8RswZd+41K5*&XeMudxL*WQ>J{wsb z?&rM|a>V72dITSW<6l#;9WG7|j5gR9VQrLG{C!Q{YD~*46xJjMh zEJgRXLC&UK2HwK+a8)v3k;!K)oMZTxvp+BY#5@bG{WP5Ou-6Ze-Q7>W`*wH8?HFsi zp}qmv*X%p#&uxH9%)M6ynTNY14}&~j5Px>*ShzCuVP-<`Fu1mU>*C^VBFKBn+bwyo z1g7!W}oRFMjkQn5gu|nc=ou-{%|QB$zsPOe}LKfMUjn+s~bS z=N`%fQ|;ucLsxe|33aPq6ciR!m8_X)hNAqBiIt^7C}sS)bNWXc8lMiuXA0d$C60iy zrosZ#{*1lT)=ziYE&z^=d#haDeWY8pM8We9#yZioe6z+b1 z;6;MQ5zLIAB^!LkJIT62SwPn4?E_q)oU$h~0ZPB}_E>o&4$4f<#wR(RFO6Wfy%&V93WQ3=|1w+D%4hC5P#)Xx6rDT=s>o`y zE*}WyC91%KXC6UC53#vkeFdtRyp;F%@r@1khl-t;y3>laUuo5;oLpr-oX((HDpOOz#JEOr2O~t$MaL zb1T?fg5u8)=>_%la~;8^aOUjl6#=#vi356s1VKGhKXtJ?ka~|`sH Date: Sun, 24 Nov 2024 20:32:23 +0000 Subject: [PATCH 12/18] wcu parameters in more user-friendly config file; add telescope area for etendue calculation --- METIS/METIS_WCU.yaml | 52 +++++++++++++++++++++---------------- METIS/metis_wcu_config.yaml | 15 +++++++++++ 2 files changed, 44 insertions(+), 23 deletions(-) create mode 100644 METIS/metis_wcu_config.yaml diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index e0b88a2..0ac23cf 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -13,38 +13,44 @@ changes: properties: temperature: 15 # Celsius! needed for relay optics - effects: - name: bb_source description: Black Body source class: BlackBodySource kwargs: - bb_temp: 1000 # [K] temperature of BB source # Kelvin! - is_temp: 300 # [K] temperature of the integratig sphere - wcu_temp: 300 # [K] ambient temperature in the WCU - bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" - is_reflect: "wcu/WCU_IS_reflectivity.dat" - tube_reflect: "wcu/WCU_tube_reflectivity.dat" - mask_reflect: "wcu/WCU_mask_reflectivity.dat" - emiss_bb: 0.98 # E-REP-MPIA-MET-1203 - diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port - diam_is: 250 # [mm] diameter of integrating sphere - diam_is_out: 100 # [mm] diameter if integrating sphere output port - rho_is: 0.95 # [] reflectivity of integrating sphere - rho_tube: 0.95 # [] reflectivity of tube between BB and IS + config_file: "metis_wcu_config.yaml" + #bb_temp: 1000 # [K] temperature of BB source # Kelvin! + #is_temp: 300 # [K] temperature of the integratig sphere + #wcu_temp: 300 # [K] ambient temperature in the WCU + #bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" + #is_reflect: "wcu/WCU_IS_reflectivity.dat" + #tube_reflect: "wcu/WCU_tube_reflectivity.dat" + #mask_reflect: "wcu/WCU_mask_reflectivity.dat" + #emiss_bb: 0.98 # E-REP-MPIA-MET-1203 + #diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port + #diam_is: 250 # [mm] diameter of integrating sphere + #diam_is_out: 100 # [mm] diameter if integrating sphere output port + #rho_is: 0.95 # [] reflectivity of integrating sphere + #rho_tube: 0.95 # [] reflectivity of tube between BB and IS - - name: mask_wheel - description: WCU focal plane masks - class: SlitWheel - kwargs: - slit_names: - - open - - pinhole - filename_format: "wcu/fp_mask_{}.dat" - current_slit: "open" +# - name: mask_wheel +# description: WCU focal plane masks +# class: SlitWheel +# kwargs: +# slit_names: +# - open +# - pinhole +# filename_format: "wcu/fp_mask_{}.dat" +# current_slit: "open" - name: wcu_relay_optics description: surface list for METIS WCU relay optics class: SurfaceList kwargs: filename: LIST_METIS_mirrors_wcu.dat + +--- +# Required parameters to replace telescope +alias: TEL +properties: + area: 975.23478998 diff --git a/METIS/metis_wcu_config.yaml b/METIS/metis_wcu_config.yaml new file mode 100644 index 0000000..d9e7530 --- /dev/null +++ b/METIS/metis_wcu_config.yaml @@ -0,0 +1,15 @@ +bb_temp: 1000 # [K] temperature of BB source # Kelvin! +is_temp: 300 # [K] temperature of the integratig sphere +wcu_temp: 300 # [K] ambient temperature in the WCU +bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" +is_reflect: "wcu/WCU_IS_reflectivity.dat" +tube_reflect: "wcu/WCU_tube_reflectivity.dat" +mask_reflect: "wcu/WCU_mask_reflectivity.dat" +emiss_bb: 0.98 # E-REP-MPIA-MET-1203 +diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port +diam_is: 250 # [mm] diameter of integrating sphere +diam_is_out: 100 # [mm] diameter if integrating sphere output port +rho_is: 0.95 # [] reflectivity of integrating sphere +rho_tube: 0.95 # [] reflectivity of tube between BB and IS +rho_mask: 0.95 # [] reflectivity of focal-plane mask +fpmask: "open" # focal plane mask: "open", "pinhole", "grid" From 3ceb8f8a16c1a7af53cf9872e7a97374ba339470 Mon Sep 17 00:00:00 2001 From: oczoske Date: Mon, 25 Nov 2024 16:05:28 +0000 Subject: [PATCH 13/18] user config file, test TEL.area --- METIS/METIS_WCU.yaml | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index 0ac23cf..8969493 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -5,43 +5,22 @@ object: warm calibration unit alias : WCU name: METIS_WCU description: base configuration for METIS/WCU -date_modified: 2024-09-03 +date_modified: 2024-11-25 changes: - 2024-09-03 (OC) file created - 2024-11-06 (OC) add BlackBodySource + - 2024-11-25 (OC) config file, test TEL.area properties: temperature: 15 # Celsius! needed for relay optics + config_file: "metis_wcu_config.yaml" effects: - name: bb_source description: Black Body source class: BlackBodySource kwargs: - config_file: "metis_wcu_config.yaml" - #bb_temp: 1000 # [K] temperature of BB source # Kelvin! - #is_temp: 300 # [K] temperature of the integratig sphere - #wcu_temp: 300 # [K] ambient temperature in the WCU - #bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" - #is_reflect: "wcu/WCU_IS_reflectivity.dat" - #tube_reflect: "wcu/WCU_tube_reflectivity.dat" - #mask_reflect: "wcu/WCU_mask_reflectivity.dat" - #emiss_bb: 0.98 # E-REP-MPIA-MET-1203 - #diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port - #diam_is: 250 # [mm] diameter of integrating sphere - #diam_is_out: 100 # [mm] diameter if integrating sphere output port - #rho_is: 0.95 # [] reflectivity of integrating sphere - #rho_tube: 0.95 # [] reflectivity of tube between BB and IS - -# - name: mask_wheel -# description: WCU focal plane masks -# class: SlitWheel -# kwargs: -# slit_names: -# - open -# - pinhole -# filename_format: "wcu/fp_mask_{}.dat" -# current_slit: "open" + config_file: "!WCU.config_file" - name: wcu_relay_optics description: surface list for METIS WCU relay optics @@ -49,8 +28,11 @@ effects: kwargs: filename: LIST_METIS_mirrors_wcu.dat + + --- # Required parameters to replace telescope alias: TEL properties: - area: 975.23478998 + #area: 975.23478998 + area: 1354.593 #### TEST, needed to agree with RvB's calculation From 28a95b0478759fdaa3615ee3487c077e9a7e8252 Mon Sep 17 00:00:00 2001 From: oczoske Date: Mon, 25 Nov 2024 17:26:03 +0000 Subject: [PATCH 14/18] Pupil masks --- METIS/METIS_WCU.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index 8969493..8476bad 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -28,7 +28,14 @@ effects: kwargs: filename: LIST_METIS_mirrors_wcu.dat - + - name: pupil_masks + description: pupil masks (transmission only) + class: PupilMaskWheel + kwargs: + pupil_masks: + names: [APP-LMS, APP-LM, CLS-LMS, CLS-LM, CLS-N, PPS-LMS, PPS-LM, PPS-N, PPS-CFO2, RLS-LMS, RLS-LM, SPM-LMS, SPM-LM, SPM-N, open] + transmissions: [0.6098, 0.6312, 0.5879, 0.6073, 0.5795, 0.7342, 0.7509, 0.7429, 0.6170, 0.4362, 0.4476, 0.6098, 0.6312, 0.6076, 0.8201] + current_mask: "open" --- # Required parameters to replace telescope From 8d9dfc86e1283deedc240091c8647caddf73671a Mon Sep 17 00:00:00 2001 From: oczoske Date: Tue, 26 Nov 2024 13:43:09 +0000 Subject: [PATCH 15/18] Rename to WCUSource --- METIS/METIS_WCU.yaml | 7 ++++--- METIS/metis_wcu_config.yaml | 11 +++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index 8476bad..dfd2721 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -10,15 +10,16 @@ changes: - 2024-09-03 (OC) file created - 2024-11-06 (OC) add BlackBodySource - 2024-11-25 (OC) config file, test TEL.area + - 2024-11-26 (OC) rename to WCUSource properties: temperature: 15 # Celsius! needed for relay optics config_file: "metis_wcu_config.yaml" effects: - - name: bb_source - description: Black Body source - class: BlackBodySource + - name: wcu_source + description: Source of the WCU + class: WCUSource kwargs: config_file: "!WCU.config_file" diff --git a/METIS/metis_wcu_config.yaml b/METIS/metis_wcu_config.yaml index d9e7530..d07b52c 100644 --- a/METIS/metis_wcu_config.yaml +++ b/METIS/metis_wcu_config.yaml @@ -1,6 +1,8 @@ -bb_temp: 1000 # [K] temperature of BB source # Kelvin! -is_temp: 300 # [K] temperature of the integratig sphere -wcu_temp: 300 # [K] ambient temperature in the WCU +lamps: ["bb", "laser", "none"] # available lamps +current_lamp: "bb" # the lamp currently in use +bb_temp: 1000 # [K] temperature of BB source # Kelvin! +is_temp: 300 # [K] temperature of the integratig sphere +wcu_temp: 300 # [K] ambient temperature in the WCU bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" is_reflect: "wcu/WCU_IS_reflectivity.dat" tube_reflect: "wcu/WCU_tube_reflectivity.dat" @@ -12,4 +14,5 @@ diam_is_out: 100 # [mm] diameter if integrating sphere output port rho_is: 0.95 # [] reflectivity of integrating sphere rho_tube: 0.95 # [] reflectivity of tube between BB and IS rho_mask: 0.95 # [] reflectivity of focal-plane mask -fpmask: "open" # focal plane mask: "open", "pinhole", "grid" +fpmasks: ["open", "pinhole", "grid"] +current_mask: "open" # focal plane mask: "open", "pinhole", "grid" From 118978ca7177747c695ef00ed760d8a5485597b2 Mon Sep 17 00:00:00 2001 From: oczoske Date: Tue, 14 Jan 2025 13:32:21 +0000 Subject: [PATCH 16/18] set of fp masks --- METIS/metis_wcu_config.yaml | 3 +- METIS/wcu/fp_mask_grid_lm.dat | 88 ++++++++++++++++++++++++++++++++ METIS/wcu/fp_mask_pinhole.dat | 16 ------ METIS/wcu/fp_mask_pinhole_lm.dat | 16 ++++++ METIS/wcu/fp_mask_pinhole_n.dat | 16 ++++++ 5 files changed, 122 insertions(+), 17 deletions(-) create mode 100644 METIS/wcu/fp_mask_grid_lm.dat delete mode 100644 METIS/wcu/fp_mask_pinhole.dat create mode 100644 METIS/wcu/fp_mask_pinhole_lm.dat create mode 100644 METIS/wcu/fp_mask_pinhole_n.dat diff --git a/METIS/metis_wcu_config.yaml b/METIS/metis_wcu_config.yaml index d07b52c..b8ad2e4 100644 --- a/METIS/metis_wcu_config.yaml +++ b/METIS/metis_wcu_config.yaml @@ -14,5 +14,6 @@ diam_is_out: 100 # [mm] diameter if integrating sphere output port rho_is: 0.95 # [] reflectivity of integrating sphere rho_tube: 0.95 # [] reflectivity of tube between BB and IS rho_mask: 0.95 # [] reflectivity of focal-plane mask -fpmasks: ["open", "pinhole", "grid"] +fpmasks: ["open", "pinhole_lm", "pinhole_n", "grid_lm"] +fpmask_filename_format: "wcu/fp_mask_{}.dat" current_mask: "open" # focal plane mask: "open", "pinhole", "grid" diff --git a/METIS/wcu/fp_mask_grid_lm.dat b/METIS/wcu/fp_mask_grid_lm.dat new file mode 100644 index 0000000..91e6504 --- /dev/null +++ b/METIS/wcu/fp_mask_grid_lm.dat @@ -0,0 +1,88 @@ +# description : WCU focal plane mask, grid LM +# name : WCU FP mask #5 +# author : Oliver Czoske +# source : E-SPE-UZK-MET-1015_2-0; E-REP-UZK-MET-1008_3-0, Table 10-8 +# date_created : 2025-01-13 +# date_modified : 2025-01-13 +# status : FDR +# type : aperture:aperture_mask +# x_unit : arcsec +# y_unit : arcsec +# diam_unit : arcsec +# notes: diam 25 um at 3.319 mm/arcsec +# changes : +# + x y diam + 1.36 1.36 0.007532 + 0.00 1.36 0.007532 +-1.36 1.36 0.007532 + 1.36 0.00 0.007532 + 0.00 0.00 0.007532 +-1.36 0.00 0.007532 + 1.36 -1.36 0.007532 + 0.00 -1.36 0.007532 +-1.36 -1.36 0.007532 + +-6.44 6.44 0.007532 +-4.29 6.44 0.007532 +-2.15 6.44 0.007532 + 0.00 6.44 0.007532 + 2.15 6.44 0.007532 + 4.29 6.44 0.007532 + +-6.44 4.29 0.007532 +-4.29 4.29 0.007532 +-2.15 4.29 0.007532 + 0.00 4.29 0.007532 + 2.15 4.29 0.007532 + 4.29 4.29 0.007532 + 6.44 4.29 0.007532 + +-6.44 2.15 0.007532 +-4.29 2.15 0.007532 + 4.29 2.15 0.007532 + 6.44 2.15 0.007532 + +-6.44 0.00 0.007532 +-4.29 0.00 0.007532 + 4.29 0.00 0.007532 + 6.44 0.00 0.007532 + +-6.44 -2.15 0.007532 +-4.29 -2.15 0.007532 + 4.29 -2.15 0.007532 + 6.44 -2.15 0.007532 + +-6.44 -4.29 0.007532 +-4.29 -4.29 0.007532 +-2.15 -4.29 0.007532 + 0.00 -4.29 0.007532 + 2.15 -4.29 0.007532 + 4.29 -4.29 0.007532 + 6.44 -4.29 0.007532 + +-6.44 -6.44 0.007532 +-4.29 -6.44 0.007532 +-2.15 -6.44 0.007532 + 0.00 -6.44 0.007532 + 2.15 -6.44 0.007532 + 4.29 -6.44 0.007532 + 6.44 -6.44 0.007532 + +-8.79 0.00 0.007532 + 8.79 0.00 0.007532 + +-12.88 0.00 0.007532 + 12.88 0.00 0.007532 + +-7.93 9.78 0.007532 +-3.96 9.78 0.007532 + 0.00 9.78 0.007532 + 3.96 9.78 0.007532 + 7.93 9.78 0.007532 + +-7.93 -9.78 0.007532 +-3.96 -9.78 0.007532 + 0.00 -9.78 0.007532 + 3.96 -9.78 0.007532 + 7.93 -9.78 0.007532 diff --git a/METIS/wcu/fp_mask_pinhole.dat b/METIS/wcu/fp_mask_pinhole.dat deleted file mode 100644 index 116a246..0000000 --- a/METIS/wcu/fp_mask_pinhole.dat +++ /dev/null @@ -1,16 +0,0 @@ -# description : WCU focal plane mask, pinhole -# author : Oliver Czoske -# source : ... -# date_created : 2024-11-06 -# date_modified : 2024-11-06 -# status : preliminary fantasy values -# type : aperture:aperture_mask -# x_unit : arcsec -# y_unit : arcsec -# changes : -# - x y --0.2 -0.2 - 0.2 -0.2 - 0.2 0.2 --0.2 0.2 diff --git a/METIS/wcu/fp_mask_pinhole_lm.dat b/METIS/wcu/fp_mask_pinhole_lm.dat new file mode 100644 index 0000000..a64139f --- /dev/null +++ b/METIS/wcu/fp_mask_pinhole_lm.dat @@ -0,0 +1,16 @@ +# description : WCU focal plane mask, pinhole LM +# name : WCU FP mask #1 +# author : Oliver Czoske +# source : E-SPE-UZK-MET-1015_2-0; E-REP-UZK-MET-1008_3-0, Table 10-8 +# date_created : 2025-01-13 +# date_modified : 2025-01-13 +# status : FDR +# type : aperture:aperture_mask +# x_unit : arcsec +# y_unit : arcsec +# diam_unit : arcsec +# notes: diam 25 um at 3.319 mm/arcsec +# changes : +# + x y diam + 0 0 0.007532 diff --git a/METIS/wcu/fp_mask_pinhole_n.dat b/METIS/wcu/fp_mask_pinhole_n.dat new file mode 100644 index 0000000..b8b2ecf --- /dev/null +++ b/METIS/wcu/fp_mask_pinhole_n.dat @@ -0,0 +1,16 @@ +# description : WCU focal plane mask, pinhole N +# name : WCU FP mask #2 +# author : Oliver Czoske +# source : E-SPE-UZK-MET-1015_2-0; E-REP-UZK-MET-1008_3-0, Table 10-8 +# date_created : 2025-01-13 +# date_modified : 2025-01-13 +# status : FDR +# type : aperture:aperture_mask +# x_unit : arcsec +# y_unit : arcsec +# diam_unit : arcsec +# notes: diam 66 um at 3.319 mm/arcsec +# changes : +# + x y diam + 0 0 0.01988551 From b4bbbf274b270d7f6ef7f0019cb9b9fae52f0214 Mon Sep 17 00:00:00 2001 From: oczoske Date: Tue, 14 Jan 2025 20:34:08 +0000 Subject: [PATCH 17/18] rearrange, bb_aperture --- METIS/metis_wcu_config.yaml | 28 ++++++++++++++++------------ METIS/wcu/fp_mask_open.dat | 16 ---------------- 2 files changed, 16 insertions(+), 28 deletions(-) delete mode 100644 METIS/wcu/fp_mask_open.dat diff --git a/METIS/metis_wcu_config.yaml b/METIS/metis_wcu_config.yaml index b8ad2e4..86caded 100644 --- a/METIS/metis_wcu_config.yaml +++ b/METIS/metis_wcu_config.yaml @@ -1,19 +1,23 @@ +# ------------- User-settable parameters lamps: ["bb", "laser", "none"] # available lamps current_lamp: "bb" # the lamp currently in use bb_temp: 1000 # [K] temperature of BB source # Kelvin! is_temp: 300 # [K] temperature of the integratig sphere wcu_temp: 300 # [K] ambient temperature in the WCU -bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" -is_reflect: "wcu/WCU_IS_reflectivity.dat" -tube_reflect: "wcu/WCU_tube_reflectivity.dat" -mask_reflect: "wcu/WCU_mask_reflectivity.dat" -emiss_bb: 0.98 # E-REP-MPIA-MET-1203 -diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port -diam_is: 250 # [mm] diameter of integrating sphere -diam_is_out: 100 # [mm] diameter if integrating sphere output port -rho_is: 0.95 # [] reflectivity of integrating sphere -rho_tube: 0.95 # [] reflectivity of tube between BB and IS -rho_mask: 0.95 # [] reflectivity of focal-plane mask +bb_aperture: 1.0 # aperture of flux-controlling mask fpmasks: ["open", "pinhole_lm", "pinhole_n", "grid_lm"] fpmask_filename_format: "wcu/fp_mask_{}.dat" -current_mask: "open" # focal plane mask: "open", "pinhole", "grid" +current_fpmask: "open" + +# ------------- Data needed to describe the WCU +bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits" +is_reflect: "wcu/WCU_IS_reflectivity.dat" +tube_reflect: "wcu/WCU_tube_reflectivity.dat" +mask_reflect: "wcu/WCU_mask_reflectivity.dat" +emiss_bb: 0.98 # E-REP-MPIA-MET-1203 +diam_is_in: 25.4 # [mm] diameter of integrating sphere entrance port +diam_is: 250 # [mm] diameter of integrating sphere +diam_is_out: 100 # [mm] diameter if integrating sphere output port +rho_is: 0.95 # [] reflectivity of integrating sphere +rho_tube: 0.95 # [] reflectivity of tube between BB and IS +rho_mask: 0.95 # [] reflectivity of focal-plane mask diff --git a/METIS/wcu/fp_mask_open.dat b/METIS/wcu/fp_mask_open.dat deleted file mode 100644 index 22bb979..0000000 --- a/METIS/wcu/fp_mask_open.dat +++ /dev/null @@ -1,16 +0,0 @@ -# description : WCU focal plane mask, open -# author : Oliver Czoske -# source : ... -# date_created : 2024-11-06 -# date_modified : 2024-11-06 -# status : ... -# type : aperture:aperture_mask -# x_unit : deg -# y_unit : deg -# changes : -# - x y --10 -10 - 10 -10 - 10 10 --10 10 From d92b74345d539742ce837039a1454e01b29ae673 Mon Sep 17 00:00:00 2001 From: oczoske Date: Fri, 17 Jan 2025 18:02:03 +0000 Subject: [PATCH 18/18] angle and shift for fpmask --- METIS/metis_wcu_config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/METIS/metis_wcu_config.yaml b/METIS/metis_wcu_config.yaml index 86caded..1d09dda 100644 --- a/METIS/metis_wcu_config.yaml +++ b/METIS/metis_wcu_config.yaml @@ -8,6 +8,8 @@ bb_aperture: 1.0 # aperture of flux-controlling mask fpmasks: ["open", "pinhole_lm", "pinhole_n", "grid_lm"] fpmask_filename_format: "wcu/fp_mask_{}.dat" current_fpmask: "open" +fpmask_angle: 0 +fpmask_shift: (0, 0) # ------------- Data needed to describe the WCU bb_to_is: "wcu/WCU_BB_to_IS_throughput.fits"