diff --git a/.gitignore b/.gitignore index 9fdc88e9..fcedc525 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,5 @@ TEST*.fits # Pylint .pylint.d/ + +.DS_Store diff --git a/ZShooter/LIST_ZShooter_mirrors.dat b/ZShooter_v1/LIST_ZShooter_mirrors.dat similarity index 100% rename from ZShooter/LIST_ZShooter_mirrors.dat rename to ZShooter_v1/LIST_ZShooter_mirrors.dat diff --git a/ZShooter/QE.dat b/ZShooter_v1/QE.dat similarity index 100% rename from ZShooter/QE.dat rename to ZShooter_v1/QE.dat diff --git a/ZShooter/TER_selector.dat b/ZShooter_v1/TER_selector.dat similarity index 100% rename from ZShooter/TER_selector.dat rename to ZShooter_v1/TER_selector.dat diff --git a/ZShooter/TER_window.dat b/ZShooter_v1/TER_window.dat similarity index 100% rename from ZShooter/TER_window.dat rename to ZShooter_v1/TER_window.dat diff --git a/ZShooter/ZShooter.yaml b/ZShooter_v1/ZShooter.yaml similarity index 100% rename from ZShooter/ZShooter.yaml rename to ZShooter_v1/ZShooter.yaml diff --git a/ZShooter/ZShooter_DET.yaml b/ZShooter_v1/ZShooter_DET.yaml similarity index 92% rename from ZShooter/ZShooter_DET.yaml rename to ZShooter_v1/ZShooter_DET.yaml index 66e24600..127db5d0 100644 --- a/ZShooter/ZShooter_DET.yaml +++ b/ZShooter_v1/ZShooter_DET.yaml @@ -14,7 +14,7 @@ properties : effects : - name: detector_nir - description: Single 4k x 4k detector for ZShooter NIR arm + description: Two detectors for ZShooter NIR arm include: True class: DetectorList kwargs: @@ -35,6 +35,7 @@ effects : pixel_size_unit: mm angle_unit: deg gain_unit: electron/adu + detector: "NIR" - name: detector_vis description: Single 4k x 4k detector for ZShooter VIS arm @@ -58,6 +59,7 @@ effects : pixel_size_unit: mm angle_unit: deg gain_unit: electron/adu + detector: "VIS" - name: detector_uvb description: Single 4k x 4k detector for ZShooter UVB arm @@ -81,6 +83,7 @@ effects : pixel_size_unit: mm angle_unit: deg gain_unit: electron/adu + detector: "UVB" - name: exposure_integration description: Summing up sky signal for all DITs and NDITs diff --git a/ZShooter/ZShooter_SPEC.yaml b/ZShooter_v1/ZShooter_SPEC.yaml similarity index 83% rename from ZShooter/ZShooter_SPEC.yaml rename to ZShooter_v1/ZShooter_SPEC.yaml index 047e2cec..bad78f21 100755 --- a/ZShooter/ZShooter_SPEC.yaml +++ b/ZShooter_v1/ZShooter_SPEC.yaml @@ -1,9 +1,9 @@ -### Common effects list for ZShooter +### Common effects list for ZShooter_v1 object: instrument alias: INST -name: ZShooter -description: Effects from the ZShooter optics +name: ZShooter_v1 +description: Effects from the ZShooter_v1 optics properties: decouple_detector_from_sky_headers: True # needed for slit spectroscopy @@ -14,12 +14,12 @@ properties: effects: - name: dichroic_tree description: ZShooter dichroic tree - class: DichroicTreeEffect + class: DichroicTree include: True kwargs: tree_filename: "dichroics/dichroic_tree.dat" dichroic_names: "!INST.dichroic_names" - filename_format: "dichroics/TER_{}.dat" + filename_format: "dichroics/TER_tree_{}.dat" - name: slit_nir description: ZShooter NIR slit @@ -50,20 +50,20 @@ effects: class: SpectralEfficiency include: True kwargs: - filename: "traces/TRACE_eff.fits" + filename: "traces/TRACE_eff_old.fits" - name: trace_list description: list of spectral order trace geometry on the focal plane class: SpectralTraceList include: True kwargs: - filename: "traces/TRACE_ZSHOOTER.fits" + filename: "traces/TRACE_ZSHOOTER_old.fits" wave_colname: "wavelength" s_colname: "s" col_number_start: 1 - name: detector_qe - description: QE curve for new OSIRIS detector, placeholder for ZShooter + description: QE curve for new OSIRIS detector, placeholder for ZShooter_v1 class: QuantumEfficiencyCurve include: True kwargs: diff --git a/ZShooter/default.yaml b/ZShooter_v1/default.yaml similarity index 94% rename from ZShooter/default.yaml rename to ZShooter_v1/default.yaml index 471848a8..caeb9d2b 100755 --- a/ZShooter/default.yaml +++ b/ZShooter_v1/default.yaml @@ -11,16 +11,15 @@ version: 0.1 packages: - MaunaKea - keck -- ZShooter +- ZShooter_v1 yamls: - MaunaKea.yaml - Keck.yaml - ZShooter.yaml -- ZShooter_DET.yaml properties: - instrument : ZShooter + instrument : ZShooter_v1 modes : ["SPEC"] airmass : 1.2 declination : 0 @@ -40,6 +39,7 @@ mode_yamls: description : "spectroscopic mode" yamls : - ZShooter_SPEC.yaml + - ZShooter_DET.yaml --- ### default simulation parameters needed for a MICADO simulation diff --git a/ZShooter/dichroics/TER_dichroic1.dat b/ZShooter_v1/dichroics/TER_tree_dichroic1.dat similarity index 100% rename from ZShooter/dichroics/TER_dichroic1.dat rename to ZShooter_v1/dichroics/TER_tree_dichroic1.dat diff --git a/ZShooter/dichroics/TER_dichroic2.dat b/ZShooter_v1/dichroics/TER_tree_dichroic2.dat similarity index 100% rename from ZShooter/dichroics/TER_dichroic2.dat rename to ZShooter_v1/dichroics/TER_tree_dichroic2.dat diff --git a/ZShooter/dichroics/dichroic_tree.dat b/ZShooter_v1/dichroics/dichroic_tree.dat similarity index 100% rename from ZShooter/dichroics/dichroic_tree.dat rename to ZShooter_v1/dichroics/dichroic_tree.dat diff --git a/ZShooter/slits/slit_nir.dat b/ZShooter_v1/slits/slit_nir.dat similarity index 100% rename from ZShooter/slits/slit_nir.dat rename to ZShooter_v1/slits/slit_nir.dat diff --git a/ZShooter/slits/slit_uvb.dat b/ZShooter_v1/slits/slit_uvb.dat similarity index 100% rename from ZShooter/slits/slit_uvb.dat rename to ZShooter_v1/slits/slit_uvb.dat diff --git a/ZShooter/slits/slit_vis.dat b/ZShooter_v1/slits/slit_vis.dat similarity index 100% rename from ZShooter/slits/slit_vis.dat rename to ZShooter_v1/slits/slit_vis.dat diff --git a/ZShooter/traces/Echelle_Layout/Blue_Echelle_Bottom.txt b/ZShooter_v1/traces/Echelle_Layout/Blue_Echelle_Bottom.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/Blue_Echelle_Bottom.txt rename to ZShooter_v1/traces/Echelle_Layout/Blue_Echelle_Bottom.txt diff --git a/ZShooter/traces/Echelle_Layout/Blue_Echelle_Center.txt b/ZShooter_v1/traces/Echelle_Layout/Blue_Echelle_Center.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/Blue_Echelle_Center.txt rename to ZShooter_v1/traces/Echelle_Layout/Blue_Echelle_Center.txt diff --git a/ZShooter/traces/Echelle_Layout/Blue_Echelle_Top.txt b/ZShooter_v1/traces/Echelle_Layout/Blue_Echelle_Top.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/Blue_Echelle_Top.txt rename to ZShooter_v1/traces/Echelle_Layout/Blue_Echelle_Top.txt diff --git a/ZShooter/traces/Echelle_Layout/HK_Echelle_Bottom.txt b/ZShooter_v1/traces/Echelle_Layout/HK_Echelle_Bottom.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/HK_Echelle_Bottom.txt rename to ZShooter_v1/traces/Echelle_Layout/HK_Echelle_Bottom.txt diff --git a/ZShooter/traces/Echelle_Layout/HK_Echelle_Center.txt b/ZShooter_v1/traces/Echelle_Layout/HK_Echelle_Center.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/HK_Echelle_Center.txt rename to ZShooter_v1/traces/Echelle_Layout/HK_Echelle_Center.txt diff --git a/ZShooter/traces/Echelle_Layout/HK_Echelle_Top.txt b/ZShooter_v1/traces/Echelle_Layout/HK_Echelle_Top.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/HK_Echelle_Top.txt rename to ZShooter_v1/traces/Echelle_Layout/HK_Echelle_Top.txt diff --git a/ZShooter/traces/Echelle_Layout/Red_Echelle_Bottom.txt b/ZShooter_v1/traces/Echelle_Layout/Red_Echelle_Bottom.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/Red_Echelle_Bottom.txt rename to ZShooter_v1/traces/Echelle_Layout/Red_Echelle_Bottom.txt diff --git a/ZShooter/traces/Echelle_Layout/Red_Echelle_Center.txt b/ZShooter_v1/traces/Echelle_Layout/Red_Echelle_Center.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/Red_Echelle_Center.txt rename to ZShooter_v1/traces/Echelle_Layout/Red_Echelle_Center.txt diff --git a/ZShooter/traces/Echelle_Layout/Red_Echelle_Top.txt b/ZShooter_v1/traces/Echelle_Layout/Red_Echelle_Top.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/Red_Echelle_Top.txt rename to ZShooter_v1/traces/Echelle_Layout/Red_Echelle_Top.txt diff --git a/ZShooter/traces/Echelle_Layout/YJ_Echelle_Bottom.txt b/ZShooter_v1/traces/Echelle_Layout/YJ_Echelle_Bottom.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/YJ_Echelle_Bottom.txt rename to ZShooter_v1/traces/Echelle_Layout/YJ_Echelle_Bottom.txt diff --git a/ZShooter/traces/Echelle_Layout/YJ_Echelle_Center.txt b/ZShooter_v1/traces/Echelle_Layout/YJ_Echelle_Center.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/YJ_Echelle_Center.txt rename to ZShooter_v1/traces/Echelle_Layout/YJ_Echelle_Center.txt diff --git a/ZShooter/traces/Echelle_Layout/YJ_Echelle_Top.txt b/ZShooter_v1/traces/Echelle_Layout/YJ_Echelle_Top.txt similarity index 100% rename from ZShooter/traces/Echelle_Layout/YJ_Echelle_Top.txt rename to ZShooter_v1/traces/Echelle_Layout/YJ_Echelle_Top.txt diff --git a/ZShooter/traces/TRACE_ZSHOOTER.fits b/ZShooter_v1/traces/TRACE_ZSHOOTER_old.fits similarity index 100% rename from ZShooter/traces/TRACE_ZSHOOTER.fits rename to ZShooter_v1/traces/TRACE_ZSHOOTER_old.fits diff --git a/ZShooter/traces/TRACE_eff.fits b/ZShooter_v1/traces/TRACE_eff_old.fits similarity index 100% rename from ZShooter/traces/TRACE_eff.fits rename to ZShooter_v1/traces/TRACE_eff_old.fits diff --git a/ZShooter/traces/create_tracefits_from_txts.py b/ZShooter_v1/traces/create_tracefits_from_txts.py similarity index 100% rename from ZShooter/traces/create_tracefits_from_txts.py rename to ZShooter_v1/traces/create_tracefits_from_txts.py diff --git a/ZShooter/traces/echelle_trace_parameters.dat b/ZShooter_v1/traces/echelle_trace_parameters.dat similarity index 100% rename from ZShooter/traces/echelle_trace_parameters.dat rename to ZShooter_v1/traces/echelle_trace_parameters.dat diff --git a/ZShooter/traces/echelle_traces.fits b/ZShooter_v1/traces/echelle_traces.fits similarity index 100% rename from ZShooter/traces/echelle_traces.fits rename to ZShooter_v1/traces/echelle_traces.fits diff --git a/ZShooter/zshooter_echellogram.png b/ZShooter_v1/zshooter_echellogram.png similarity index 100% rename from ZShooter/zshooter_echellogram.png rename to ZShooter_v1/zshooter_echellogram.png diff --git a/ZShooter_v2/LIST_ZShooter_mirrors.dat b/ZShooter_v2/LIST_ZShooter_mirrors.dat new file mode 100644 index 00000000..6d0f452e --- /dev/null +++ b/ZShooter_v2/LIST_ZShooter_mirrors.dat @@ -0,0 +1,14 @@ +# author : Y. Sharma +# date_created : 2025-09-24 +# status : Placeholder for the ZShooter selector mirror +# type : mirror:list +# outer_unit : m +# inner_unit : m +# angle_unit : degree +# temperature_unit : deg_C +# changes : +# - 2025-09-24 : created a placeholder file (copied from HAWKI) +# +name outer inner angle temperature action filename +M0_EntrWin 0.4 0.0 0 0 transmission TER_window.dat +M1_Fold 0.4 0.0 0 0 reflection TER_selector.dat \ No newline at end of file diff --git a/ZShooter_v2/QE.dat b/ZShooter_v2/QE.dat new file mode 100644 index 00000000..5ff68f8a --- /dev/null +++ b/ZShooter_v2/QE.dat @@ -0,0 +1,13 @@ +# author : Y. Sharma +# date_created : 2025-10-30 +# type : detector:quantum_efficiency +# description : quantum efficiency +# wavelength_unit: um +# action : transmission +# changes : +wavelength transmission +0.29 0.0 +0.30 1.0 +1.00 1.0 +3.00 1.0 +3.01 0.0 diff --git a/ZShooter_v2/TER_selector.dat b/ZShooter_v2/TER_selector.dat new file mode 100644 index 00000000..d552884c --- /dev/null +++ b/ZShooter_v2/TER_selector.dat @@ -0,0 +1,12 @@ +# author : Y. Sharma +# date_created : 2025-09-24 +# status : placeholder +# type : mirror:reflection +# wavelength_unit : um +# description : +# changes : +# - 2025-09-24 : created a placeholder file (copied from HAWKI) +# +wavelength reflection +0.3 0.985 +3.0 0.985 diff --git a/ZShooter_v2/TER_window.dat b/ZShooter_v2/TER_window.dat new file mode 100644 index 00000000..93baf78f --- /dev/null +++ b/ZShooter_v2/TER_window.dat @@ -0,0 +1,17 @@ +# name : Entrance window spectral response +# description : Throughput of the entrance window (placeholder) +# author : Y. Sharma +# sources: +# date_created : 2025-09-24 +# status : Idea - guess pulled out of thin air +# type : window:transmission +# wavelength_unit : um +# +# changes : +# - 2025-09-24 : created a placeholder file (copied from HAWKI) +# +wavelength transmission reflection emissivity +0.3 0 1 0 +0.31 0.90 0 0.1 +3.0 0.90 0 0.1 +3.01 0 1 0 \ No newline at end of file diff --git a/ZShooter_v2/ZShooter.yaml b/ZShooter_v2/ZShooter.yaml new file mode 100755 index 00000000..7bbb8ed4 --- /dev/null +++ b/ZShooter_v2/ZShooter.yaml @@ -0,0 +1,19 @@ +### Common effects list for ZShooter + +object: instrument +alias: INST +name: ZShooter +description: Common effects from the ZShooter_v1 optics + +properties: + temperature: -80 #TODO: check value + pixel_scale : 0.159574468085 #TODO update with real value + plate_scale : 10.638297872333334 #TODO update with real value + +effects: + - name: Selector + description: Mirror selector for imaging or spectroscopic mode + class: SurfaceList + include: True + kwargs: + filename: LIST_ZShooter_mirrors.dat diff --git a/ZShooter_v2/ZShooter_DET.yaml b/ZShooter_v2/ZShooter_DET.yaml new file mode 100644 index 00000000..49d0819c --- /dev/null +++ b/ZShooter_v2/ZShooter_DET.yaml @@ -0,0 +1,259 @@ +### ZShooter_v2 DETECTORs for ZSPEC +object : detector +alias : DET +name : zspec_detectors +description : 3 CCDs/qCCDs for b, g, r arms and 3 HgCdTe APDs for yj, h, k arms + +properties : + temperature : -120 + binx : 1 + biny: 1 + dit : "!OBS.dit" + ndit : "!OBS.ndit" + +effects : + - name: detector_b + description: Single 2k x 2k detector for ZShooter_v2 B arm + include: True + class: DetectorList + kwargs: + image_plane_id : 0 + array_dict: + id: [0] + x_cen: [0.0] + y_cen: [0.0] + x_size: [2048] + y_size: [2048] + pixel_size: [0.015] + angle: [0.0] + gain: [1.0] + x_cen_unit: mm + y_cen_unit: mm + x_size_unit: pixel + y_size_unit: pixel + pixel_size_unit: mm + angle_unit: deg + gain_unit: electron/adu + detector: "CCD_B" + + - name: detector_g + description: Single 2k x 2k detector for ZShooter_v2 G arm + include: True + class: DetectorList + kwargs: + image_plane_id : 1 + array_dict: + id: [1] + x_cen: [0.0] + y_cen: [0.0] + x_size: [2048] + y_size: [2048] + pixel_size: [0.015] + angle: [0.0] + gain: [1.0] + x_cen_unit: mm + y_cen_unit: mm + x_size_unit: pixel + y_size_unit: pixel + pixel_size_unit: mm + angle_unit: deg + gain_unit: electron/adu + detector: "CCD_G" + + - name: detector_r + description: Single 2k x 2k detector for ZShooter_v2 R arm + include: True + class: DetectorList + kwargs: + image_plane_id : 2 + array_dict: + id: [2] + x_cen: [0.0] + y_cen: [0.0] + x_size: [2048] + y_size: [2048] + pixel_size: [0.015] + angle: [0.0] + gain: [1.0] + x_cen_unit: mm + y_cen_unit: mm + x_size_unit: pixel + y_size_unit: pixel + pixel_size_unit: mm + angle_unit: deg + gain_unit: electron/adu + detector: "CCD_R" + + - name: detector_yj + description: Single 2k x 2k detector for ZShooter_v2 YJ arm + include: True + class: DetectorList + kwargs: + image_plane_id : 3 + array_dict: + id: [3] + x_cen: [0.0] + y_cen: [0.0] + x_size: [2048] + y_size: [2048] + pixel_size: [0.015] + angle: [0.0] + gain: [1.0] + x_cen_unit: mm + y_cen_unit: mm + x_size_unit: pixel + y_size_unit: pixel + pixel_size_unit: mm + angle_unit: deg + gain_unit: electron/adu + detector: "APD_YJ" + + - name: detector_h + description: Single 2k x 2k detector for ZShooter_v2 H arm + include: True + class: DetectorList + kwargs: + image_plane_id : 4 + array_dict: + id: [4] + x_cen: [0.0] + y_cen: [0.0] + x_size: [2048] + y_size: [2048] + pixel_size: [0.015] + angle: [0.0] + gain: [1.0] + x_cen_unit: mm + y_cen_unit: mm + x_size_unit: pixel + y_size_unit: pixel + pixel_size_unit: mm + angle_unit: deg + gain_unit: electron/adu + detector: "APD_H" + + - name: detector_k + description: Single 2k x 2k detector for ZShooter_v2 K arm + include: True + class: DetectorList + kwargs: + image_plane_id : 5 + array_dict: + id: [5] + x_cen: [0.0] + y_cen: [0.0] + x_size: [2048] + y_size: [2048] + pixel_size: [0.015] + angle: [0.0] + gain: [1.0] + x_cen_unit: mm + y_cen_unit: mm + x_size_unit: pixel + y_size_unit: pixel + pixel_size_unit: mm + angle_unit: deg + gain_unit: electron/adu + detector: "APD_K" + + - name: exposure_integration + description: Summing up sky signal for all DITs and NDITs + class: ExposureIntegration + + - name: shot_noise + description : apply poisson shot noise to images + class: ShotNoise + + - name: dark_current_selector + description: Selector Wheel for dark current levels for CCDs and APDs + class: SelectorWheel + include: True + kwargs: + selector_key: "detector_id" # not really used as the Detector object's id is stored as just "id", but kept for consistency + wheel: + - selector_value: [0,1,2] # CCD detectors + effect_class: DarkCurrent + effect_kwargs: + value: 0.0001 # [e-/s] level of dark current for CCD detectors + dit: "!DET.dit" + ndit: "!DET.ndit" + + - selector_value: [3,4,5] # APD detectors + effect_class: DarkCurrent + effect_kwargs: + value: 0.0001 # [e-/s] level of dark current for APD detectors + dit: "!OBS.dit" + ndit: "!OBS.ndit" + + - name: detector_linearity_selector + description: Selector Wheel for linearity characteristics for CCDs and APDs + class: SelectorWheel + include: False + kwargs: + selector_key: "detector_id" # not really used as the Detector object's id is stored as just "id", but kept for consistency + wheel: + - selector_value: [0,1,2] # CCD detectors + effect_class: LinearityCurve + effect_kwargs: + array_dict: + incident: [0, 64e3] + measured: [0, 64e3] + ndit: "!OBS.ndit" + + - selector_value: [3,4,5] # APD detectors + effect_class: LinearityCurve + effect_kwargs: + array_dict: + incident: [0, 64e3] + measured: [0, 64e3] + ndit: "!OBS.ndit" + +# - name: border_reference_pixels +# description: Blanks the signal on N edge row and column pixels +# class: ReferencePixelBorder +# kwargs: +# left: 50 +# right: 50 #New CCD only has prescan, no overscan + + - name: readout_noise_selector + description: Selector Wheel for readout noise levels for CCDs and APDs + class: SelectorWheel + include: True + kwargs: + selector_key: "detector_id" # not really used as the Detector object's id is stored as just "id", but kept for consistency + wheel: + - selector_value: [0,1,2] # CCD detectors + effect_class: BasicReadoutNoise + effect_kwargs: + noise_std: 2 # CCD readout noise std dev in electrons + ndit: "!OBS.ndit" + + - selector_value: [3,4,5] # APD detectors + effect_class: BasicReadoutNoise + effect_kwargs: + noise_std: 2 # APD readout noise std dev in electrons + ndit: "!OBS.ndit" + + - name: binning + description: Applies binning + class: UnequalBinnedImage + include: False + kwargs: + binx: "!DET.binx" + biny: "!DET.biny" + + - name: bias_selector + description: Selector Wheel for bias levels for CCDs and APDs + class: SelectorWheel + include: True + kwargs: + selector_key: "detector_id" # not really used as the Detector object's id is stored as just "id", but kept for consistency + wheel: + - selector_value: [0,1,2] # CCD detectors + effect_class: Bias + effect_kwargs: + bias: 1040 # CCD bias level in electrons + - selector_value: [3,4,5] # APD detectors + effect_class: Bias + effect_kwargs: + bias: 1040 # APD bias level in electrons diff --git a/ZShooter_v2/ZShooter_SPEC.yaml b/ZShooter_v2/ZShooter_SPEC.yaml new file mode 100755 index 00000000..11e745e5 --- /dev/null +++ b/ZShooter_v2/ZShooter_SPEC.yaml @@ -0,0 +1,139 @@ + +object: instrument +alias: INST +name: ZShooter +description: Effects from the ZShooter optics + +properties: + decouple_detector_from_sky_headers: True # needed for slit spectroscopy + dichroic_names: + - bgr-yjhk # First dichroic, splits beam into bgr and yjhk + - b-gr # Next dichroic in bgr arm, splits b from gr + - yj-hk # Next dichroic in yjhk arm, splits yj from hk + - g-r # Next dichroic in gr arm, splits g from r + - h-k # Next dichroic in hk arm, splits h from k + +# There are 6 image planes in ZSpec: b, g, r, yj, h, k. We use the DichroicTree effect to establish the branching +# in the beginning of the flow, using aperture_id as the identifying key. Though physically there may be other +# optical elements in between dichroics, here all dichroics are considered together in a tree. Other effects that +# act selectively on different arms can be orchestrated using SelectorWheel effects. + +effects: + - name: dichroic_tree + description: ZShooter_v2 dichroic tree + class: DichroicTree + include: True + kwargs: + tree_filename: "dichroics/dichroic_tree.dat" + dichroic_names: "!INST.dichroic_names" + filename_format: "dichroics/TER_dichroic_{}.dat" + + +# - name: adc_selector +# description: SelectorWheel holding AtmosphericDispersionCorrector for ub+vis, optionally for NIR for testing +# class: SelectorWheel +# include: False +# kwargs: +# selector_key: "aperture_id" +# wheel: +# - selector_value: [0, 1, 2] # ADC that acts on bgr after first dichroic split +# effect_class: AtmosphericDispersionCorrection +# effect_kwargs: +# altitude : "!ATMO.altitude" +# longitude : "!ATMO.longitude" +# latitude : "!ATMO.latitude" +# airmass : "!OBS.airmass" +# temperature : "!ATMO.temperature" +# humidity : "!ATMO.humidity" +# pressure : "!ATMO.pressure" +# pupil_angle : "!OBS.pupil_angle" +# efficiency: 1 +# wave_mid: "!SIM.spectral.wave_mid" +# quick_adc: True +# +# - selector_value: [3, 4, 5] # ADC that acts on yjhk after first dichroic split, usually no ADC, but option for testing +# effect_class: AtmosphericDispersionCorrection +# effect_kwargs: +# altitude : "!ATMO.altitude" +# longitude : "!ATMO.longitude" +# latitude : "!ATMO.latitude" +# airmass : "!OBS.airmass" +# temperature : "!ATMO.temperature" +# humidity : "!ATMO.humidity" +# pressure : "!ATMO.pressure" +# pupil_angle : "!OBS.pupil_angle" +# efficiency: 1 +# wave_mid: "!SIM.spectral.wave_mid" +# quick_adc: True + + + - name: slitwheel_selector + description: SelectorWheel holding two SlitWheels, one for bgr, one for yjhk + class: SelectorWheel + include: True + kwargs: + selector_key: "aperture_id" + wheel: + - selector_value: [0, 1, 2] + effect_class: SlitWheel + effect_kwargs: + slit_names: + - "ubvis_half_arcsec" + - "ubvis_one_arcsec" + - "ubvis_two_arcsec" + filename_format: "slits/{}.dat" + current_slit: "ubvis_one_arcsec" + + - selector_value: [3, 4, 5] + effect_class: SlitWheel + effect_kwargs: + slit_names: + - "nir_half_arcsec" + - "nir_one_arcsec" + - "nir_two_arcsec" + filename_format: "slits/{}.dat" + current_slit: "nir_one_arcsec" + + +# - name: some_optics +# description: placeholder for other optics in ZShooter +# class: SurfaceList +# include: False +# kwargs: +# filename: "LIST_ZSHOOTER_optics.dat" + + +## Need only one entry for trace efficiency and trace list for all arms as the same FITS description contains info for all arms and orders +# - name: trace_eff_zemax +# description: list of spectral order trace efficiencies +# class: SpectralEfficiency +# include: True +# kwargs: +# filename: "traces/TRACE_eff.fits" # Does not exist as of now +# +# - name: trace_list_zemax +# description: list of spectral order trace geometry on the focal plane +# class: SpectralTraceList +# include: True +# kwargs: +# filename: "traces/TRACE_ZSHOOTER.fits" # Does not exist as of now +# wave_colname: "wavelength" +# s_colname: "s" +# col_number_start: 1 + + - name: trace_eff_analytical + description: list of spectral order trace efficiencies calculated from analytical model for Echelle + class: EchelleSpectralEfficiency + include: True + kwargs: + filename: "traces/echelle_trace_parameters.dat" + + - name: trace_list_analytical + description: list of spectral order trace geometry on the focal plane calculated from analytical model for Echelle + class: EchelleSpectralTraceList + include: True + kwargs: + filename: "traces/echelle_trace_parameters.dat" + wave_colname: "wavelength" + s_colname: "s" + col_number_start: 1 diff --git a/ZShooter_v2/default.yaml b/ZShooter_v2/default.yaml new file mode 100755 index 00000000..c24273da --- /dev/null +++ b/ZShooter_v2/default.yaml @@ -0,0 +1,65 @@ +--- +### default observation parameters needed for ZShooter simulation + +object: configuration +alias: OBS +name: ZShooter_default_configuration +description: default config for zshooter sim +status: development +version: 0.1 + +packages: +- MaunaKea +- keck +- ZShooter_v2 + +yamls: +- MaunaKea.yaml +- Keck.yaml +- ZShooter.yaml + +properties: + instrument : ZShooter_v2 + modes : ["SPEC"] + airmass : 1.2 + declination : 0 + hour_angle : 0 + pupil_angle : 0 + dit : 10 + ndit : 1 + mjdobs : 60920 + object : "Test" + ra : 0.0 + dec : 0.0 + +mode_yamls: +- object: instrument + alias: OBS + name : SPEC + description : "spectroscopic mode" + yamls : + - ZShooter_SPEC.yaml + - ZShooter_DET.yaml + +--- +### default simulation parameters needed for a MICADO simulation +object : simulation +alias : SIM +name : ZShooter_simulation_paramters +description : RC simulation paramters which need to change for a zshooter run + +properties : + random : + seed : 9001 + + spectral : + wave_min : 0.3 #change + wave_mid : 1.0 #change + wave_max : 2.5 #change + spectral_bin_width: 0.0005 # 0.5 Angstrom + + computing : + preload_field_of_views : True + +# reports: +# preamble_file: "../docs/.rst" diff --git a/ZShooter_v2/dichroics/TER_dichroic_b-gr.dat b/ZShooter_v2/dichroics/TER_dichroic_b-gr.dat new file mode 100644 index 00000000..f624aca0 --- /dev/null +++ b/ZShooter_v2/dichroics/TER_dichroic_b-gr.dat @@ -0,0 +1,229 @@ +# name : second_layer_dichroic_UBVIS +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : 2026-03-16T21:02:23.163 +# comment : Transmits GR (VIS) reflects UB +# wavelength_unit : um +# changes : +# +wavelength transmission reflection +0.30 0.000000 0.931532 +0.31 0.000000 0.976356 +0.32 0.000000 0.983843 +0.33 0.000000 0.984535 +0.34 0.000003 0.984568 +0.35 0.000093 0.984479 +0.36 0.001570 0.983002 +0.37 0.015002 0.969569 +0.38 0.082681 0.901891 +0.39 0.272064 0.712508 +0.40 0.566938 0.417634 +0.41 0.822626 0.161946 +0.42 0.946069 0.038503 +0.43 0.979209 0.005363 +0.44 0.984146 0.000426 +0.45 0.984553 0.000019 +0.46 0.984571 0.000000 +0.47 0.984572 0.000000 +0.48 0.984572 0.000000 +0.49 0.984572 0.000000 +0.50 0.984572 0.000000 +0.51 0.984572 0.000000 +0.52 0.984572 0.000000 +0.53 0.984572 0.000000 +0.54 0.984572 0.000000 +0.55 0.984572 0.000000 +0.56 0.984572 0.000000 +0.57 0.984572 0.000000 +0.58 0.984572 0.000000 +0.59 0.984572 0.000000 +0.60 0.984572 0.000000 +0.61 0.984572 0.000000 +0.62 0.984572 0.000000 +0.63 0.984572 0.000000 +0.64 0.984572 0.000000 +0.65 0.984572 0.000000 +0.66 0.984572 0.000000 +0.67 0.984572 0.000000 +0.68 0.984572 0.000000 +0.69 0.984572 0.000000 +0.70 0.984572 0.000000 +0.71 0.984572 0.000000 +0.72 0.984572 0.000000 +0.73 0.984572 0.000000 +0.74 0.984572 0.000000 +0.75 0.984572 0.000000 +0.76 0.984572 0.000000 +0.77 0.984572 0.000000 +0.78 0.984572 0.000000 +0.79 0.984572 0.000000 +0.80 0.984572 0.000000 +0.81 0.984572 0.000000 +0.82 0.984572 0.000000 +0.83 0.984572 0.000000 +0.84 0.984572 0.000000 +0.85 0.984572 0.000000 +0.86 0.984572 0.000000 +0.87 0.984572 0.000000 +0.88 0.984572 0.000000 +0.89 0.984572 0.000000 +0.90 0.984572 0.000000 +0.91 0.984572 0.000000 +0.92 0.984572 0.000000 +0.93 0.984572 0.000000 +0.94 0.984572 0.000000 +0.95 0.984572 0.000000 +0.96 0.984572 0.000000 +0.97 0.984570 0.000000 +0.98 0.984526 0.000000 +0.99 0.983699 0.000000 +1.00 0.975110 0.000000 +1.01 0.925711 0.000000 +1.02 0.767902 0.000000 +1.03 0.487324 0.000000 +1.04 0.209379 0.000000 +1.05 0.055970 0.000000 +1.06 0.008843 0.000000 +1.07 0.000801 0.000000 +1.08 0.000041 0.000000 +1.09 0.000001 0.000000 +1.10 0.000000 0.000000 +1.11 0.000000 0.000000 +1.12 0.000000 0.000000 +1.13 0.000000 0.000000 +1.14 0.000000 0.000000 +1.15 0.000000 0.000000 +1.16 0.000000 0.000000 +1.17 0.000000 0.000000 +1.18 0.000000 0.000000 +1.19 0.000000 0.000000 +1.20 0.000000 0.000000 +1.21 0.000000 0.000000 +1.22 0.000000 0.000000 +1.23 0.000000 0.000000 +1.24 0.000000 0.000000 +1.25 0.000000 0.000000 +1.26 0.000000 0.000000 +1.27 0.000000 0.000000 +1.28 0.000000 0.000000 +1.29 0.000000 0.000000 +1.30 0.000000 0.000000 +1.31 0.000000 0.000000 +1.32 0.000000 0.000000 +1.33 0.000000 0.000000 +1.34 0.000000 0.000000 +1.35 0.000000 0.000000 +1.36 0.000000 0.000000 +1.37 0.000000 0.000000 +1.38 0.000000 0.000000 +1.39 0.000000 0.000000 +1.40 0.000000 0.000000 +1.41 0.000000 0.000000 +1.42 0.000000 0.000000 +1.43 0.000000 0.000000 +1.44 0.000000 0.000000 +1.45 0.000000 0.000000 +1.46 0.000000 0.000000 +1.47 0.000000 0.000000 +1.48 0.000000 0.000000 +1.49 0.000000 0.000000 +1.50 0.000000 0.000000 +1.51 0.000000 0.000000 +1.52 0.000000 0.000000 +1.53 0.000000 0.000000 +1.54 0.000000 0.000000 +1.55 0.000000 0.000000 +1.56 0.000000 0.000000 +1.57 0.000000 0.000000 +1.58 0.000000 0.000000 +1.59 0.000000 0.000000 +1.60 0.000000 0.000000 +1.61 0.000000 0.000000 +1.62 0.000000 0.000000 +1.63 0.000000 0.000000 +1.64 0.000000 0.000000 +1.65 0.000000 0.000000 +1.66 0.000000 0.000000 +1.67 0.000000 0.000000 +1.68 0.000000 0.000000 +1.69 0.000000 0.000000 +1.70 0.000000 0.000000 +1.71 0.000000 0.000000 +1.72 0.000000 0.000000 +1.73 0.000000 0.000000 +1.74 0.000000 0.000000 +1.75 0.000000 0.000000 +1.76 0.000000 0.000000 +1.77 0.000000 0.000000 +1.78 0.000000 0.000000 +1.79 0.000000 0.000000 +1.80 0.000000 0.000000 +1.81 0.000000 0.000000 +1.82 0.000000 0.000000 +1.83 0.000000 0.000000 +1.84 0.000000 0.000000 +1.85 0.000000 0.000000 +1.86 0.000000 0.000000 +1.87 0.000000 0.000000 +1.88 0.000000 0.000000 +1.89 0.000000 0.000000 +1.90 0.000000 0.000000 +1.91 0.000000 0.000000 +1.92 0.000000 0.000000 +1.93 0.000000 0.000000 +1.94 0.000000 0.000000 +1.95 0.000000 0.000000 +1.96 0.000000 0.000000 +1.97 0.000000 0.000000 +1.98 0.000000 0.000000 +1.99 0.000000 0.000000 +2.00 0.000000 0.000000 +2.01 0.000000 0.000000 +2.02 0.000000 0.000000 +2.03 0.000000 0.000000 +2.04 0.000000 0.000000 +2.05 0.000000 0.000000 +2.06 0.000000 0.000000 +2.07 0.000000 0.000000 +2.08 0.000000 0.000000 +2.09 0.000000 0.000000 +2.10 0.000000 0.000000 +2.11 0.000000 0.000000 +2.12 0.000000 0.000000 +2.13 0.000000 0.000000 +2.14 0.000000 0.000000 +2.15 0.000000 0.000000 +2.16 0.000000 0.000000 +2.17 0.000000 0.000000 +2.18 0.000000 0.000000 +2.19 0.000000 0.000000 +2.20 0.000000 0.000000 +2.21 0.000000 0.000000 +2.22 0.000000 0.000000 +2.23 0.000000 0.000000 +2.24 0.000000 0.000000 +2.25 0.000000 0.000000 +2.26 0.000000 0.000000 +2.27 0.000000 0.000000 +2.28 0.000000 0.000000 +2.29 0.000000 0.000000 +2.30 0.000000 0.000000 +2.31 0.000000 0.000000 +2.32 0.000000 0.000000 +2.33 0.000000 0.000000 +2.34 0.000000 0.000000 +2.35 0.000000 0.000000 +2.36 0.000000 0.000000 +2.37 0.000000 0.000000 +2.38 0.000000 0.000000 +2.39 0.000000 0.000000 +2.40 0.000000 0.000000 +2.41 0.000000 0.000000 +2.42 0.000000 0.000000 +2.43 0.000000 0.000000 +2.44 0.000000 0.000000 +2.45 0.000000 0.000000 +2.46 0.000000 0.000000 +2.47 0.000000 0.000000 +2.48 0.000000 0.000000 +2.49 0.000000 0.000000 diff --git a/ZShooter_v2/dichroics/TER_dichroic_bgr-yjhk.dat b/ZShooter_v2/dichroics/TER_dichroic_bgr-yjhk.dat new file mode 100644 index 00000000..dbab3bc9 --- /dev/null +++ b/ZShooter_v2/dichroics/TER_dichroic_bgr-yjhk.dat @@ -0,0 +1,229 @@ +# name : first_dichroic +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : 2026-03-16T21:02:23.142 +# comment : Transmits NIR, reflects UBVIS +# wavelength_unit : um +# changes : +# +wavelength transmission reflection +0.30 0.000000 0.931532 +0.31 0.000000 0.976356 +0.32 0.000000 0.983843 +0.33 0.000000 0.984535 +0.34 0.000000 0.984571 +0.35 0.000000 0.984572 +0.36 0.000000 0.984572 +0.37 0.000000 0.984572 +0.38 0.000000 0.984572 +0.39 0.000000 0.984572 +0.40 0.000000 0.984572 +0.41 0.000000 0.984572 +0.42 0.000000 0.984572 +0.43 0.000000 0.984572 +0.44 0.000000 0.984572 +0.45 0.000000 0.984572 +0.46 0.000000 0.984572 +0.47 0.000000 0.984572 +0.48 0.000000 0.984572 +0.49 0.000000 0.984572 +0.50 0.000000 0.984572 +0.51 0.000000 0.984572 +0.52 0.000000 0.984572 +0.53 0.000000 0.984572 +0.54 0.000000 0.984572 +0.55 0.000000 0.984572 +0.56 0.000000 0.984572 +0.57 0.000000 0.984572 +0.58 0.000000 0.984572 +0.59 0.000000 0.984572 +0.60 0.000000 0.984572 +0.61 0.000000 0.984572 +0.62 0.000000 0.984572 +0.63 0.000000 0.984572 +0.64 0.000000 0.984572 +0.65 0.000000 0.984572 +0.66 0.000000 0.984572 +0.67 0.000000 0.984572 +0.68 0.000000 0.984572 +0.69 0.000000 0.984572 +0.70 0.000000 0.984572 +0.71 0.000000 0.984572 +0.72 0.000000 0.984572 +0.73 0.000000 0.984572 +0.74 0.000000 0.984572 +0.75 0.000000 0.984572 +0.76 0.000000 0.984572 +0.77 0.000000 0.984572 +0.78 0.000000 0.984572 +0.79 0.000000 0.984572 +0.80 0.000000 0.984572 +0.81 0.000000 0.984572 +0.82 0.000000 0.984572 +0.83 0.000000 0.984572 +0.84 0.000000 0.984572 +0.85 0.000000 0.984572 +0.86 0.000000 0.984572 +0.87 0.000000 0.984572 +0.88 0.000000 0.984572 +0.89 0.000000 0.984572 +0.90 0.000000 0.984572 +0.91 0.000000 0.984572 +0.92 0.000000 0.984572 +0.93 0.000000 0.984572 +0.94 0.000008 0.984563 +0.95 0.000215 0.984357 +0.96 0.003095 0.981477 +0.97 0.025326 0.959246 +0.98 0.120505 0.864067 +0.99 0.347098 0.637474 +1.00 0.647530 0.337041 +1.01 0.869495 0.115077 +1.02 0.960827 0.023744 +1.03 0.981725 0.002846 +1.04 0.984378 0.000194 +1.05 0.984564 0.000007 +1.06 0.984572 0.000000 +1.07 0.984572 0.000000 +1.08 0.984572 0.000000 +1.09 0.984572 0.000000 +1.10 0.984572 0.000000 +1.11 0.984572 0.000000 +1.12 0.984572 0.000000 +1.13 0.984572 0.000000 +1.14 0.984572 0.000000 +1.15 0.984572 0.000000 +1.16 0.984572 0.000000 +1.17 0.984572 0.000000 +1.18 0.984572 0.000000 +1.19 0.984572 0.000000 +1.20 0.984572 0.000000 +1.21 0.984572 0.000000 +1.22 0.984572 0.000000 +1.23 0.984572 0.000000 +1.24 0.984572 0.000000 +1.25 0.984572 0.000000 +1.26 0.984572 0.000000 +1.27 0.984572 0.000000 +1.28 0.984572 0.000000 +1.29 0.984572 0.000000 +1.30 0.984572 0.000000 +1.31 0.984572 0.000000 +1.32 0.984572 0.000000 +1.33 0.984572 0.000000 +1.34 0.984572 0.000000 +1.35 0.984572 0.000000 +1.36 0.984572 0.000000 +1.37 0.984572 0.000000 +1.38 0.984572 0.000000 +1.39 0.984572 0.000000 +1.40 0.984572 0.000000 +1.41 0.984572 0.000000 +1.42 0.984572 0.000000 +1.43 0.984572 0.000000 +1.44 0.984572 0.000000 +1.45 0.984572 0.000000 +1.46 0.984572 0.000000 +1.47 0.984572 0.000000 +1.48 0.984572 0.000000 +1.49 0.984572 0.000000 +1.50 0.984572 0.000000 +1.51 0.984572 0.000000 +1.52 0.984572 0.000000 +1.53 0.984572 0.000000 +1.54 0.984572 0.000000 +1.55 0.984572 0.000000 +1.56 0.984572 0.000000 +1.57 0.984572 0.000000 +1.58 0.984572 0.000000 +1.59 0.984572 0.000000 +1.60 0.984572 0.000000 +1.61 0.984572 0.000000 +1.62 0.984572 0.000000 +1.63 0.984572 0.000000 +1.64 0.984572 0.000000 +1.65 0.984572 0.000000 +1.66 0.984572 0.000000 +1.67 0.984572 0.000000 +1.68 0.984572 0.000000 +1.69 0.984572 0.000000 +1.70 0.984572 0.000000 +1.71 0.984572 0.000000 +1.72 0.984572 0.000000 +1.73 0.984572 0.000000 +1.74 0.984572 0.000000 +1.75 0.984572 0.000000 +1.76 0.984572 0.000000 +1.77 0.984572 0.000000 +1.78 0.984572 0.000000 +1.79 0.984572 0.000000 +1.80 0.984572 0.000000 +1.81 0.984572 0.000000 +1.82 0.984572 0.000000 +1.83 0.984572 0.000000 +1.84 0.984572 0.000000 +1.85 0.984572 0.000000 +1.86 0.984572 0.000000 +1.87 0.984572 0.000000 +1.88 0.984572 0.000000 +1.89 0.984572 0.000000 +1.90 0.984572 0.000000 +1.91 0.984572 0.000000 +1.92 0.984572 0.000000 +1.93 0.984572 0.000000 +1.94 0.984572 0.000000 +1.95 0.984572 0.000000 +1.96 0.984572 0.000000 +1.97 0.984572 0.000000 +1.98 0.984572 0.000000 +1.99 0.984572 0.000000 +2.00 0.984572 0.000000 +2.01 0.984572 0.000000 +2.02 0.984572 0.000000 +2.03 0.984572 0.000000 +2.04 0.984572 0.000000 +2.05 0.984572 0.000000 +2.06 0.984572 0.000000 +2.07 0.984572 0.000000 +2.08 0.984572 0.000000 +2.09 0.984572 0.000000 +2.10 0.984572 0.000000 +2.11 0.984572 0.000000 +2.12 0.984572 0.000000 +2.13 0.984572 0.000000 +2.14 0.984572 0.000000 +2.15 0.984572 0.000000 +2.16 0.984572 0.000000 +2.17 0.984572 0.000000 +2.18 0.984572 0.000000 +2.19 0.984572 0.000000 +2.20 0.984572 0.000000 +2.21 0.984572 0.000000 +2.22 0.984572 0.000000 +2.23 0.984572 0.000000 +2.24 0.984572 0.000000 +2.25 0.984572 0.000000 +2.26 0.984572 0.000000 +2.27 0.984572 0.000000 +2.28 0.984572 0.000000 +2.29 0.984572 0.000000 +2.30 0.984572 0.000000 +2.31 0.984572 0.000000 +2.32 0.984572 0.000000 +2.33 0.984572 0.000000 +2.34 0.984572 0.000000 +2.35 0.984572 0.000000 +2.36 0.984572 0.000000 +2.37 0.984572 0.000000 +2.38 0.984572 0.000000 +2.39 0.984572 0.000000 +2.40 0.984572 0.000000 +2.41 0.984572 0.000000 +2.42 0.984572 0.000000 +2.43 0.984572 0.000000 +2.44 0.984572 0.000000 +2.45 0.984572 0.000000 +2.46 0.984572 0.000000 +2.47 0.984571 0.000000 +2.48 0.984535 0.000000 +2.49 0.983844 0.000000 diff --git a/ZShooter_v2/dichroics/TER_dichroic_g-r.dat b/ZShooter_v2/dichroics/TER_dichroic_g-r.dat new file mode 100644 index 00000000..e4fca263 --- /dev/null +++ b/ZShooter_v2/dichroics/TER_dichroic_g-r.dat @@ -0,0 +1,229 @@ +# name : third_layer_dichroic_VIS +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : 2026-03-16T21:02:23.201 +# comment : Transmits R, reflects G +# wavelength_unit : um +# changes : +# +wavelength transmission reflection +0.30 0.000000 0.000000 +0.31 0.000000 0.000009 +0.32 0.000000 0.000231 +0.33 0.000000 0.003289 +0.34 0.000000 0.026556 +0.35 0.000000 0.124727 +0.36 0.000000 0.354920 +0.37 0.000000 0.655352 +0.38 0.000000 0.873717 +0.39 0.000000 0.962057 +0.40 0.000000 0.981919 +0.41 0.000000 0.984394 +0.42 0.000000 0.984565 +0.43 0.000000 0.984572 +0.44 0.000000 0.984572 +0.45 0.000000 0.984572 +0.46 0.000000 0.984572 +0.47 0.000000 0.984572 +0.48 0.000000 0.984572 +0.49 0.000000 0.984572 +0.50 0.000000 0.984572 +0.51 0.000000 0.984572 +0.52 0.000000 0.984572 +0.53 0.000000 0.984572 +0.54 0.000000 0.984572 +0.55 0.000000 0.984572 +0.56 0.000000 0.984572 +0.57 0.000001 0.984570 +0.58 0.000048 0.984524 +0.59 0.000911 0.983660 +0.60 0.009796 0.974775 +0.61 0.060424 0.924148 +0.62 0.220611 0.763961 +0.63 0.502612 0.481960 +0.64 0.779134 0.205438 +0.65 0.930164 0.054407 +0.66 0.976063 0.008509 +0.67 0.983809 0.000763 +0.68 0.984533 0.000038 +0.69 0.984571 0.000001 +0.70 0.984572 0.000000 +0.71 0.984572 0.000000 +0.72 0.984572 0.000000 +0.73 0.984572 0.000000 +0.74 0.984572 0.000000 +0.75 0.984572 0.000000 +0.76 0.984572 0.000000 +0.77 0.984572 0.000000 +0.78 0.984572 0.000000 +0.79 0.984572 0.000000 +0.80 0.984572 0.000000 +0.81 0.984572 0.000000 +0.82 0.984572 0.000000 +0.83 0.984572 0.000000 +0.84 0.984572 0.000000 +0.85 0.984572 0.000000 +0.86 0.984572 0.000000 +0.87 0.984572 0.000000 +0.88 0.984572 0.000000 +0.89 0.984572 0.000000 +0.90 0.984572 0.000000 +0.91 0.984572 0.000000 +0.92 0.984572 0.000000 +0.93 0.984572 0.000000 +0.94 0.984572 0.000000 +0.95 0.984572 0.000000 +0.96 0.984572 0.000000 +0.97 0.984570 0.000000 +0.98 0.984526 0.000000 +0.99 0.983699 0.000000 +1.00 0.975110 0.000000 +1.01 0.925711 0.000000 +1.02 0.767902 0.000000 +1.03 0.487324 0.000000 +1.04 0.209379 0.000000 +1.05 0.055970 0.000000 +1.06 0.008843 0.000000 +1.07 0.000801 0.000000 +1.08 0.000041 0.000000 +1.09 0.000001 0.000000 +1.10 0.000000 0.000000 +1.11 0.000000 0.000000 +1.12 0.000000 0.000000 +1.13 0.000000 0.000000 +1.14 0.000000 0.000000 +1.15 0.000000 0.000000 +1.16 0.000000 0.000000 +1.17 0.000000 0.000000 +1.18 0.000000 0.000000 +1.19 0.000000 0.000000 +1.20 0.000000 0.000000 +1.21 0.000000 0.000000 +1.22 0.000000 0.000000 +1.23 0.000000 0.000000 +1.24 0.000000 0.000000 +1.25 0.000000 0.000000 +1.26 0.000000 0.000000 +1.27 0.000000 0.000000 +1.28 0.000000 0.000000 +1.29 0.000000 0.000000 +1.30 0.000000 0.000000 +1.31 0.000000 0.000000 +1.32 0.000000 0.000000 +1.33 0.000000 0.000000 +1.34 0.000000 0.000000 +1.35 0.000000 0.000000 +1.36 0.000000 0.000000 +1.37 0.000000 0.000000 +1.38 0.000000 0.000000 +1.39 0.000000 0.000000 +1.40 0.000000 0.000000 +1.41 0.000000 0.000000 +1.42 0.000000 0.000000 +1.43 0.000000 0.000000 +1.44 0.000000 0.000000 +1.45 0.000000 0.000000 +1.46 0.000000 0.000000 +1.47 0.000000 0.000000 +1.48 0.000000 0.000000 +1.49 0.000000 0.000000 +1.50 0.000000 0.000000 +1.51 0.000000 0.000000 +1.52 0.000000 0.000000 +1.53 0.000000 0.000000 +1.54 0.000000 0.000000 +1.55 0.000000 0.000000 +1.56 0.000000 0.000000 +1.57 0.000000 0.000000 +1.58 0.000000 0.000000 +1.59 0.000000 0.000000 +1.60 0.000000 0.000000 +1.61 0.000000 0.000000 +1.62 0.000000 0.000000 +1.63 0.000000 0.000000 +1.64 0.000000 0.000000 +1.65 0.000000 0.000000 +1.66 0.000000 0.000000 +1.67 0.000000 0.000000 +1.68 0.000000 0.000000 +1.69 0.000000 0.000000 +1.70 0.000000 0.000000 +1.71 0.000000 0.000000 +1.72 0.000000 0.000000 +1.73 0.000000 0.000000 +1.74 0.000000 0.000000 +1.75 0.000000 0.000000 +1.76 0.000000 0.000000 +1.77 0.000000 0.000000 +1.78 0.000000 0.000000 +1.79 0.000000 0.000000 +1.80 0.000000 0.000000 +1.81 0.000000 0.000000 +1.82 0.000000 0.000000 +1.83 0.000000 0.000000 +1.84 0.000000 0.000000 +1.85 0.000000 0.000000 +1.86 0.000000 0.000000 +1.87 0.000000 0.000000 +1.88 0.000000 0.000000 +1.89 0.000000 0.000000 +1.90 0.000000 0.000000 +1.91 0.000000 0.000000 +1.92 0.000000 0.000000 +1.93 0.000000 0.000000 +1.94 0.000000 0.000000 +1.95 0.000000 0.000000 +1.96 0.000000 0.000000 +1.97 0.000000 0.000000 +1.98 0.000000 0.000000 +1.99 0.000000 0.000000 +2.00 0.000000 0.000000 +2.01 0.000000 0.000000 +2.02 0.000000 0.000000 +2.03 0.000000 0.000000 +2.04 0.000000 0.000000 +2.05 0.000000 0.000000 +2.06 0.000000 0.000000 +2.07 0.000000 0.000000 +2.08 0.000000 0.000000 +2.09 0.000000 0.000000 +2.10 0.000000 0.000000 +2.11 0.000000 0.000000 +2.12 0.000000 0.000000 +2.13 0.000000 0.000000 +2.14 0.000000 0.000000 +2.15 0.000000 0.000000 +2.16 0.000000 0.000000 +2.17 0.000000 0.000000 +2.18 0.000000 0.000000 +2.19 0.000000 0.000000 +2.20 0.000000 0.000000 +2.21 0.000000 0.000000 +2.22 0.000000 0.000000 +2.23 0.000000 0.000000 +2.24 0.000000 0.000000 +2.25 0.000000 0.000000 +2.26 0.000000 0.000000 +2.27 0.000000 0.000000 +2.28 0.000000 0.000000 +2.29 0.000000 0.000000 +2.30 0.000000 0.000000 +2.31 0.000000 0.000000 +2.32 0.000000 0.000000 +2.33 0.000000 0.000000 +2.34 0.000000 0.000000 +2.35 0.000000 0.000000 +2.36 0.000000 0.000000 +2.37 0.000000 0.000000 +2.38 0.000000 0.000000 +2.39 0.000000 0.000000 +2.40 0.000000 0.000000 +2.41 0.000000 0.000000 +2.42 0.000000 0.000000 +2.43 0.000000 0.000000 +2.44 0.000000 0.000000 +2.45 0.000000 0.000000 +2.46 0.000000 0.000000 +2.47 0.000000 0.000000 +2.48 0.000000 0.000000 +2.49 0.000000 0.000000 diff --git a/ZShooter_v2/dichroics/TER_dichroic_h-k.dat b/ZShooter_v2/dichroics/TER_dichroic_h-k.dat new file mode 100644 index 00000000..d75a5eee --- /dev/null +++ b/ZShooter_v2/dichroics/TER_dichroic_h-k.dat @@ -0,0 +1,229 @@ +# name : third_layer_dichroic_HK +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : 2026-03-16T21:02:23.221 +# comment : Transmits K, reflects H +# wavelength_unit : um +# changes : +# +wavelength transmission reflection +0.30 0.000000 0.000000 +0.31 0.000000 0.000000 +0.32 0.000000 0.000000 +0.33 0.000000 0.000000 +0.34 0.000000 0.000000 +0.35 0.000000 0.000000 +0.36 0.000000 0.000000 +0.37 0.000000 0.000000 +0.38 0.000000 0.000000 +0.39 0.000000 0.000000 +0.40 0.000000 0.000000 +0.41 0.000000 0.000000 +0.42 0.000000 0.000000 +0.43 0.000000 0.000000 +0.44 0.000000 0.000000 +0.45 0.000000 0.000000 +0.46 0.000000 0.000000 +0.47 0.000000 0.000000 +0.48 0.000000 0.000000 +0.49 0.000000 0.000000 +0.50 0.000000 0.000000 +0.51 0.000000 0.000000 +0.52 0.000000 0.000000 +0.53 0.000000 0.000000 +0.54 0.000000 0.000000 +0.55 0.000000 0.000000 +0.56 0.000000 0.000000 +0.57 0.000000 0.000000 +0.58 0.000000 0.000000 +0.59 0.000000 0.000000 +0.60 0.000000 0.000000 +0.61 0.000000 0.000000 +0.62 0.000000 0.000000 +0.63 0.000000 0.000000 +0.64 0.000000 0.000000 +0.65 0.000000 0.000000 +0.66 0.000000 0.000000 +0.67 0.000000 0.000000 +0.68 0.000000 0.000000 +0.69 0.000000 0.000000 +0.70 0.000000 0.000000 +0.71 0.000000 0.000000 +0.72 0.000000 0.000000 +0.73 0.000000 0.000000 +0.74 0.000000 0.000000 +0.75 0.000000 0.000000 +0.76 0.000000 0.000000 +0.77 0.000000 0.000000 +0.78 0.000000 0.000000 +0.79 0.000000 0.000000 +0.80 0.000000 0.000000 +0.81 0.000000 0.000000 +0.82 0.000000 0.000000 +0.83 0.000000 0.000000 +0.84 0.000000 0.000000 +0.85 0.000000 0.000000 +0.86 0.000000 0.000000 +0.87 0.000000 0.000000 +0.88 0.000000 0.000000 +0.89 0.000000 0.000000 +0.90 0.000000 0.000000 +0.91 0.000000 0.000000 +0.92 0.000000 0.000000 +0.93 0.000000 0.000000 +0.94 0.000000 0.000000 +0.95 0.000000 0.000000 +0.96 0.000000 0.000000 +0.97 0.000000 0.000000 +0.98 0.000000 0.000000 +0.99 0.000000 0.000000 +1.00 0.000000 0.000000 +1.01 0.000000 0.000000 +1.02 0.000000 0.000000 +1.03 0.000000 0.000000 +1.04 0.000000 0.000000 +1.05 0.000000 0.000000 +1.06 0.000000 0.000000 +1.07 0.000000 0.000000 +1.08 0.000000 0.000000 +1.09 0.000000 0.000000 +1.10 0.000000 0.000000 +1.11 0.000000 0.000000 +1.12 0.000000 0.000000 +1.13 0.000000 0.000000 +1.14 0.000000 0.000000 +1.15 0.000000 0.000000 +1.16 0.000000 0.000000 +1.17 0.000000 0.000000 +1.18 0.000000 0.000000 +1.19 0.000000 0.000000 +1.20 0.000000 0.000000 +1.21 0.000000 0.000000 +1.22 0.000000 0.000000 +1.23 0.000000 0.000000 +1.24 0.000000 0.000000 +1.25 0.000000 0.000000 +1.26 0.000000 0.000000 +1.27 0.000000 0.000000 +1.28 0.000000 0.000000 +1.29 0.000000 0.000000 +1.30 0.000000 0.000000 +1.31 0.000000 0.000000 +1.32 0.000000 0.000000 +1.33 0.000000 0.000000 +1.34 0.000000 0.000008 +1.35 0.000000 0.000204 +1.36 0.000000 0.002972 +1.37 0.000000 0.024545 +1.38 0.000000 0.117824 +1.39 0.000000 0.342132 +1.40 0.000000 0.642564 +1.41 0.000000 0.866814 +1.42 0.000000 0.960047 +1.43 0.000000 0.981602 +1.44 0.000000 0.984368 +1.45 0.000000 0.984564 +1.46 0.000000 0.984572 +1.47 0.000000 0.984572 +1.48 0.000000 0.984572 +1.49 0.000000 0.984572 +1.50 0.000000 0.984572 +1.51 0.000000 0.984572 +1.52 0.000000 0.984572 +1.53 0.000000 0.984572 +1.54 0.000000 0.984572 +1.55 0.000000 0.984572 +1.56 0.000000 0.984572 +1.57 0.000000 0.984572 +1.58 0.000000 0.984572 +1.59 0.000000 0.984572 +1.60 0.000000 0.984572 +1.61 0.000000 0.984572 +1.62 0.000000 0.984572 +1.63 0.000000 0.984572 +1.64 0.000000 0.984572 +1.65 0.000000 0.984572 +1.66 0.000000 0.984572 +1.67 0.000000 0.984572 +1.68 0.000000 0.984572 +1.69 0.000000 0.984572 +1.70 0.000000 0.984572 +1.71 0.000000 0.984572 +1.72 0.000000 0.984572 +1.73 0.000000 0.984572 +1.74 0.000000 0.984572 +1.75 0.000000 0.984572 +1.76 0.000000 0.984572 +1.77 0.000000 0.984572 +1.78 0.000000 0.984572 +1.79 0.000000 0.984572 +1.80 0.000000 0.984572 +1.81 0.000000 0.984572 +1.82 0.000001 0.984571 +1.83 0.000040 0.984532 +1.84 0.000791 0.983781 +1.85 0.008751 0.975821 +1.86 0.055540 0.929031 +1.87 0.208295 0.776276 +1.88 0.485849 0.498723 +1.89 0.766818 0.217754 +1.90 0.925281 0.059291 +1.91 0.975018 0.009554 +1.92 0.983688 0.000883 +1.93 0.984526 0.000046 +1.94 0.984570 0.000001 +1.95 0.984572 0.000000 +1.96 0.984572 0.000000 +1.97 0.984572 0.000000 +1.98 0.984572 0.000000 +1.99 0.984572 0.000000 +2.00 0.984572 0.000000 +2.01 0.984572 0.000000 +2.02 0.984572 0.000000 +2.03 0.984572 0.000000 +2.04 0.984572 0.000000 +2.05 0.984572 0.000000 +2.06 0.984572 0.000000 +2.07 0.984572 0.000000 +2.08 0.984572 0.000000 +2.09 0.984572 0.000000 +2.10 0.984572 0.000000 +2.11 0.984572 0.000000 +2.12 0.984572 0.000000 +2.13 0.984572 0.000000 +2.14 0.984572 0.000000 +2.15 0.984572 0.000000 +2.16 0.984572 0.000000 +2.17 0.984572 0.000000 +2.18 0.984572 0.000000 +2.19 0.984572 0.000000 +2.20 0.984572 0.000000 +2.21 0.984572 0.000000 +2.22 0.984572 0.000000 +2.23 0.984572 0.000000 +2.24 0.984572 0.000000 +2.25 0.984572 0.000000 +2.26 0.984572 0.000000 +2.27 0.984572 0.000000 +2.28 0.984572 0.000000 +2.29 0.984572 0.000000 +2.30 0.984572 0.000000 +2.31 0.984572 0.000000 +2.32 0.984572 0.000000 +2.33 0.984572 0.000000 +2.34 0.984572 0.000000 +2.35 0.984572 0.000000 +2.36 0.984572 0.000000 +2.37 0.984572 0.000000 +2.38 0.984572 0.000000 +2.39 0.984572 0.000000 +2.40 0.984572 0.000000 +2.41 0.984572 0.000000 +2.42 0.984572 0.000000 +2.43 0.984572 0.000000 +2.44 0.984572 0.000000 +2.45 0.984572 0.000000 +2.46 0.984572 0.000000 +2.47 0.984571 0.000000 +2.48 0.984535 0.000000 +2.49 0.983844 0.000000 diff --git a/ZShooter_v2/dichroics/TER_dichroic_yj-hk.dat b/ZShooter_v2/dichroics/TER_dichroic_yj-hk.dat new file mode 100644 index 00000000..4665f112 --- /dev/null +++ b/ZShooter_v2/dichroics/TER_dichroic_yj-hk.dat @@ -0,0 +1,229 @@ +# name : second_layer_dichroic_NIR +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : 2026-03-16T21:02:23.182 +# comment : Transmits HK, reflects YJ +# wavelength_unit : um +# changes : +# +wavelength transmission reflection +0.30 0.000000 0.000000 +0.31 0.000000 0.000000 +0.32 0.000000 0.000000 +0.33 0.000000 0.000000 +0.34 0.000000 0.000000 +0.35 0.000000 0.000000 +0.36 0.000000 0.000000 +0.37 0.000000 0.000000 +0.38 0.000000 0.000000 +0.39 0.000000 0.000000 +0.40 0.000000 0.000000 +0.41 0.000000 0.000000 +0.42 0.000000 0.000000 +0.43 0.000000 0.000000 +0.44 0.000000 0.000000 +0.45 0.000000 0.000000 +0.46 0.000000 0.000000 +0.47 0.000000 0.000000 +0.48 0.000000 0.000000 +0.49 0.000000 0.000000 +0.50 0.000000 0.000000 +0.51 0.000000 0.000000 +0.52 0.000000 0.000000 +0.53 0.000000 0.000000 +0.54 0.000000 0.000000 +0.55 0.000000 0.000000 +0.56 0.000000 0.000000 +0.57 0.000000 0.000000 +0.58 0.000000 0.000000 +0.59 0.000000 0.000000 +0.60 0.000000 0.000000 +0.61 0.000000 0.000000 +0.62 0.000000 0.000000 +0.63 0.000000 0.000000 +0.64 0.000000 0.000000 +0.65 0.000000 0.000000 +0.66 0.000000 0.000000 +0.67 0.000000 0.000000 +0.68 0.000000 0.000000 +0.69 0.000000 0.000000 +0.70 0.000000 0.000000 +0.71 0.000000 0.000000 +0.72 0.000000 0.000000 +0.73 0.000000 0.000000 +0.74 0.000000 0.000000 +0.75 0.000000 0.000000 +0.76 0.000000 0.000000 +0.77 0.000000 0.000000 +0.78 0.000000 0.000000 +0.79 0.000000 0.000000 +0.80 0.000000 0.000000 +0.81 0.000000 0.000000 +0.82 0.000000 0.000000 +0.83 0.000000 0.000000 +0.84 0.000000 0.000000 +0.85 0.000000 0.000000 +0.86 0.000000 0.000000 +0.87 0.000000 0.000000 +0.88 0.000000 0.000000 +0.89 0.000000 0.000000 +0.90 0.000000 0.000001 +0.91 0.000000 0.000046 +0.92 0.000000 0.000879 +0.93 0.000000 0.009520 +0.94 0.000000 0.059135 +0.95 0.000000 0.217360 +0.96 0.000000 0.498187 +0.97 0.000000 0.775882 +0.98 0.000000 0.928875 +0.99 0.000000 0.975787 +1.00 0.000000 0.983777 +1.01 0.000000 0.984531 +1.02 0.000000 0.984571 +1.03 0.000000 0.984572 +1.04 0.000000 0.984572 +1.05 0.000000 0.984572 +1.06 0.000000 0.984572 +1.07 0.000000 0.984572 +1.08 0.000000 0.984572 +1.09 0.000000 0.984572 +1.10 0.000000 0.984572 +1.11 0.000000 0.984572 +1.12 0.000000 0.984572 +1.13 0.000000 0.984572 +1.14 0.000000 0.984572 +1.15 0.000000 0.984572 +1.16 0.000000 0.984572 +1.17 0.000000 0.984572 +1.18 0.000000 0.984572 +1.19 0.000000 0.984572 +1.20 0.000000 0.984572 +1.21 0.000000 0.984572 +1.22 0.000000 0.984572 +1.23 0.000000 0.984572 +1.24 0.000000 0.984572 +1.25 0.000000 0.984572 +1.26 0.000000 0.984572 +1.27 0.000000 0.984572 +1.28 0.000000 0.984572 +1.29 0.000000 0.984572 +1.30 0.000000 0.984572 +1.31 0.000000 0.984572 +1.32 0.000000 0.984572 +1.33 0.000003 0.984569 +1.34 0.000082 0.984490 +1.35 0.001415 0.983157 +1.36 0.013819 0.970753 +1.37 0.077792 0.906780 +1.38 0.261165 0.723407 +1.39 0.553824 0.430748 +1.40 0.814109 0.170463 +1.41 0.943083 0.041488 +1.42 0.978644 0.005928 +1.43 0.984088 0.000484 +1.44 0.984550 0.000022 +1.45 0.984571 0.000001 +1.46 0.984572 0.000000 +1.47 0.984572 0.000000 +1.48 0.984572 0.000000 +1.49 0.984572 0.000000 +1.50 0.984572 0.000000 +1.51 0.984572 0.000000 +1.52 0.984572 0.000000 +1.53 0.984572 0.000000 +1.54 0.984572 0.000000 +1.55 0.984572 0.000000 +1.56 0.984572 0.000000 +1.57 0.984572 0.000000 +1.58 0.984572 0.000000 +1.59 0.984572 0.000000 +1.60 0.984572 0.000000 +1.61 0.984572 0.000000 +1.62 0.984572 0.000000 +1.63 0.984572 0.000000 +1.64 0.984572 0.000000 +1.65 0.984572 0.000000 +1.66 0.984572 0.000000 +1.67 0.984572 0.000000 +1.68 0.984572 0.000000 +1.69 0.984572 0.000000 +1.70 0.984572 0.000000 +1.71 0.984572 0.000000 +1.72 0.984572 0.000000 +1.73 0.984572 0.000000 +1.74 0.984572 0.000000 +1.75 0.984572 0.000000 +1.76 0.984572 0.000000 +1.77 0.984572 0.000000 +1.78 0.984572 0.000000 +1.79 0.984572 0.000000 +1.80 0.984572 0.000000 +1.81 0.984572 0.000000 +1.82 0.984572 0.000000 +1.83 0.984572 0.000000 +1.84 0.984572 0.000000 +1.85 0.984572 0.000000 +1.86 0.984572 0.000000 +1.87 0.984572 0.000000 +1.88 0.984572 0.000000 +1.89 0.984572 0.000000 +1.90 0.984572 0.000000 +1.91 0.984572 0.000000 +1.92 0.984572 0.000000 +1.93 0.984572 0.000000 +1.94 0.984572 0.000000 +1.95 0.984572 0.000000 +1.96 0.984572 0.000000 +1.97 0.984572 0.000000 +1.98 0.984572 0.000000 +1.99 0.984572 0.000000 +2.00 0.984572 0.000000 +2.01 0.984572 0.000000 +2.02 0.984572 0.000000 +2.03 0.984572 0.000000 +2.04 0.984572 0.000000 +2.05 0.984572 0.000000 +2.06 0.984572 0.000000 +2.07 0.984572 0.000000 +2.08 0.984572 0.000000 +2.09 0.984572 0.000000 +2.10 0.984572 0.000000 +2.11 0.984572 0.000000 +2.12 0.984572 0.000000 +2.13 0.984572 0.000000 +2.14 0.984572 0.000000 +2.15 0.984572 0.000000 +2.16 0.984572 0.000000 +2.17 0.984572 0.000000 +2.18 0.984572 0.000000 +2.19 0.984572 0.000000 +2.20 0.984572 0.000000 +2.21 0.984572 0.000000 +2.22 0.984572 0.000000 +2.23 0.984572 0.000000 +2.24 0.984572 0.000000 +2.25 0.984572 0.000000 +2.26 0.984572 0.000000 +2.27 0.984572 0.000000 +2.28 0.984572 0.000000 +2.29 0.984572 0.000000 +2.30 0.984572 0.000000 +2.31 0.984572 0.000000 +2.32 0.984572 0.000000 +2.33 0.984572 0.000000 +2.34 0.984572 0.000000 +2.35 0.984572 0.000000 +2.36 0.984572 0.000000 +2.37 0.984572 0.000000 +2.38 0.984572 0.000000 +2.39 0.984572 0.000000 +2.40 0.984572 0.000000 +2.41 0.984572 0.000000 +2.42 0.984572 0.000000 +2.43 0.984572 0.000000 +2.44 0.984572 0.000000 +2.45 0.984572 0.000000 +2.46 0.984572 0.000000 +2.47 0.984571 0.000000 +2.48 0.984535 0.000000 +2.49 0.983844 0.000000 diff --git a/ZShooter_v2/dichroics/dichroic_tree.dat b/ZShooter_v2/dichroics/dichroic_tree.dat new file mode 100644 index 00000000..23468d3b --- /dev/null +++ b/ZShooter_v2/dichroics/dichroic_tree.dat @@ -0,0 +1,11 @@ +# name : ZShooter_v2 dichroic tree +# author : Y. Sharma +# date_created : 2025-09-24 +# description : Image plane ID mapping 0->b, 1->g, 2->r, 3->yj, 4->h, 5->k +aperture_id bgr-yjhk b-gr yj-hk g-r h-k +0 R R X X X +1 R T X R X +2 R T X T X +3 T X R X X +4 T X T X R +5 T X T X T \ No newline at end of file diff --git a/ZShooter_v2/dichroics/make_dichroics.py b/ZShooter_v2/dichroics/make_dichroics.py new file mode 100644 index 00000000..bdba8d87 --- /dev/null +++ b/ZShooter_v2/dichroics/make_dichroics.py @@ -0,0 +1,176 @@ +import numpy as np +import astropy.units as u +from astropy.time import Time +from scipy.stats import norm +from scipy.signal import convolve +import yaml +import os +from synphot import (ThermalSpectralElement, Empirical1D) + +def make_dichroic( + domain: tuple[float | u.Quantity, float | u.Quantity], + transmission: float, + reflection: float, + min: float | u.Quantity, + max: float | u.Quantity, + fold: float | u.Quantity, + transition_width: float | u.Quantity = 30, + temperature: float | u.Quantity = 0) -> tuple[ThermalSpectralElement, ThermalSpectralElement]: + """ + Return a matched pait of dichroic efficiency curves. + Args: + domain: + min: + max: + fold: + transmission: + reflection: + transition_width: + + Returns: (ThermalSpectralElement, ThermalSpectralElement) + + """ + domain = u.Quantity(domain) + full_x = np.linspace(np.floor(domain.min()), + np.ceil(domain.max()), + num=int(np.ceil(np.diff(domain)).value)) + full_yt = np.zeros(full_x.size) + full_yr = np.zeros_like(full_yt) + in_trans = (full_x >= fold) + in_refl = (~in_trans) + full_yt[in_trans & (full_x <= max)] = transmission + full_yr[in_refl & (full_x >= min)] = reflection + + if not isinstance(transition_width, u.Quantity): + transition_width = transition_width * domain.unit + transition_sigma = transition_width / 2 / np.sqrt(2 * np.log(2)) + ker_f = norm(loc=0, scale=transition_sigma.value).pdf + kx = np.arange(0, 10 * transition_width.value, (full_x[1] - full_x[0]).value) + kx = np.concatenate([-kx[1:][::-1], kx]) + ker = ker_f(kx) + + # ker = ker_f(np.linspace(-10*transition_width, 10 * transition_width, num=n)) + smoothedt = convolve(full_yt, ker, mode='same') + smoothedr = convolve(full_yr, ker, mode='same') + + return (ThermalSpectralElement(Empirical1D, points=full_x, lookup_table=smoothedr, fill_value=0, method='linear', + bounds_error=False, temperature=temperature), + ThermalSpectralElement(Empirical1D, points=full_x, lookup_table=smoothedt, fill_value=0, method='linear', + bounds_error=False, temperature=temperature)) + + +def make_zshooter_dichroics(channel_ranges:dict[str, tuple[float, float]], valid_domain: tuple[float, float], + transmission: float, reflection: float, range_pad: float): + data = {'I': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['U'].min() - range_pad, channel_ranges['K'].max() + range_pad, + 0.5 * (channel_ranges['Y'].min() + channel_ranges['I'].max())), + 'U': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['U'].min() - range_pad, channel_ranges['I'].max() + range_pad, + 0.5 * (channel_ranges['B'].min() + channel_ranges['U'].max())), + 'G': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['B'].min() - range_pad, channel_ranges['I'].max() + range_pad, + 0.5 * (channel_ranges['R'].min() + channel_ranges['G'].max())), + 'B': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['B'].min() - range_pad, channel_ranges['G'].max() + range_pad, + 0.5 * (channel_ranges['G'].min() + channel_ranges['B'].max())), + 'R': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['R'].min() - range_pad, channel_ranges['I'].max() + range_pad, + 0.5 * (channel_ranges['I'].min() + channel_ranges['R'].max())), + 'H': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['H'].min() - range_pad, channel_ranges['K'].max() + range_pad, + 0.5 * (channel_ranges['K'].min() + channel_ranges['H'].max())), + } + if 'J' in channel_ranges: + data.update({ + 'Y': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['Y'].min() - range_pad, channel_ranges['J'].max() + range_pad, + 0.5 * (channel_ranges['J'].min() + channel_ranges['Y'].max())), + 'J': make_dichroic(valid_domain, transmission, reflection, + channel_ranges['Y'].min() - range_pad, channel_ranges['K'].max() + range_pad, + 0.5 * (channel_ranges['H'].min() + channel_ranges['J'].max())) + }) + else: + data['J']=make_dichroic(valid_domain, transmission, reflection, + channel_ranges['Y'].min() - range_pad, channel_ranges['K'].max() + range_pad, + 0.5 * (channel_ranges['H'].min() + channel_ranges['Y'].max())) + return data + +def write_dichroic_curves(filename, tx_model, rx_model, header=None): + wave = np.arange(3000, 25000, 100) + with open(filename, 'w') as f: + if header is not None: + f.write(header + '\n') + f.write('wavelength transmission reflection\n') + for x in wave: + f.write(f'{(x*u.AA).to(u.um).value:.2f} {tx_model(x):.6f} {rx_model(x):.6f}\n') + +DICHROIC_PAD = 30 * u.nm +DICHROIC_TRANS = 0.985 +DICHROIC_REFL = 0.985 +DICHROIC_DOMAIN = (250, 2550) * u.nm + +# get path of this script, and use it to find the yaml config file in the same directory +channels_yaml_path = os.path.join(os.path.dirname(__file__), 'zshooter_channels.yaml') +zshooter_cfg = yaml.safe_load(open(channels_yaml_path, 'r'))['zshooter_channels'] + +channel_range = {} +for c, cfg in zshooter_cfg.items(): + crange = cfg['dispersion']['range'] * u.nm + channel_range[c] = crange + +dichroics = make_zshooter_dichroics(channel_range, DICHROIC_DOMAIN, DICHROIC_TRANS, DICHROIC_REFL, DICHROIC_PAD) + +## First dichroic: I, splits BGR from YJHK +hdr_i = f"""# name : first_dichroic +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : {Time.now().isot} +# comment : Transmits NIR, reflects UBVIS +# wavelength_unit : um +# changes : +#""" +write_dichroic_curves('TER_dichroic_bgr-yjhk.dat', dichroics['I'][1]._model, dichroics['I'][0]._model, header=hdr_i) + +## Second layer dichroic in BGR arm: U, splits UB from GR +hdr_u = f"""# name : second_layer_dichroic_UBVIS +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : {Time.now().isot} +# comment : Transmits GR (VIS) reflects UB +# wavelength_unit : um +# changes : +#""" +write_dichroic_curves('TER_dichroic_b-gr.dat', dichroics['U'][1]._model, dichroics['U'][0]._model, header=hdr_u) + +## Second layer dichroic in YJHK arm: J, splits YJ from HK +hdr_j = f"""# name : second_layer_dichroic_NIR +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : {Time.now().isot} +# comment : Transmits HK, reflects YJ +# wavelength_unit : um +# changes : +#""" +write_dichroic_curves('TER_dichroic_yj-hk.dat', dichroics['J'][1]._model, dichroics['J'][0]._model, header=hdr_j) + +## Third layer dichroic in GR arm: G, splits G from R +hdr_g = f"""# name : third_layer_dichroic_VIS +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : {Time.now().isot} +# comment : Transmits R, reflects G +# wavelength_unit : um +# changes : +#""" +write_dichroic_curves('TER_dichroic_g-r.dat', dichroics['G'][1]._model, dichroics['G'][0]._model, header=hdr_g) + +## Third layer dichroic in HK arm: H, splits H from K +hdr_h = f"""# name : third_layer_dichroic_HK +# author : unknown +# date_created : 2026-03-16T12:00:00 +# date_modified : {Time.now().isot} +# comment : Transmits K, reflects H +# wavelength_unit : um +# changes : +#""" +write_dichroic_curves('TER_dichroic_h-k.dat', dichroics['H'][1]._model, dichroics['H'][0]._model, header=hdr_h) \ No newline at end of file diff --git a/ZShooter_v2/dichroics/zshooter_channels.yaml b/ZShooter_v2/dichroics/zshooter_channels.yaml new file mode 100644 index 00000000..3f86f8a0 --- /dev/null +++ b/ZShooter_v2/dichroics/zshooter_channels.yaml @@ -0,0 +1,202 @@ +zshooter_channels: + U: + dispersion: # range: [#, #] or linear: # & center #: or R: # & center: # + range: [310, 400] + sampling: 2.4 + design_R: 10000 + ruling: 2789 + fov: 18 + fl: 325 + optics: + dichroics: + - i_reflection + - u_reflection + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: qccd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + B: + dispersion: # range or linear & center or R & center + range: [395, 505] + sampling: 2.4 + design_R: 10000 + ruling: 2200 + fov: 18 + fl: 325 + optics: + dichroics: + - i_reflection + - u_transmission + - g_reflection + - b_reflection + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: qccd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + G: + dispersion: # range or linear & center or R & center + range: [495, 635] + sampling: 2.4 + design_R: 10000 + ruling: 1753 + fov: 18 + fl: 325 + optics: + dichroics: + - i_reflection + - u_transmission + - g_reflection + - b_transmission + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: qccd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + R: + dispersion: # range or linear & center or R & center + range: [625, 800] + sampling: 2.4 + design_R: 10000 + ruling: 1390 + fov: 18 + fl: 325 + optics: + dichroics: + - i_reflection + - u_transmission + - g_transmission + - r_reflection + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: qccd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + I: + dispersion: # range or linear & center or R & center + range: [785, 1000] + sampling: 2.4 + design_R: 10000 + ruling: 1109 + fov: 18 + fl: 325 + optics: + dichroics: + - i_reflection + - u_transmission + - g_transmission + - r_transmission + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: qccddd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + Y: + dispersion: # range or linear & center or R & center + range: [990, 1185] + sampling: 2.4 + design_R: 10000 + ruling: 885 #911 + fov: 12 + fl: 325 + optics: + dichroics: + - i_transmission + - j_reflection + - y_reflection + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: apd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + J: + dispersion: # range or linear & center or R & center + range: [1165, 1350] + sampling: 2.4 + design_R: 10000 + ruling: 765 #772 + fov: 12 + fl: 325 + optics: + dichroics: + - i_transmission + - j_reflection + - y_transmission + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: apd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + H: + dispersion: # range or linear & center or R & center + range: [1425, 1810] + sampling: 2.4 + design_R: 7140 #10000 + ruling: 425 #600 + fov: 12 + fl: 325 + optics: + dichroics: + - i_transmission + - j_transmission + - h_reflection + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: apd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 + K: + dispersion: # range or linear & center or R & center + range: [1950, 2500] #315] #500] + sampling: 2.4 + design_R: 10000 + ruling: 432 #445 + fov: 12 + fl: 325 + optics: + dichroics: + - i_transmission + - j_transmission + - h_transmission + grating: + peak: .93 + temperature: 70 + camera: + throughput: .93 + temperature: 60 + detector: apd + platescale_umas: 148.2 # u.micron / u.arcsec + pupil: 110 \ No newline at end of file diff --git a/ZShooter_v2/slits/nir_half_arcsec.dat b/ZShooter_v2/slits/nir_half_arcsec.dat new file mode 100644 index 00000000..4834c239 --- /dev/null +++ b/ZShooter_v2/slits/nir_half_arcsec.dat @@ -0,0 +1,13 @@ +# description : Slit mask for 0.5 arcsec slit in NIR channel of ZShooter +# author : Y. Sharma +# date_created : 2026-02-04 +# date_modified : 2026-02-04 +# type : aperture:slit_geometry +# x_unit : arcsec +# y_unit : arcsec +# changes : +x y +-5.0 -0.25 +5.0 -0.25 +5.0 0.25 +-5.0 0.25 \ No newline at end of file diff --git a/ZShooter_v2/slits/nir_one_arcsec.dat b/ZShooter_v2/slits/nir_one_arcsec.dat new file mode 100644 index 00000000..761feb78 --- /dev/null +++ b/ZShooter_v2/slits/nir_one_arcsec.dat @@ -0,0 +1,13 @@ +# description : Slit mask for 1.0 arcsec slit in NIR channel of ZShooter +# author : Y. Sharma +# date_created : 2026-02-04 +# date_modified : 2026-02-04 +# type : aperture:slit_geometry +# x_unit : arcsec +# y_unit : arcsec +# changes : +x y +-5.0 -0.50 +5.0 -0.50 +5.0 0.50 +-5.0 0.50 \ No newline at end of file diff --git a/ZShooter_v2/slits/nir_two_arcsec.dat b/ZShooter_v2/slits/nir_two_arcsec.dat new file mode 100644 index 00000000..2b2d0019 --- /dev/null +++ b/ZShooter_v2/slits/nir_two_arcsec.dat @@ -0,0 +1,13 @@ +# description : Slit mask for 2.0 arcsec slit in NIR channel of ZShooter +# author : Y. Sharma +# date_created : 2026-02-04 +# date_modified : 2026-02-04 +# type : aperture:slit_geometry +# x_unit : arcsec +# y_unit : arcsec +# changes : +x y +-5.0 -1.0 +5.0 -1.0 +5.0 1.0 +-5.0 1.0 \ No newline at end of file diff --git a/ZShooter_v2/slits/ubvis_half_arcsec.dat b/ZShooter_v2/slits/ubvis_half_arcsec.dat new file mode 100644 index 00000000..a72895e9 --- /dev/null +++ b/ZShooter_v2/slits/ubvis_half_arcsec.dat @@ -0,0 +1,13 @@ +# description : Slit mask for 0.5 arcsec slit in UBVIS channel of ZShooter +# author : Y. Sharma +# date_created : 2026-02-04 +# date_modified : 2026-02-04 +# type : aperture:slit_geometry +# x_unit : arcsec +# y_unit : arcsec +# changes : +x y +-5.0 -0.25 +5.0 -0.25 +5.0 0.25 +-5.0 0.25 \ No newline at end of file diff --git a/ZShooter_v2/slits/ubvis_one_arcsec.dat b/ZShooter_v2/slits/ubvis_one_arcsec.dat new file mode 100644 index 00000000..b09fbd9d --- /dev/null +++ b/ZShooter_v2/slits/ubvis_one_arcsec.dat @@ -0,0 +1,13 @@ +# description : Slit mask for 1.0 arcsec slit in UBVIS channel of ZShooter +# author : Y. Sharma +# date_created : 2026-02-04 +# date_modified : 2026-02-04 +# type : aperture:slit_geometry +# x_unit : arcsec +# y_unit : arcsec +# changes : +x y +-5.0 -0.50 +5.0 -0.50 +5.0 0.50 +-5.0 0.50 \ No newline at end of file diff --git a/ZShooter_v2/slits/ubvis_two_arcsec.dat b/ZShooter_v2/slits/ubvis_two_arcsec.dat new file mode 100644 index 00000000..2996b3d4 --- /dev/null +++ b/ZShooter_v2/slits/ubvis_two_arcsec.dat @@ -0,0 +1,13 @@ +# description : Slit mask for 2.0 arcsec slit in UBVIS channel of ZShooter +# author : Y. Sharma +# date_created : 2026-02-04 +# date_modified : 2026-02-04 +# type : aperture:slit_geometry +# x_unit : arcsec +# y_unit : arcsec +# changes : +x y +-5.0 -1.0 +5.0 -1.0 +5.0 1.0 +-5.0 1.0 \ No newline at end of file diff --git a/ZShooter_v2/traces/Echellogram_CH(B)_R17K.png b/ZShooter_v2/traces/Echellogram_CH(B)_R17K.png new file mode 100644 index 00000000..62f49a65 Binary files /dev/null and b/ZShooter_v2/traces/Echellogram_CH(B)_R17K.png differ diff --git a/ZShooter_v2/traces/Echellogram_CH(G)_R17K.png b/ZShooter_v2/traces/Echellogram_CH(G)_R17K.png new file mode 100644 index 00000000..616088b7 Binary files /dev/null and b/ZShooter_v2/traces/Echellogram_CH(G)_R17K.png differ diff --git a/ZShooter_v2/traces/Echellogram_CH(H)_R17K.png b/ZShooter_v2/traces/Echellogram_CH(H)_R17K.png new file mode 100644 index 00000000..fccf36a1 Binary files /dev/null and b/ZShooter_v2/traces/Echellogram_CH(H)_R17K.png differ diff --git a/ZShooter_v2/traces/Echellogram_CH(K)_R17K.png b/ZShooter_v2/traces/Echellogram_CH(K)_R17K.png new file mode 100644 index 00000000..3beab742 Binary files /dev/null and b/ZShooter_v2/traces/Echellogram_CH(K)_R17K.png differ diff --git a/ZShooter_v2/traces/Echellogram_CH(R)_R17K.png b/ZShooter_v2/traces/Echellogram_CH(R)_R17K.png new file mode 100644 index 00000000..51cdc983 Binary files /dev/null and b/ZShooter_v2/traces/Echellogram_CH(R)_R17K.png differ diff --git a/ZShooter_v2/traces/Echellogram_CH(YJ)_R17K.png b/ZShooter_v2/traces/Echellogram_CH(YJ)_R17K.png new file mode 100644 index 00000000..b01ca64d Binary files /dev/null and b/ZShooter_v2/traces/Echellogram_CH(YJ)_R17K.png differ diff --git a/ZShooter_v2/traces/create_tracefits_from_txts.py b/ZShooter_v2/traces/create_tracefits_from_txts.py new file mode 100644 index 00000000..9e553a2a --- /dev/null +++ b/ZShooter_v2/traces/create_tracefits_from_txts.py @@ -0,0 +1,140 @@ +import numpy as np +import pandas as pd +from astropy.io import fits +from astropy.table import Table +import astropy.units as u +import os + + +""" +Create a TRACE_ZSHOOTER.fits file from text files defining echelle orders +This only creates the trace definition file, no efficiency curves +""" +basepath = os.path.dirname(os.path.abspath(__file__)) +f = fits.open(f'{basepath}/echelle_traces.fits') +hdr0 = f[0].header +hdr1 = f[1].header +tmphdr = f[2].header + +ub_bottom = pd.read_csv(f'{basepath}/Echelle_Layout/Blue_Echelle_Bottom.txt', sep='\s+', header=None, skiprows=1) +ub_center = pd.read_csv(f'{basepath}/Echelle_Layout/Blue_Echelle_Center.txt', sep='\s+', header=None, skiprows=1) +ub_top = pd.read_csv(f'{basepath}/Echelle_Layout/Blue_Echelle_Top.txt', sep='\s+', header=None, skiprows=1) +vis_bottom = pd.read_csv(f'{basepath}/Echelle_Layout/Red_Echelle_Bottom.txt', sep='\s+', header=None, skiprows=1) +vis_center = pd.read_csv(f'{basepath}/Echelle_Layout/Red_Echelle_Center.txt', sep='\s+', header=None, skiprows=1) +vis_top = pd.read_csv(f'{basepath}/Echelle_Layout/Red_Echelle_Top.txt', sep='\s+', header=None, skiprows=1) +hk_bottom = pd.read_csv(f'{basepath}/Echelle_Layout/HK_Echelle_Bottom.txt', sep='\s+', header=None, skiprows=1) +hk_center = pd.read_csv(f'{basepath}/Echelle_Layout/HK_Echelle_Center.txt', sep='\s+', header=None, skiprows=1) +hk_top = pd.read_csv(f'{basepath}/Echelle_Layout/HK_Echelle_Top.txt', sep='\s+', header=None, skiprows=1) +yj_bottom = pd.read_csv(f'{basepath}/Echelle_Layout/YJ_Echelle_Bottom.txt', sep='\s+', header=None, skiprows=1) +yj_center = pd.read_csv(f'{basepath}/Echelle_Layout/YJ_Echelle_Center.txt', sep='\s+', header=None, skiprows=1) +yj_top = pd.read_csv(f'{basepath}/Echelle_Layout/YJ_Echelle_Top.txt', sep='\s+', header=None, skiprows=1) + +hdulist = [] +tracelist = [] +extid = 2 +# NIR HK +hk_orders = hk_bottom[0].unique() +for hko in hk_orders: + wavelengths, xis, xs, ys = [], [], [], [] + for i,df in enumerate([hk_bottom, hk_center, hk_top]): + subdf = df[df[0]==hko].reset_index(drop=True) + subdf['xi'] = -5.0 + i*5.0 + subdf[1] = subdf[1]/1000.0 # convert to um + subdf[2] = subdf[2] + 30.720 # shift to match detector coords + wavelengths.extend(subdf[1].values) + xis.extend(subdf['xi'].values) + xs.extend(subdf[2].values) + ys.extend(subdf[3].values) + tab = Table({'wavelength': wavelengths*u.um,'s': xis*u.arcsec,'x': xs*u.mm,'y': ys*u.mm}) + hdr = tmphdr.copy() + hdr['EXTNAME'] = f'hk_{int(hko)}' + hdulist.append(fits.BinTableHDU(data=tab, header=hdr)) + tracelist.append([hdr['EXTNAME'], extid, 0, 0]) + extid += 1 +# NIR YJ +yj_orders = yj_bottom[0].unique() +for yjo in yj_orders: + wavelengths, xis, xs, ys = [], [], [], [] + for i,df in enumerate([yj_bottom, yj_center, yj_top]): + subdf = df[df[0]==yjo].reset_index(drop=True) + subdf['xi'] = -5.0 + i*5.0 + subdf[1] = subdf[1]/1000.0 # convert to um + subdf[2] = subdf[2] - 30.720 # shift to match detector coords + wavelengths.extend(subdf[1].values) + xis.extend(subdf['xi'].values) + xs.extend(subdf[2].values) + ys.extend(subdf[3].values) + tab = Table({'wavelength': wavelengths*u.um,'s': xis*u.arcsec,'x': xs*u.mm,'y': ys*u.mm}) + hdr = tmphdr.copy() + hdr['EXTNAME'] = f'yj_{int(yjo)}' + hdulist.append(fits.BinTableHDU(data=tab, header=hdr)) + tracelist.append([hdr['EXTNAME'], extid, 0, 0]) + extid += 1 +# VIS +vis_orders = vis_bottom[0].unique() +for viso in vis_orders: + wavelengths, xis, xs, ys = [], [], [], [] + for i,df in enumerate([vis_bottom, vis_center, vis_top]): + subdf = df[df[0]==viso].reset_index(drop=True) + subdf['xi'] = -5.0 + i*5.0 + subdf[1] = subdf[1]/1000.0 # convert + wavelengths.extend(subdf[1].values) + xis.extend(subdf['xi'].values) + xs.extend(subdf[2].values) + ys.extend(subdf[3].values) + tab = Table({'wavelength': wavelengths*u.um,'s': xis*u.arcsec,'x': xs*u.mm,'y': ys*u.mm}) + hdr = tmphdr.copy() + hdr['EXTNAME'] = f'gri_{int(viso)}' + hdulist.append(fits.BinTableHDU(data=tab, header=hdr)) + tracelist.append([hdr['EXTNAME'], extid, 1, 1]) + extid += 1 +# UB +ub_orders = ub_bottom[0].unique() +for ubo in ub_orders: + wavelengths, xis, xs, ys = [], [], [], [] + for i,df in enumerate([ub_bottom, ub_center, ub_top]): + subdf = df[df[0]==ubo].reset_index(drop=True) + subdf['xi'] = -5.0 + i*5.0 + subdf[1] = subdf[1]/1000.0 # convert to um + wavelengths.extend(subdf[1].values) + xis.extend(subdf['xi'].values) + xs.extend(subdf[2].values) + ys.extend(subdf[3].values) + tab = Table({'wavelength': wavelengths*u.um,'s': xis*u.arcsec,'x': xs*u.mm,'y': ys*u.mm}) + hdr = tmphdr.copy() + hdr['EXTNAME'] = f'ub_{int(ubo)}' + hdulist.append(fits.BinTableHDU(data=tab, header=hdr)) + tracelist.append([hdr['EXTNAME'], extid, 2, 2]) + extid += 1 + +hdul = fits.HDUList() +hdul.append(fits.PrimaryHDU(header=hdr0)) +# Create trace list table +trace_tab = Table(rows=tracelist, names=['description', 'extension_id', 'aperture_id', 'image_plane_id']) +hdul.append(fits.BinTableHDU(data=trace_tab, header=hdr1)) +for hdu in hdulist: + hdul.append(hdu) + +hdul.writeto(f'{basepath}/TRACE_ZSHOOTER.fits', overwrite=True) + +""" +Create placeholder efficiency file TRACE_eff.fits +""" +hdul_eff = fits.HDUList() +hdul_eff.append(fits.PrimaryHDU(header=hdr0)) # same header as trace file +# create trace eff list table +trace_tab = np.array(tracelist)[:,:2].tolist() +trace_eff_tab = Table(rows=trace_tab, names=['description', 'extension_id'], dtype=['>S6', '>i4']) +trace_eff_tab['extension_id'] = trace_eff_tab['extension_id'].astype(int) +hdul_eff.append(fits.BinTableHDU(data=trace_eff_tab, header=hdr1)) + +for hdu in hdulist: + tab = hdu.data + wave = np.sort(np.unique(tab['wavelength'])) + # upside down quadratic efficiency curve, max efficiency 1.0 at center wavelength, 0 at edges + eff = (wave - np.min(wave)) * (np.max(wave) - wave) + eff = eff / np.max(eff) + eff_tab = Table({'wavelength': wave*u.um, 'efficiency': eff}) + hdr = hdu.header.copy() + hdul_eff.append(fits.BinTableHDU(data=eff_tab, header=hdr)) +hdul_eff.writeto(f'{basepath}/TRACE_eff.fits', overwrite=True) diff --git a/ZShooter_v2/traces/echelle_trace_parameters.dat b/ZShooter_v2/traces/echelle_trace_parameters.dat new file mode 100644 index 00000000..508d9cba --- /dev/null +++ b/ZShooter_v2/traces/echelle_trace_parameters.dat @@ -0,0 +1,27 @@ +# author : Y. Sharma +# date_created : 2025-10-20 +# status : draft +# type : echelle:table +# min_wave_unit : nm +# max_wave_unit : nm +# echelle_blaze_unit : deg +# focal_length_unit : mm +# fwhm_unit : pixel +# detector_pad_unit : pixel +# pixel_size_unit : mm +# n_disp_unit : pixel +# n_xdisp_unit : pixel +# disp_freq_unit : mm +# xdisp_freq_unit : mm +# slitlength_unit : arcsec +# description : Table that defines the parameters for echelle trace generation, used by EchelleSpectralTraceList effect. m0 = maximum order +# changes : +# - 2025-10-20 : Initial creation of the file with trace parameters +# +prefix aperture_id image_plane_id m0 n min_wave max_wave design_res echelle_blaze focal_length fwhm detector_pad pixel_size n_disp n_xdisp disp_freq xdisp_freq slitlength dispdir xbeta_center +b 0 0 91 25 310 420 17799 65.6 225 4.5 10 0.015 2048 2048 65.000 0 10 x 0 +g 1 1 71 25 400 600 17799 65.6 225 4.5 10 0.015 2048 2048 65.000 0 10 x 0 +r 2 2 49 21 580 980 17799 65.6 225 4.5 10 0.015 2048 2048 65.000 0 10 x 0 +yj 3 3 80 24 960 1340 17799 65.6 225 4.5 10 0.015 2048 2048 24.000 0 10 x 0 +h 4 4 51 11 1470 1830 17799 65.6 225 4.5 10 0.015 2048 2048 24.000 0 10 x 0 +k 5 5 39 8 1990 2450 17799 65.6 225 4.5 10 0.015 2048 2048 24.000 0 10 x 0 \ No newline at end of file