diff --git a/.github/workflows/notebooktests.yml b/.github/workflows/notebooktests.yml index 857300a1..89358f83 100644 --- a/.github/workflows/notebooktests.yml +++ b/.github/workflows/notebooktests.yml @@ -56,7 +56,7 @@ jobs: uses: actions/setup-python@v6 with: # No matrix is used since this is a time-consuming task. - python-version: 3.11 + python-version: 3.13 - name: Install dependencies run: | @@ -85,6 +85,40 @@ jobs: /usr/bin/time -v jupytext --execute --update "${fn}" done + mosaic_notebooks: + name: Run MOSAIC Notebooks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v5 + with: + # No matrix is used since this is a time-consuming task. + python-version: 3.13 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.github_actions.txt + + - name: Install ScopeSim from repo + if: ${{ inputs.from_pypi == false || inputs.from_pypi == 'false' }} + run: | + echo "Re-installing ScopeSim from source" >> $GITHUB_STEP_SUMMARY + pip uninstall -y scopesim scopesim_templates + pip install git+https://github.com/AstarVienna/ScopeSim.git@${{ inputs.ScopeSim }} + pip install git+https://github.com/AstarVienna/ScopeSim_Templates.git@${{ inputs.ScopeSim_Templates }} + - name: Run Notebooks + env: + PYDEVD_DISABLE_FILE_VALIDATION: 1 + run: | + echo "## MOSAIC Notebooks tested" >> $GITHUB_STEP_SUMMARY + for fn in MOSAIC/docs/example_notebooks/*.ipynb + do + echo "${fn}" + echo "- ${fn}" >> $GITHUB_STEP_SUMMARY + /usr/bin/time -v jupytext --execute --update "${fn}" + done + metis_notebooks: name: Run METIS Notebooks runs-on: ubuntu-latest @@ -94,7 +128,7 @@ jobs: uses: actions/setup-python@v6 with: # No matrix is used since this is a time-consuming task. - python-version: 3.11 + python-version: 3.13 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4a180471..3096859e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -53,7 +53,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: ['3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v5 diff --git a/ELT/FITS_telescope_keywords.yaml b/ELT/FITS_telescope_keywords.yaml index 070d2f38..1005dc43 100644 --- a/ELT/FITS_telescope_keywords.yaml +++ b/ELT/FITS_telescope_keywords.yaml @@ -1,6 +1,21 @@ - ext_type: PrimaryHDU keywords: HIERARCH: + ESO: + TEL: + ALT: [24.5, "Dummy value"] + AZ: [-1.3, "Dummy value"] + GEOELEV: 3046.0 + GEOLAT: -24.58928 # Google maps, check + GEOLON: -70.19166 + TARG: + DEC: ["!OBS.dec", "Dummy value"] + RA: ["!OBS.ra", "Dummy value"] + EPOCH: 2000.0 + EPOCHSYSTEM: "J" + PARALLAX: [0.0, "Dummy value"] + RADVEL: [0.0, "Dummy value"] + WISE: TEL: NAME: "ELT" diff --git a/LFOA/tests/test_lfoa.py b/LFOA/tests/test_lfoa.py index a0bbd38e..7bdccd54 100644 --- a/LFOA/tests/test_lfoa.py +++ b/LFOA/tests/test_lfoa.py @@ -38,7 +38,7 @@ def test_something_comes_out(self): if PLOTS: plt.subplot(121) wave = np.arange(3000, 11000) - plt.plot(wave, lfoa.optics_manager.system_tranmission(wave)) + plt.plot(wave, lfoa.optics_manager.system_transmission(wave)) plt.subplot(122) im = hdus[0][1].data diff --git a/METIS/LIST_Leiden_telescope.tbl b/METIS/LIST_Leiden_telescope.tbl new file mode 100644 index 00000000..744e55e4 --- /dev/null +++ b/METIS/LIST_Leiden_telescope.tbl @@ -0,0 +1,20 @@ +# description: Leiden AIT relay optics for sky observations +# author: Oliver Czoske +# source: Zemax model +# date_created: 2025-08-28 +# date_modified: 2025-10-16 +# status: Zemax model +# outer_unit: mm +# inner_unit: mm +# angle_unit: degree +# temperature_unit: deg_C +# changes: +# - 2025-08-28 (OC) Initialised based on rough guess +# - 2025-10-02 (OC) Zemax model, discussed with J.Brink +# - 2025-10-16 (OC) assume Al coating, per I.Politopoulos +# +name outer inner angle temperature action filename +Ldn_M4 660. 0. 42.5 10. reflection TER_mirror_aluminium.dat +Ldn_M3 160.9 0. 0. 10. reflection TER_mirror_aluminium.dat +Ldn_M2 89.6 0. 17. 10. reflection TER_mirror_aluminium.dat +Ldn_M1 66.0 0. 45. 10. reflection TER_mirror_aluminium.dat diff --git a/METIS/Leiden_sky.yaml b/METIS/Leiden_sky.yaml new file mode 100644 index 00000000..a246080d --- /dev/null +++ b/METIS/Leiden_sky.yaml @@ -0,0 +1,40 @@ +--- +### METIS AIT Leiden sky and telescope + +object: Leiden sky +alias: OBS +name: Leiden_sky +description: Leiden sky and telescope +data_modified: 2025-08-26 +changes: + - 2025-08-26 (OC) file created + +properties: + location: Leiden + longitude: 4.45842 + latitude: 52.16897 + airmass: 1.0 + +effects: + - name: leiden_sky + description: atmospheric emission and transmission + class: AtmoLibraryTERCurve + include: True + kwargs: + pwv: "!ATMO.pwv" + remote_filename: "!ATMO.spectrum.filename" + + - name: telescope + description: reflection curve + class: SurfaceList + include: True + kwargs: + filename: LIST_Leiden_telescope.tbl + +--- +alias: ATMO +properties: + temperature: 15 # Celsius! + pwv: 1.0 # mm + spectrum: + filename: Leiden_atmo_ter.fits diff --git a/METIS/METIS_DET_IFU.yaml b/METIS/METIS_DET_IFU.yaml index 9e25c548..cbc4930b 100644 --- a/METIS/METIS_DET_IFU.yaml +++ b/METIS/METIS_DET_IFU.yaml @@ -72,6 +72,14 @@ effects: kwargs: filename: "!DET.linearity.file_name" + - name: ipc + description: Inter-pixel capacitance + class: InterPixelCapacitance + kwargs: # values from Kannawadi+2016 (H4RG!) + alpha_edge: 0.02 + alpha_corner: 0.002 + alpha_aniso: 0. + - name: readout_noise description: Readout noise frames class: BasicReadoutNoise diff --git a/METIS/METIS_DET_IMG_LM.yaml b/METIS/METIS_DET_IMG_LM.yaml index 216ae149..8ad6a95d 100644 --- a/METIS/METIS_DET_IMG_LM.yaml +++ b/METIS/METIS_DET_IMG_LM.yaml @@ -90,6 +90,14 @@ effects: kwargs: filename: "!DET.linearity.file_name" + - name: ipc + description: Inter-pixel capacitance + class: InterPixelCapacitance + kwargs: # values from Kannawadi+2016 (H4RG!) + alpha_edge: 0.02 + alpha_corner: 0.002 + alpha_aniso: 0. + - name: readout_noise description: Readout noise frames class: BasicReadoutNoise diff --git a/METIS/METIS_WCU.yaml b/METIS/METIS_WCU.yaml index ea7caf77..e5d367fe 100644 --- a/METIS/METIS_WCU.yaml +++ b/METIS/METIS_WCU.yaml @@ -49,5 +49,8 @@ effects: alias: TEL properties: #area: 975.23478998 + telescope: none (WCU) + ter_curve: + filename: none area: 1354.593 #### TEST, needed to agree with RvB's calculation temperature: "!WCU.temperature" # Overrides !ATMO.temperature diff --git a/METIS/TER_mirror_aluminium.dat b/METIS/TER_mirror_aluminium.dat new file mode 100644 index 00000000..5aa76c97 --- /dev/null +++ b/METIS/TER_mirror_aluminium.dat @@ -0,0 +1,65 @@ +# author : ESO ELT DRM +# source : https://www.eso.org/sci/facilities/eelt/science/drm/tech_data/data/reflectivity/ +# description : Bare Aluminium +# date_created : 2009-11-04 +# date_modified : 2018-11-19 +# status : Design, pre PDR list of MICADO mirrors for wide-field mode +# type : mirror:reflection +# wavelength_unit : um +# +# changes : +# - 2019-07-25 (KL) Changed 2-25um value to 0.98 to match ESO predictions +# - 2020-08-25 (KL) updated waveunit --> wavelength_unit +# +wavelength reflection +0.309 0.921 +0.335 0.923 +0.372 0.925 +0.404 0.926 +0.432 0.926 +0.464 0.925 +0.499 0.921 +0.529 0.918 +0.564 0.916 +0.588 0.913 +0.610 0.910 +0.633 0.908 +0.647 0.908 +0.660 0.903 +0.675 0.898 +0.690 0.892 +0.709 0.886 +0.731 0.881 +0.755 0.875 +0.774 0.870 +0.794 0.865 +0.815 0.864 +0.845 0.863 +0.861 0.868 +0.876 0.875 +0.891 0.881 +0.900 0.884 +0.910 0.891 +0.923 0.897 +0.936 0.904 +0.945 0.911 +0.967 0.914 +1.008 0.918 +1.056 0.923 +1.115 0.929 +1.169 0.933 +1.210 0.936 +1.257 0.939 +1.309 0.942 +1.376 0.946 +1.459 0.950 +1.532 0.953 +1.604 0.956 +1.681 0.959 +1.749 0.961 +1.818 0.963 +1.885 0.965 +1.944 0.968 +2.000 0.970 +2.500 0.980 +20.00 0.980 diff --git a/METIS/TRACE_LMS.fits b/METIS/TRACE_LMS.fits index 2c27284f..b5beefc7 100644 Binary files a/METIS/TRACE_LMS.fits and b/METIS/TRACE_LMS.fits differ diff --git a/METIS/code/LMS_Traces/add_predisperser_ext.py b/METIS/code/LMS_Traces/add_predisperser_ext.py new file mode 100644 index 00000000..bea181f9 --- /dev/null +++ b/METIS/code/LMS_Traces/add_predisperser_ext.py @@ -0,0 +1,44 @@ +"""Add an extension with coefficients for the predisperser + +Taken from Fig.3-15 of E-REP-ATC-MET-1003_3-0 +""" +from astropy.io import fits +from astropy.table import Table +TRACEFILE = "TRACE_LMS.fits" + + +def add_predisperser(): + # Coefficients in ascending order of powers of wavelength + coeff = fits.Column(name="coefficients", format="E", + array=[-6.0585, 9.1657, -2.7017, 0.3825, -0.0205]) + power = fits.Column(name="power", format="I", + array=[0, 1, 2, 3, 4]) + hdu = fits.BinTableHDU.from_columns([power, coeff]) + + hdu.header["EXTNAME"] = "Predisperser" + + with fits.open(TRACEFILE) as hdul: + # Append the new HDU + hdul.append(hdu) + + # Update the catalogue + cat = hdul["CATALOGUE"] + tab = Table(cat.data) + tab.add_row(('Predisperser', 5, 0, 0)) + nhdu = fits.BinTableHDU(tab) + nhdu.header["EXTNAME"] = "CATALOGUE" + hdul[1] = nhdu + + # Update the primary header + hdul[0].header.update(dict( + DATE="2025-10-06", + SOURCE="E-REP-ATC-MET-1003_3-0, E-REP-ATC-MET-1016_1-0", + DATE_MOD="2025-10-06", + HISTORY="2025-10-06 (OC) append predisperser angle fit")) + hdul.writeto("test_trace.fits", overwrite=True) + print("Output written to test_trace.fits. Rename to", TRACEFILE," when checked for correctness.") + + + +if __name__ == "__main__": + add_predisperser() diff --git a/METIS/code/make_atmo_library.py b/METIS/code/make_atmo_library.py new file mode 100644 index 00000000..b290a03e --- /dev/null +++ b/METIS/code/make_atmo_library.py @@ -0,0 +1,206 @@ +"""Create a TERCurve library + +Use the script with a parameter: +* make_atmo_library.py make + Creates a multiextension fits file "Leiden_atmo_ter.fits" with + - 0: PDU + - 1: Catalogue Table of contents with PWV and corresponding extension + - 2: WAVELENGTH Common wavelength vector for all spectra + - 3..: Extensions for PWV between 1 and 50 +* make_atmo_library.py plot + Plots a selection of the spectra from "Leiden_atmo_ter.fits". +""" +import sys +import numpy as np +from matplotlib import pyplot as plt +from astropy.io import fits +from astropy.table import Table + +OUTFILE = "Leiden_atmo_ter.fits" +SMALLFILE = "atmo_ter_library.fits" + +def make_mef_fits(pwvs): + """Arrange TERcurve for varying pwv values in many BinTableHDUs""" + # extension 1: table of contents + toc = Table(names=("extension_id", "pwv", "extension_name"), + dtype=("i2", "f2", "S8")) + + extid = 1 + toc.add_row([extid, np.nan, "Catalogue"]) + + reffile = "leiden_spectra/LBL_A10_w0100_R0120000_ALL_Leiden_LM_R.fits" + + # extension 2: table of wavelengths + extid += 1 + hdulist = [0, 0] # contains wavehdu and pwvhdus, but not toc + wavelengths = fits.getdata(reffile)['lam'] + wavecol = fits.Column(name="wavelength", array=wavelengths, + format="E", unit="um") + wavehdu = fits.BinTableHDU.from_columns([wavecol]) + wavehdu.header["EXTNAME"] = "WAVELENGTH" + hdulist.append(wavehdu) + toc.add_row([extid, np.nan, "WAVELENGTH"]) + + # extension 3+: ter curves + extid += 1 + for p in pwvs: + transfile = f"leiden_spectra/LBL_A10_w{int(100*p):04d}_R0120000_ALL_Leiden_LM_T.fits" + transdata = fits.getdata(transfile) + transcol = fits.Column(name="transmission", array=transdata['flux'], + format="E") + + emissfile = f"leiden_spectra/LBL_A10_w{int(100*p):04d}_R0120000_ALL_Leiden_LM_R.fits" + emissdata = fits.getdata(emissfile) + emisscol = fits.Column(name="emission", array=emissdata['flux'], + format="E", unit="ph s-1 m-2 um-1 arcsec-2") + + pwvhdu = fits.BinTableHDU.from_columns([transcol, emisscol]) + extname = f"PWV_{int(p):02d}" + pwvhdu.header['EXTNAME'] = extname + pwvhdu.header['PWV'] = (p, "Precipitable Water Vapour [mm]") + pwvhdu.header['EMITFILE'] = emissfile[15:] + pwvhdu.header['TRNSFILE'] = transfile[15:] + hdulist.append(pwvhdu) + toc.add_row([extid, p, extname]) + extid += 1 + + tochdu = fits.BinTableHDU(toc) + tochdu.header['EXTNAME'] = "Catalogue" + hdulist[1] = tochdu + + + phdu = fits.PrimaryHDU() # Fill with stuff + + phdu.header["ECAT"] = 1 + phdu.header["EDATA"] = 3 + + meta = { + "author": "Oliver Czoske", + "source": "Wolfgang Kausch", + "descript": "Leiden sky emission and transmission", + "date-cre": "2025-10-02", + "date-mod": "2025-10-02", + "status": "Finished for AIT" + } + phdu.header.update(meta) + + refheader = fits.getheader(reffile, ext=0) + _ = refheader.pop("PWV") + phdu.header.update(refheader) + + hdulist[0] = phdu + hdulist = fits.HDUList(hdulist) + hdulist.writeto(OUTFILE, overwrite=True) + + +def make_small_fits(pwvs): + """Make a small file as test mock""" + # extension 1: table of contents + toc = Table(names=("extension_id", "pwv", "extension_name"), + dtype=("i2", "f2", "S8")) + + extid = 1 + toc.add_row([extid, np.nan, "Catalogue"]) + + reffile = "leiden_spectra/LBL_A10_w0100_R0120000_ALL_Leiden_LM_R.fits" + + # extension 2: table of wavelengths + extid += 1 + hdulist = [0, 0] # contains wavehdu and pwvhdus, but not toc + wavelengths = fits.getdata(reffile)['lam'][:10] + wavecol = fits.Column(name="wavelength", array=wavelengths, + format="E", unit="um") + wavehdu = fits.BinTableHDU.from_columns([wavecol]) + wavehdu.header["EXTNAME"] = "WAVELENGTH" + hdulist.append(wavehdu) + toc.add_row([extid, np.nan, "WAVELENGTH"]) + + # extension 3+: ter curves + extid += 1 + for p in pwvs: + transfile = f"leiden_spectra/LBL_A10_w{int(100*p):04d}_R0120000_ALL_Leiden_LM_T.fits" + transdata = fits.getdata(transfile) + transcol = fits.Column(name="transmission", array=transdata['flux'][:10], + format="E") + + emissfile = f"leiden_spectra/LBL_A10_w{int(100*p):04d}_R0120000_ALL_Leiden_LM_R.fits" + emissdata = fits.getdata(emissfile) + emisscol = fits.Column(name="emission", array=emissdata['flux'][:10], + format="E", unit="ph s-1 m-2 um-1 arcsec-2") + + pwvhdu = fits.BinTableHDU.from_columns([transcol, emisscol]) + extname = f"PWV_{int(p):02d}" + pwvhdu.header['EXTNAME'] = extname + pwvhdu.header['PWV'] = (p, "Precipitable Water Vapour [mm]") + pwvhdu.header['EMITFILE'] = emissfile[15:] + pwvhdu.header['TRNSFILE'] = transfile[15:] + hdulist.append(pwvhdu) + toc.add_row([extid, p, extname]) + extid += 1 + + tochdu = fits.BinTableHDU(toc) + tochdu.header['EXTNAME'] = "Catalogue" + hdulist[1] = tochdu + + + phdu = fits.PrimaryHDU() # Fill with stuff + + phdu.header["ECAT"] = 1 + phdu.header["EDATA"] = 3 + + meta = { + "author": "Donald Duck", + "source": "Dagobert Duck", + "descript": "Test file", + "date-cre": "2025-10-02", + "date-mod": "2025-10-02", + "status": "Mock data" + } + phdu.header.update(meta) + + refheader = fits.getheader(reffile, ext=0) + _ = refheader.pop("PWV") + phdu.header.update(refheader) + + hdulist[0] = phdu + hdulist = fits.HDUList(hdulist) + hdulist.writeto(SMALLFILE, overwrite=True) + +def plot_leiden_sky(filename=OUTFILE): + """Plot a selection of the Leiden sky spectra + + The spectra are in Leiden_atmo_ter.fits. + The plot shows transmission and emission spectra + for PWV = 10, 20, 30, 40, and 50 between 4.95 and 5 um. + """ + _, ax = plt.subplots(2, 1, sharex=True) + ax[0].set_title("Transmission") + ax[1].set_title("Radiance") + + with fits.open(filename) as hdul: + lam = hdul[2].data['wavelength'] + ax[1].set_xlabel("Wavelength [um]") + ax[1].set_ylabel(hdul[3].header['TUNIT2']) + for hdu in hdul[12::10]: + print(hdu.header['PWV']) + ax[0].plot(lam, hdu.data['transmission'], lw=0.5, label=hdu.header['PWV']) + ax[1].plot(lam, hdu.data['emission'], lw=0.5, label=hdu.header['PWV']) + plt.xlim(4.9, 5) + ax[1].legend() + plt.show() + + +if __name__ == "__main__": + if len(sys.argv) == 1: + print("""Usage: + python make_atmo_library.py """) + sys.exit() + + if sys.argv[1] == "make": + pwvlist = np.arange(1, 51, dtype=np.float32) + make_mef_fits(pwvlist) + elif sys.argv[1] == "plot": + plot_leiden_sky() + elif sys.argv[1] == "small": + pwvlist = np.array([1, 23, 24, 50], dtype=np.float32) + make_small_fits(pwvlist) diff --git a/METIS/default.yaml b/METIS/default.yaml index d0aef553..610596a7 100644 --- a/METIS/default.yaml +++ b/METIS/default.yaml @@ -6,8 +6,8 @@ alias: OBS name: METIS_default_configuration description: default parameters needed for a METIS simulation status: development -needs_scopesim: "v0.10.0b4" -date_modified: 2025-06-27 +needs_scopesim: "v0.11.1a1" +date_modified: 2025-10-09 changes: - 2021-12-16 (OC) chopnod defaults to perpendicular - 2021-12-16 (OC) default slits renamed @@ -19,6 +19,9 @@ changes: - 2022-03-14 (OC) use single PSF file - 2024-09-04 (OC) rearrange to include WCU modes - 2025-06-27 (FH) version bumps and status updates + - 2025-08-26 (OC) modes for Leiden sky observations + - 2025-09-29 (OC) version bump + - 2025-10-09 (OC) proper MJD value packages: - Armazones @@ -52,7 +55,7 @@ properties: tech: "IMAGE,LM" type: "OBJECT" # More default properties for the observation - mjdobs: "2027-05-04T02:30:00" + mjdobs: "61529.104" tplstart: "2027-05-04T02:30:00" tplno: 0 tplexpno: 0 @@ -220,6 +223,28 @@ mode_yamls: adc: false detector_readout_mode: slow + - object: observation + alias: OBS + name: lms_cube + description: "METIS LM-band integral-field spectroscopy, nominal mode, cube output" + status: experimental + yamls: + - Armazones.yaml + - ELT.yaml + - METIS.yaml + - METIS_LMS_SMPL.yaml + - METIS_DET_IFU_SMPL.yaml + properties: + ins_mode: LMS_cube # use as FITS header keyword + psf_file: PSF_LM_9mag_06seeing.fits + interp_psf: False + slit: false + adc: false + trace_file: TRACE_LMS.fits + wavelen: 4.2 + detector_readout_mode: slow + +######## AIT Modes using WCU - object: observation alias: OBS name: wcu_img_lm @@ -369,27 +394,118 @@ mode_yamls: adc: false detector_readout_mode: slow + + +#################### AIT Leiden sky observations - object: observation alias: OBS - name: lms_cube - description: "METIS LM-band integral-field spectroscopy, nominal mode, cube output" - status: experimental + name: leiden_lss_l + description: "METIS L-band slit spectroscopy with Leiden sky" + status: development yamls: - - Armazones.yaml - - ELT.yaml + - Leiden_sky.yaml - METIS.yaml - - METIS_LMS_SMPL.yaml - - METIS_DET_IFU_SMPL.yaml + - METIS_IMG_LM.yaml + - METIS_LSS.yaml + - METIS_DET_IMG_LM.yaml properties: - ins_mode: LMS_cube # use as FITS header keyword - psf_file: PSF_LM_9mag_06seeing.fits - interp_psf: False + ins_mode: LSS_L # use as FITS header keyword + 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 + grism_opti9: GRISM_L + grism_opti12: open + filter_name: L_spec + nd_filter_name: open + detector_readout_mode: slow + + - object: observation + alias: OBS + name: leiden_lss_m + description: "METIS M-band slit spectroscopy with Leiden sky" + status: development + yamls: + - Leiden_sky.yaml + - METIS.yaml + - METIS_IMG_LM.yaml + - METIS_LSS.yaml + - METIS_DET_IMG_LM.yaml + properties: + ins_mode: LSS_M # use as FITS header keyword + 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 + grism_opti9: GRISM_M + grism_opti12: open + filter_name: M_spec + nd_filter_name: open + detector_readout_mode: slow + + - object: observation + alias: OBS + name: leiden_lss_n + description: "METIS N-band slit spectroscopy with Leiden sky" + status: development + yamls: + - Leiden_sky.yaml + - METIS.yaml + - METIS_IMG_N.yaml + - METIS_LSS.yaml + - METIS_DET_IMG_N_GeoSnap.yaml + properties: + ins_mode: LSS_N # use as FITS header keyword + 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 + grism_opti9: open + grism_opti12: GRISM_N + filter_name: N_spec + nd_filter_name: open + chop_offsets: [3, 0] # perpendicular chopping and nodding + nod_offsets: [0, 3] + detector_readout_mode: low_capacity + + - object: observation + alias: OBS + name: leiden_lms + description: "METIS LM-band integral-field spectroscopy, nominal mode with Leiden sky" + status: development + yamls: + - Leiden_sky.yaml + - METIS.yaml + - METIS_LMS.yaml + - METIS_DET_IFU.yaml + properties: + ins_mode: LMS # use as FITS header keyword + 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: leiden_lms_extended + description: "METIS LM-band integral-field spectroscopy, extended mode with Leiden sky" + status: experimental + yamls: + - Leiden_sky.yaml + - METIS.yaml + - METIS_LMS_EXT.yaml + - METIS_DET_IFU.yaml + properties: + ins_mode: LMS # use as FITS header keyword + slit: false + adc: false + detector_readout_mode: slow + --- ### default simulation parameters needed for a METIS simulation object: simulation diff --git a/METIS/docs/example_notebooks/demos/demo_inter_pixel_capacitance.ipynb b/METIS/docs/example_notebooks/demos/demo_inter_pixel_capacitance.ipynb new file mode 100644 index 00000000..8300f254 --- /dev/null +++ b/METIS/docs/example_notebooks/demos/demo_inter_pixel_capacitance.ipynb @@ -0,0 +1,332 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "id": "f6b7e7d5-70b3-4a06-8380-80ba648170c5", + "metadata": {}, + "source": [ + "This notebook demonstrates the ScopeSim effect `InterPixelCapacitance`. Inter-pixel capacitance correlates the voltages or data values measured in adjacent pixels of an infrared detector. The effect implements the three-parameter model of Kannawadi et al. (2016) (PASP 128, 095001) and applies the following convolution kernel (in their notation) to the detector readout:\n", + "$$ K(\\alpha, \\alpha^\\prime, \\alpha_{+}) = \\begin{pmatrix}\n", + " \\alpha^\\prime & \\alpha - \\alpha_{+} & \\alpha^\\prime \\\\\n", + " \\alpha + \\alpha_{+} & 1 - 4(\\alpha + \\alpha^\\prime) & \\alpha + \\alpha_{+} \\\\\n", + " \\alpha^\\prime & \\alpha - \\alpha_{+} & \\alpha^\\prime\n", + " \\end{pmatrix}\n", + "$$\n", + "\n", + "The correspondence between these parameters and those of the Scopesim effect is as follows:\n", + "- $\\alpha$ -- ``alpha_edge``: gives the influence of the four pixels sharing an edge with the target pixel.\n", + "- $\\alpha^\\prime$ -- ``alpha_corner``: gives the influence of the four pixels sharing a corner with the target pixel.\n", + "- $\\alpha_{+}$ -- ``alpha_aniso``: gives a difference in the influence of neighbouring pixels along rows and along columns\n", + "\n", + "The default setting in the instrument package sets these parameter with literature values typical for HxRG detectors. \n", + "It is also possible to set the kernel directly in the yaml file. This allows using kernels that are larger than $3\\times 3$.\n", + "\n", + "When the $\\alpha$ parameters are used to define the IPC kernel it is automatically normalised to unit sum. When the kernel is provided it is normalised by ScopeSim when its sum is greater than one. When it is less than one (but larger than zero), it is accepted as is, which then leads to loss of flux -- it is the user's responsibility to ensure the kernel is normalised unless this flux loss is intended. Kernels with negative sum are rejected and raise a `ValueError`. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9339c51b-9402-467c-91dd-57f90283101f", + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "from matplotlib import pyplot as plt\n", + "from astropy import units as u" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d2fb8c45-8d59-49bc-a940-fde3c99a147e", + "metadata": {}, + "outputs": [], + "source": [ + "import scopesim as sim\n", + "sim.bug_report()\n", + "\n", + "# Edit this path if you have a custom install directory, otherwise comment it out. [For ReadTheDocs only]\n", + "sim.link_irdb(\"../../../../\")" + ] + }, + { + "cell_type": "markdown", + "id": "d073e7be-ffd4-4697-84e9-bc592d04df34", + "metadata": {}, + "source": [ + "If you haven't got the instrument packages yet, uncomment the following cell, which will install the packages into `./inst_pkgs`, a subdirectory of your current working directory. If you have already downloaded the packages but to a different location you can set\n", + "```python\n", + "sim.set_inst_pgks_path(\"/path/to/inst/pkgs\")\n", + "```" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "702e1c8f-338f-4166-a3ad-ad58df89534d", + "metadata": {}, + "outputs": [], + "source": [ + "# sim.download_package([\"METIS\", \"ELT\", \"Armazones\"])" + ] + }, + { + "cell_type": "markdown", + "id": "55e7fa50-baf8-4410-8db9-eb9f30021075", + "metadata": {}, + "source": [ + "The `InterPixelCapacitance` effect will be demonstrated in the METIS IMG_LM mode. It will become active in the `readout()` step." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fe9690aa-19c5-46ff-8ff2-47d5cf5933cc", + "metadata": {}, + "outputs": [], + "source": [ + "cmd = sim.UserCommands(use_instrument=\"METIS\", set_modes=[\"img_lm\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aa6477aa-4f28-442c-8f3f-7aee4036b983", + "metadata": {}, + "outputs": [], + "source": [ + "metis = sim.OpticalTrain(cmd)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aff0e33d-ce64-48fb-aeb4-57de2b9b6a3c", + "metadata": {}, + "outputs": [], + "source": [ + "metis.effects.pprint_all()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a5ffef65-8b14-4a84-8c0e-457bfdc4a83e", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c8bd1828-de83-4b35-b8ef-16d61dc64d98", + "metadata": {}, + "outputs": [], + "source": [ + "print(metis['ipc'])" + ] + }, + { + "cell_type": "markdown", + "id": "e495fc00-54c6-4c6f-aec6-836e2565f734", + "metadata": {}, + "source": [ + "The kernel can be replaced using the `update` method. Note that the parameters need to be specified in full, either as `kernel` or the three `alpha` parameters (`alpha` parameters that are not set explicitly default to zero):" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dc516e61-201e-4b3c-b1cb-df1068b2d327", + "metadata": {}, + "outputs": [], + "source": [ + "metis['ipc'].update(alpha_edge=0.02, alpha_corner=0.002, alpha_aniso=0.001)\n", + "print(metis['ipc'])" + ] + }, + { + "cell_type": "markdown", + "id": "eea214d5-8863-44cb-888b-23e358966832", + "metadata": {}, + "source": [ + "## Effect on noise\n", + "The IPC effect is applied after dark current and shot noise but before readout noise. Its main effect is to correlate the photon noise, which is for instance measurable as a decrease in the rms noise. To show this, we observe a piece of blank sky and read out with and without the IPC effect included." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ca7d8574-b87c-4b13-ba43-1c8432f51c48", + "metadata": {}, + "outputs": [], + "source": [ + "metis.observe()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "87f64fb0-5352-49c9-9a58-7dde96190640", + "metadata": {}, + "outputs": [], + "source": [ + "metis['ipc'].include = True # this is the default\n", + "with_ipc = metis.readout(exptime=10)[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8f2428bc-abf4-45f2-9ada-64457866c752", + "metadata": {}, + "outputs": [], + "source": [ + "metis['ipc'].include = False\n", + "without_ipc = metis.readout(exptime=10)[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ec0d258d-7421-415e-89b6-ffccaeb6d4af", + "metadata": {}, + "outputs": [], + "source": [ + "# The edge rows and columns need to be discarded as they are incompletely covered by the IPC kernel\n", + "print(f\"RMS noise without IPC: {without_ipc[1].data[1:-1, 1:-1].std()}\")\n", + "print(f\"RMS noise with IPC: {with_ipc[1].data[1:-1, 1:-1].std()}\")" + ] + }, + { + "cell_type": "markdown", + "id": "09c84f86-009a-4f2b-8709-fe1dd4bbad3f", + "metadata": {}, + "source": [ + "## Effect on image quality\n", + "The effect on the image quality is rather slight, in particular because the SCAO PSF in the L band is broad with a FWHM of about five pixels. We simulate a star and apply the default SCAO PSF." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b2cb9f2b-638a-4422-9793-cf43acac53e5", + "metadata": {}, + "outputs": [], + "source": [ + "star = sim.source.source_templates.star(flux=0.01*u.Jy)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fcf5e4bf-9a88-4981-bf93-7a860fbf9812", + "metadata": {}, + "outputs": [], + "source": [ + "metis.observe(star)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65274649-0a13-486c-a4bf-a59ac8ddeec0", + "metadata": {}, + "outputs": [], + "source": [ + "metis['ipc'].include = True\n", + "star_w_ipc = metis.readout(exptime=1)[0]\n", + "metis['ipc'].include = False\n", + "star_wo_ipc = metis.readout(exptime=1)[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b606d556-156a-4629-aa15-5c4ea0045755", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(np.arange(1010,1035), star_wo_ipc[1].data[1023, 1010:1035], label=\"without IPC\")\n", + "plt.plot(np.arange(1010, 1035), star_w_ipc[1].data[1023, 1010:1035], label=\"with IPC\")\n", + "plt.legend();" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6ae04433-7442-45fc-8c75-705773b49f58", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(np.arange(1010, 1035), (star_w_ipc[1].data - star_wo_ipc[1].data)[1023, 1010:1035], label=\"Difference (with_ipc - without_ipc)\")\n", + "plt.legend();" + ] + }, + { + "cell_type": "markdown", + "id": "718af26c-c72f-4667-9abb-3bf4a7e018d9", + "metadata": {}, + "source": [ + "The effect is also more pronounced with a different (though unrealistic) kernel:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "73e4df86-3089-4403-9cd3-291ffd3617b6", + "metadata": {}, + "outputs": [], + "source": [ + "metis['ipc'].update(kernel=[[1, 1, 1], [1, 1, 1], [1, 1, 1]])\n", + "print(metis['ipc'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "65b9b44c-fbc0-41c5-af99-495e886628ad", + "metadata": {}, + "outputs": [], + "source": [ + "metis['ipc'].include = True\n", + "star_w_strong_ipc = metis.readout(exptime=1)[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b539e170-8d9e-4f44-ba05-84cf792a757a", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(np.arange(1010,1035), star_wo_ipc[1].data[1023, 1010:1035], label=\"without IPC\")\n", + "plt.plot(np.arange(1010, 1035), star_w_strong_ipc[1].data[1023, 1010:1035], label=\"with strong IPC\")\n", + "plt.legend();" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/METIS/headers/FITS_cfo_keywords.yaml b/METIS/headers/FITS_cfo_keywords.yaml index 94687a88..f1996e23 100644 --- a/METIS/headers/FITS_cfo_keywords.yaml +++ b/METIS/headers/FITS_cfo_keywords.yaml @@ -4,15 +4,37 @@ HIERARCH: ESO: INS: + CFO_DROT: # derotator + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-drot", "Derotator ID"] + MODE: ["eng", "Derotator mode"] # other values? + NAME: [" ", "Derotator name"] # no name? + POS: [0, "Derotator position"] # TODO: change + STAT: ["Standstill", "Derotator status"] + OPTI1: # CFO PP1 mask wheel - # TODO: There are no names yet. We use the + # TODO: There are no position names yet. We use the # transmission, which is returned as an # inconvenient list. - DESC: "CFO PP1 mask wheel" - NAME: "#cold_stop.transmission!" - OPTI2: # CFO PP1 ADC wheel - DESC: "ADC wheel" - NAME: "#adc_wheel.current_adc!" + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-pp1", "CFP_PP1 ID"] + NAME: [" ", "CFO_PP1 NAME"] + POS: "#cold_stop.transmission!" + POSNAME: ["ignore", "CFO_PP1 named position"] + STAT: ["Standstill", "CFO_PP1 status"] + + OPTI2: # CFO ADC wheel + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-adc", "CFO_ADC ID"] + NAME: [" ", "CFO_ADC NAME"] + POS: [0, "CFO_ADC position"] # TODO wheel position number + POSNAME: ["#adc_wheel.current_adc!", "CFO_ADC named position"] + STAT: ["Standstill", "CFO_ADC status"] + OPTI3: # CFO FP2 mask/slit wheel - DESC: "Slit wheel" - NAME: "#slit_wheel.current_slit!" + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-fp2", "CFO_FP2 ID"] + NAME: [" ", "CFO_FP2 NAME"] + POS: [0, "CFP_FP2 position"] # TODO number of position + POSNAME: ["#slit_wheel.current_slit!", "CFO_FP2 named position"] + STAT: ["Standstill", "CFO_FP2 named position"] diff --git a/METIS/headers/FITS_common_keywords.yaml b/METIS/headers/FITS_common_keywords.yaml index 1fb8d6aa..5afeeb27 100644 --- a/METIS/headers/FITS_common_keywords.yaml +++ b/METIS/headers/FITS_common_keywords.yaml @@ -81,7 +81,7 @@ NAME: "TODO" CUBE: # TODO: Allow cube mode in ScopeSim. - MODE: "F" + MODE: false INS: # Keywords from the instrument subsystem. # @@ -151,7 +151,7 @@ - ext_type: ImageHDU # Keyword for extension HDUs. keywords: - INHERIT: "T" + INHERIT: true # Will resolve to e.g. DET1.DATA, DET2.DATA etc. This allows us to reorder # the extensions in case they are shuffled. EXTNAME: "DET§.DATA" diff --git a/METIS/headers/FITS_det_ifu_keywords.yaml b/METIS/headers/FITS_det_ifu_keywords.yaml index 88c63d38..975a5e5e 100644 --- a/METIS/headers/FITS_det_ifu_keywords.yaml +++ b/METIS/headers/FITS_det_ifu_keywords.yaml @@ -6,7 +6,7 @@ DIT: "!OBS.dit" NDIT: "!OBS.ndit" CUBE: - MODE: "F" + MODE: false - ext_number: [1] keywords: diff --git a/METIS/headers/FITS_det_lm_keywords.yaml b/METIS/headers/FITS_det_lm_keywords.yaml index 16da4ed3..26bb2247 100644 --- a/METIS/headers/FITS_det_lm_keywords.yaml +++ b/METIS/headers/FITS_det_lm_keywords.yaml @@ -7,7 +7,7 @@ NDIT: "!OBS.ndit" MODE: "!DET.mode" CUBE: - MODE: "F" + MODE: false - ext_type: ImageHDU keywords: diff --git a/METIS/headers/FITS_det_n_keywords.yaml b/METIS/headers/FITS_det_n_keywords.yaml index b9ae1edc..6a886612 100644 --- a/METIS/headers/FITS_det_n_keywords.yaml +++ b/METIS/headers/FITS_det_n_keywords.yaml @@ -7,7 +7,7 @@ NDIT: "!OBS.ndit" MODE: "!DET.mode" CUBE: - MODE: "F" + MODE: false SEQ: CHOPNOD: ST: "#chop_nod.include" diff --git a/METIS/headers/FITS_img_lm_keywords.yaml b/METIS/headers/FITS_img_lm_keywords.yaml index 854d157f..63e7ff31 100644 --- a/METIS/headers/FITS_img_lm_keywords.yaml +++ b/METIS/headers/FITS_img_lm_keywords.yaml @@ -7,14 +7,33 @@ TECH: "IMAGE,LM" INS: OPTI4: # LMS beamsplitter pickoff wheel - DESC: "LMS pickoff" - NAME: "OUT" # could be IN for parallel observing + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-lms", "CFO_LMS ID"] + NAME: [" ", "CFO_LMS NAME"] + POS: [180, "CFO_LMS position"] + POSNAME: ["OUT", "CFO_LMS position"] + STAT: ["Standstill", "CFO_LMS status"] + OPTI9: # IMG-LM mask/grism wheel - DESC: "IMG-LM mask/grism" - NAME: "open" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-lm-pw", "IMG_LM_PW ID"] + NAME: [" ", "IMG_LM_PW NAME"] + POS: [0, "IMG_LM_PW position"] # TODO + POSNAME: ["open", "IMG_LM_PW named position"] + STAT: ["Standstill", "IMG_LM_PW status"] + OPTI10: # IMG-LM science filter wheel - DESC: "IMG-LM science filter" - NAME: "#filter_wheel.current_filter!" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-lm-fw", "IMG_LM_FW ID"] + NAME: [" ", "IMG_LM_FW NAME"] + POS: [0, "IMG_LM_FW position"] # TODO + POSNAME: ["#filter_wheel.current_filter!", "IMG_LM_FW named position"] + STAT: ["Standstill", "IMG_LM_FW status"] + OPTI11: # IMG-LM neutral density filter wheel - DESC: "IMG-LM neutral density filter" - NAME: "#nd_filter_wheel.current_filter!" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-lm-ndw", "IMG_LM_NDW ID"] + NAME: [" ", "IMG_LM_NDW NAME"] + POS: [0, "IMG_LM_NDW position"] # TODO + POSNAME: ["#nd_filter_wheel.current_filter!", "IMG_LM_NDW named position"] + STAT: ["Standstill", "IMG_LM_NDW status"] diff --git a/METIS/headers/FITS_img_n_keywords.yaml b/METIS/headers/FITS_img_n_keywords.yaml index f1f25553..d28cbb62 100644 --- a/METIS/headers/FITS_img_n_keywords.yaml +++ b/METIS/headers/FITS_img_n_keywords.yaml @@ -6,15 +6,35 @@ DPR: TECH: "IMAGE,N" INS: + OPTI4: # LMS beamsplitter pickoff wheel - DESC: "LMS pickoff" - NAME: "OUT" # could be IN for parallel observing - OPTI12: # IMG-N mask/grism wheel - DESC: "IMG-N mask/grism" - NAME: "open" + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-lms", "CFO_LMS ID"] + NAME: [" ", "CFO_LMS NAME"] + POS: [180, "CFO_LMS position"] + POSNAME: ["OUT", "CFO_LMS named position"] + STAT: ["Standstill", "CFO_LMS status"] + + OPTI12: # IMG-N pupil mask wheel + DEVSIM: [true, "Device simulation flag"] + ID: ["img-n-pw", "IMG_N_PW ID"] + NAME: [" ", "IMG_N_PW NAME"] + POS: [0, "IMG_N_PW position"] # TODO + POSNAME: ["open", "IMG_N_PW named position"] + STAT: ["Standstill", "IMG_N_PW status"] + OPTI13: # IMG-N science filter wheel - DESC: "IMG-N science filter" - NAME: "#filter_wheel.current_filter!" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-n-fw", "IMG_N_FW ID"] + NAME: [" ", "IMG_N_FW NAME"] + POS: [0, "IMG_N_FW position"] # TODO + POSNAME: ["#filter_wheel.current_filter!", "IMG_N_FW named position"] + STAT: ["Standstill", "IMG_N_FW status"] + OPTI14: # IMG-N neutral-density filter wheel - DESC: "IMG-N neutral density filter" - NAME: "#nd_filter_wheel.current_filter!" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-n-ndw", "IMG_N_NDW ID"] + NAME: [" ", "IMG_N_NDW NAME"] + POS: [0, "IMG_N_NDW position"] # TODO + POSNAME: ["#nd_filter_wheel.current_filter!", "IMG_N_NDW named position"] + STAT: ["Standstill", "IMG_N_NDW status"] diff --git a/METIS/headers/FITS_lms_keywords.yaml b/METIS/headers/FITS_lms_keywords.yaml index 2a4b80ff..3749fbed 100644 --- a/METIS/headers/FITS_lms_keywords.yaml +++ b/METIS/headers/FITS_lms_keywords.yaml @@ -8,23 +8,47 @@ INS: LMS: # LMS mode (Nominal or Extended) MODE: "Nominal" + WLEN: # LMS central wavelength and range CEN: ["!OBS.wavelen", "Central wavelength [um]"] - START: "TBD" # "#lms_spectral_traces.wave_min" ain't workin' - END: "TBD" - GRAT: - ANGLE: "TBD" + START: ["#lms_spectral_traces.wave_min", "Start wavelength [um]"] + END: ["#lms_spectral_traces.wave_max", "End wavelength [um]"] + OPTI4: # LMS beamsplitter pickoff wheel - DESC: "LMS pickoff" - NAME: "IN" + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-lms", "CFO_LMS ID"] + NAME: [" ", "CFO_LMS NAME"] + POS: [0, "CFO_LMS position"] + POSNAME: ["IN", "CFO_LMS named position"] + STAT: ["Standstill", "CFO_LMS status"] + OPTI5: # LMS PP1 mask wheel - DESC: "LMS PP1 mask wheel" - NAME: "open" # TODO: not defined in irdb + DEVSIM: [true, "Device simulation flag"] + ID: ["lms-pwa", "LMS_PWA ID"] + NAME: [" ", "LMS_PWA NAME"] + POS: [0, "LMS_PWA position"] # TODO + POSNAME: ["open", "LMS_PWA named position"] + STAT: ["Standstill", "LMS_PWA status"] + OPTI6: # LMS spectral IFU mechanism - DESC: "LMS spectral IFU mechanism" - NAME: "OUT" + DEVSIM: [true, "Device simulation flag"] + ID: ["lms-gra", "LMS_GRA ID"] + NAME: [" ", "LMS_GRA NAME"] + POS: [0, "LMS_GRA position"] + POSNAME: ["OUT", "LMS_GRA named position"] + STAT: ["Standstill", "LMS_GRA status"] + OPTI7: # LMS pre-disperser - DESC: "LMS pre-disperser" - NAME: "TBD" + DEVSIM: [true, "Device simulation flag"] + ID: ["lms-pra", "LMS-PRA ID"] + NAME: [" ", "LMS-PRA NAME"] + POS: ["#lms_spectral_traces.predisperser", "LMS-PRA position [deg]"] + STAT: ["Standstill", "LMS-PRA status"] # no POSNAME? + OPTI8: # LMS main disperser - NAME: "TBD" # identical to GRAT.ANGLE? + DEVSIM: [true, "Device simulation flag"] + ID: ["lms-msa", "LMS-MSA ID"] + NAME: [" ", "LMS-MSA NAME"] + POS: ["#lms_spectral_traces.echelle", "LMS-MSA position [deg]"] + ORDER: ["#lms_spectral_traces.order", "Spectral order (non-ESO keyword)"] + STAT: ["Standstill", "LMS-MSA status"] # no POSNAME? diff --git a/METIS/headers/FITS_lss_keywords.yaml b/METIS/headers/FITS_lss_keywords.yaml index 6199bb2d..0ccecf78 100644 --- a/METIS/headers/FITS_lss_keywords.yaml +++ b/METIS/headers/FITS_lss_keywords.yaml @@ -7,11 +7,25 @@ TECH: "LSS" # TODO: How to add the filter name? INS: OPTI4: # LMS beamsplitter pickoff wheel - DESC: "LMS pickoff" - NAME: "OUT" # could be IN for parallel observing + DEVSIM: [true, "Device simulation flag"] + ID: ["cfo-lms", "CFO_LMS ID"] + NAME: [" ", "CFO_LMS NAME"] + POS: [180, "CFO_LMS position"] + POSNAME: ["OUT", "CFO_LMS named position"] + STAT: ["Standstill", "CFO_LMS status"] + OPTI9: # IMG-LM mask/grism wheel - DESC: "IMG-LM mask/grism" - NAME: "!OBS.grism_opti9" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-lm-pw", "IMG_LM_PW ID"] + NAME: [" ", "IMG_LM_PW NAME"] + POS: [0, "IMG_LM_PW position"] # TODO + POSNAME: ["!OBS.grism_opti9", "IMG_LM_PW named position"] # TODO + STAT: ["Standstill", "IMG_LM_PW status"] + OPTI12: # IMG-N mask/grism wheel - DESC: "IMG-N mask/grism" - NAME: "!OBS.grism_opti12" + DEVSIM: [true, "Device simulation flag"] + ID: ["img-n-pw", "IMG_N_PW ID"] + NAME: [" ", "IMG_N_PW NAME"] + POS: [0, "IMG_N_PW position"] # TODO + POSNAME: ["!OBS.grism_opti12", "IMG_N_PW named position"] + STAT: ["Standstill", "IMG_N_PW status"] diff --git a/METIS/headers/FITS_wcu_keywords.yaml b/METIS/headers/FITS_wcu_keywords.yaml index d5c7c13d..0d1b0af7 100644 --- a/METIS/headers/FITS_wcu_keywords.yaml +++ b/METIS/headers/FITS_wcu_keywords.yaml @@ -5,17 +5,46 @@ ESO: INS: OPTI17: # WCU periscope arm - DESC: "WCU periscope" - NAME: "IN" + DEVSIM: [true, "Device simulation flag"] + ID: ["wcu-per", "OPTI17 ID"] + NAME: [" ", "OPTI17 NAME"] + POS: [0, "OPTI17 position"] # TODO + POSNAME: ["IN", "OPTI17 named position"] # added by OC + STAT: ["Standstill", "OPTI17 status"] + OPTI18: # WCU PP1 masks - DESC: "WCU PP1 masks" - NAME: "#pupil_masks.current_mask" + DEVSIM: [true, "Device simulation flag"] + ID: ["wcu-pp1", "WCU OPTI18 ID"] + NAME: [" ", "WCU OPTI18 NAME"] + POS: [0, "WCU OPTI18 position"] # TODO + POSNAME: ["#pupil_masks.current_mask", "WCU OPTI18 named position"] # added by OC + STAT: ["Standstill", "WCU OPTI18 status"] + OPTI19: # WCU BB exit aperture masks - DESC: "WCU BB exit aperture" - NAME: "#wcu_source.bb_aperture" + DEVSIM: [true, "Device simulation flag"] + ID: ["wcu-bb-aperture-mask", "OPTI19 ID"] + NAME: [" ", "OPTI19 NAME"] + POS: [0, "OPTI10 position"] # TODO + POSNAME: ["#wcu_source.bb_aperture", "OPTI19 named position"] # added by OC + STAT: ["Standstill", "OPTI19 status"] + OPTI20: # WCU FP2.1 mask wheel - DESC: "WCU FP2.1 mask" - NAME: "#wcu_source.current_fpmask" + DEVSIM: [true, "Device simulation flag"] + ID: ["wcu-fp2-1", "WCU OPTI20 ID"] + NAME: [" ", "WCU OPTI20 NAME"] + POS: [0, "WCU OPTI20 position"] # TODO + POSNAME: ["#wcu_source.current_fpmask", "WCU OPTI20 named position"] + STAT: ["Standstill", "WCU OPTI20 status"] + + WCU_BB: + AMBIENTTEMP: ["#wcu_source.wcu_temp_c", "[C] Blackbody ambient temperature [C]"] + DEVSIM: [true, "Device simulation flag"] + HWSTATUS: ["Hot", "Blackbody source status"] + ID: ["wcu-bb", "WCU_BB ID"] + NAME: [" ", "WCU_BB NAME"] + SOURCESETP: ["#wcu_source.bb_temp_c", "[C] Blackbody setpoint temperature [C]"] + SOURCETEMP: ["#wcu_source.bb_temp_c", "[C] Blackbody source temperature"] + SEQ: WCU_BB_TEMP: "#wcu_source.bb_temp" WCU: diff --git a/METIS/tests/test_metis.py b/METIS/tests/test_metis.py index 67171949..5c76ca9f 100644 --- a/METIS/tests/test_metis.py +++ b/METIS/tests/test_metis.py @@ -280,3 +280,7 @@ def test_something_comes_out_img_n(self): plt.show() assert mx > med + 3 * std + + # This should not be here, but putting it into a separate test would work + # better if the simulation were done in a fixture + assert isinstance(hdus[0][1].header["INHERIT"], bool) diff --git a/METIS/wcu/fp_mask_grid_lm.dat b/METIS/wcu/fp_mask_grid_lm.dat index 91e65041..7bdac995 100644 --- a/METIS/wcu/fp_mask_grid_lm.dat +++ b/METIS/wcu/fp_mask_grid_lm.dat @@ -1,9 +1,9 @@ # 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 +# source : E-SPE-UZK-MET-1015_2-0; E-REP-UZK-MET-1008_3-0, Table 10-8; LMS_astrometric_calibration_mask.pdf, RvB # date_created : 2025-01-13 -# date_modified : 2025-01-13 +# date_modified : 2025-10-17 # status : FDR # type : aperture:aperture_mask # x_unit : arcsec @@ -11,13 +11,40 @@ # diam_unit : arcsec # notes: diam 25 um at 3.319 mm/arcsec # changes : +# - 2025-10-17 (OC) merge lms mask into lm mask # 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 + +-0.320850 0.320850 0.007539 +-0.155250 0.320850 0.007539 + 0.010350 0.320850 0.007539 + 0.175950 0.320850 0.007539 + 0.341550 0.320850 0.007539 +-0.320850 0.155250 0.007539 +-0.155250 0.155250 0.007539 + 0.010350 0.155250 0.007539 + 0.175950 0.155250 0.007539 + 0.341550 0.155250 0.007539 +-0.320850 -0.010350 0.007539 +-0.155250 -0.010350 0.007539 + 0.010350 -0.010350 0.007539 + 0.175950 -0.010350 0.007539 + 0.341550 -0.010350 0.007539 +-0.320850 -0.175950 0.007539 + 0.010350 -0.175950 0.007539 + 0.175950 -0.175950 0.007539 + 0.341550 -0.175950 0.007539 +-0.320850 -0.341550 0.007539 +-0.155250 -0.341550 0.007539 + 0.010350 -0.341550 0.007539 + 0.175950 -0.341550 0.007539 + 0.341550 -0.341550 0.007539 + + -1.36 0.00 0.007532 1.36 -1.36 0.007532 0.00 -1.36 0.007532 diff --git a/METIS/wcu/fp_mask_grid_lms.dat b/METIS/wcu/fp_mask_grid_lms.dat deleted file mode 100644 index 7b281bff..00000000 --- a/METIS/wcu/fp_mask_grid_lms.dat +++ /dev/null @@ -1,38 +0,0 @@ -# description : WCU focal plane mask, grid LMS -# name : WCU FP mask -# author : Oliver Czoske -# source : LMS_astrometric_calibration_mask.pdf, RvB -# date_created : 2025-08-02 -# date_modified : 2025-08-02 -# status : Design -# type : aperture:aperture_mask -# x_unit : arcsec -# y_unit : arcsec -# diam_unit : arcsec -# changes : -# - x y diam --0.320850 0.320850 0.007539 --0.155250 0.320850 0.007539 - 0.010350 0.320850 0.007539 - 0.175950 0.320850 0.007539 - 0.341550 0.320850 0.007539 --0.320850 0.155250 0.007539 --0.155250 0.155250 0.007539 - 0.010350 0.155250 0.007539 - 0.175950 0.155250 0.007539 - 0.341550 0.155250 0.007539 --0.320850 -0.010350 0.007539 --0.155250 -0.010350 0.007539 - 0.010350 -0.010350 0.007539 - 0.175950 -0.010350 0.007539 - 0.341550 -0.010350 0.007539 --0.320850 -0.175950 0.007539 - 0.010350 -0.175950 0.007539 - 0.175950 -0.175950 0.007539 - 0.341550 -0.175950 0.007539 --0.320850 -0.341550 0.007539 --0.155250 -0.341550 0.007539 - 0.010350 -0.341550 0.007539 - 0.175950 -0.341550 0.007539 - 0.341550 -0.341550 0.007539 diff --git a/MICADO/FITS_extra_keywords.yaml b/MICADO/FITS_extra_keywords.yaml index e25ad65d..427bdbb2 100644 --- a/MICADO/FITS_extra_keywords.yaml +++ b/MICADO/FITS_extra_keywords.yaml @@ -3,7 +3,7 @@ MJD-OBS: "!OBS.mjdobs" RA: "!OBS.ra" DEC: "!OBS.dec" - INSTRUME: "" + INSTRUME: "MICADO" HIERARCH: ESO: DPR: @@ -13,15 +13,48 @@ DET: DIT: "!OBS.dit" NDIT: "!OBS.ndit" + NEXP: 1 READOUT: "CDS" + SUBARRAY: "FULL" INS: + MODE: + NAME: "!OBS.fits_ins_mode" + MASK: + NAME: "!OBS.fits_ins_mask" + SLIT: + NAME: "!OBS.fits_ins_slit" + CORO: + NAME: "!OBS.fits_ins_coro" + STOP: + NAME: "!OBS.fits_ins_stop" + FILT: + NAME: "!OBS.fits_ins_filt" FILT1: NAME: "!OBS.filter_name_fw1" FILT2: NAME: "!OBS.filter_name_fw2" - # STOP: - # NAME: "!OBS.filter_name_fw2" - DROT: 0 + DROT: + MODE: "SKY" + POSANG: 0.0 + AVG: 0.0 + BEGIN: 0.0 + END: 0.0 + OPTI1: + NAME: "OPEN" + LAMP1: + ST: "OFF" + LAMP2: + ST: "OFF" + LAMP3: + ST: "OFF" + LAMP4: + ST: "OFF" + LAMP5: + ST: "OFF" + LAMP6: + ST: "OFF" + LAMP7: + ST: "OFF" TPL: START: "!OBS.tplstart" EXPNO: "!OBS.tplexpno" @@ -29,6 +62,7 @@ TPLNO: "!OBS.tplno" INSTRUME: "MICADO" NAME: "!OBS.obsname" + MODE: "!OBS.obs_mode" WISE: ATM: LOCATION: "!ATMO.location" @@ -53,12 +87,11 @@ WUNIT: "#skycalc_atmosphere.wunit" WGRIDMOD: "#skycalc_atmosphere.wgrid_mode" INS: - MODE: "IMAGING" + MODE: "!OBS.ins_mode" NAME: "MICADO" TEMPERAT: "!INST.temperature" FILT: - # TODO: do something sensible for INS FILT NAME? - NAME: "open" + NAME: "!OBS.fits_ins_filt" FILT1: MINIMUM_: "#filter_wheel_1.minimum_throughput" OUTER: "#filter_wheel_1.outer" @@ -112,6 +145,6 @@ ALL: "#border_reference_pixels.all" - ext_type: ImageHDU keywords: - INHERIT: "T" - # Will resolve to e.g. DET1.DATA, DET2.DATA etc., as required by ESO. - EXTNAME: "DET§.DATA" + INHERIT: true + # Will resolve to e.g. DET1.IMG, DET2.IMG etc., as required by ESO. + EXTNAME: "DET§.IMG" diff --git a/MICADO/MICADO_IMG_HCI.yaml b/MICADO/MICADO_IMG_HCI.yaml index bb94a553..7aebcd2b 100644 --- a/MICADO/MICADO_IMG_HCI.yaml +++ b/MICADO/MICADO_IMG_HCI.yaml @@ -25,3 +25,15 @@ effects : class: CoronagraphPSF kwargs: filename: None + +### set observation mode +--- +object: observation +alias : OBS +name : MICADO_IMG_HCI + +properties : + obs_mode: "IMG_HCI" + fits_ins_mode: "LRI" + fits_ins_coro: "CLC-15" + fits_ins_mask: "HighContrast" \ No newline at end of file diff --git a/MICADO/MICADO_IMG_wide.yaml b/MICADO/MICADO_IMG_wide.yaml index 03a10e06..66c030e4 100644 --- a/MICADO/MICADO_IMG_wide.yaml +++ b/MICADO/MICADO_IMG_wide.yaml @@ -31,3 +31,13 @@ effects : efficiency: 1 wave_mid: "!SIM.spectral.wave_mid" quick_adc: True + +### set observation mode +--- +object: observation +alias : OBS +name : MICADO_IMG_LR + +properties : + obs_mode: "IMG_4mas" + fits_ins_mode: "LRI" \ No newline at end of file diff --git a/MICADO/MICADO_IMG_zoom.yaml b/MICADO/MICADO_IMG_zoom.yaml index 8288439f..9ccd97f7 100644 --- a/MICADO/MICADO_IMG_zoom.yaml +++ b/MICADO/MICADO_IMG_zoom.yaml @@ -31,3 +31,13 @@ effects : wave_mid: "!SIM.spectral.wave_mid" efficiency: 1 quick_adc: True + +### set observation mode +--- +object: observation +alias : OBS +name : MICADO_IMG_HR + +properties : + obs_mode: "IMG_1.5mas" + fits_ins_mode: "HRI" \ No newline at end of file diff --git a/MICADO/MICADO_SPEC.yaml b/MICADO/MICADO_SPEC.yaml index 92c84f35..dad84b46 100644 --- a/MICADO/MICADO_SPEC.yaml +++ b/MICADO/MICADO_SPEC.yaml @@ -48,3 +48,14 @@ properties: spectral: spectral_bin_width: 2.e-5 # microns, defines fov wavelengths spectral_resolution: 5000 # defines skycalc resolution + +### set observation mode +--- +object: observation +alias : OBS +name : SPEC + +properties : + obs_mode: "SPEC" + fits_ins_mode: "SPE" + fits_ins_mask: "" \ No newline at end of file diff --git a/MICADO/MICADO_Standalone_RO.yaml b/MICADO/MICADO_Standalone_RO.yaml index e82b795b..112106b4 100644 --- a/MICADO/MICADO_Standalone_RO.yaml +++ b/MICADO/MICADO_Standalone_RO.yaml @@ -38,3 +38,12 @@ effects : # include : False # kwargs: # filename : None + +### set instrument mode +--- +object: observation +alias : OBS +name : SCAO + +properties : + ins_mode: "SCAO" \ No newline at end of file diff --git a/MICADO/default.yaml b/MICADO/default.yaml index 447e0cba..f7a79f1b 100644 --- a/MICADO/default.yaml +++ b/MICADO/default.yaml @@ -7,10 +7,12 @@ name: MICADO_default_configuration description: default parameters needed for a MICADO simulation status: development needs_scopesim: "v0.10.0b4" -date_modified: 2025-06-27 +date_modified: 2025-10-09 changes: - 2023-07-13 (OC) add modes for FDR slits, deprecate pre-FDR slits - 2025-06-27 (FH) add needs_scopesim keyword + - 2025-10-09 (OC) proper MJD value + - 2025-10-17 (JB) add parametes for FITS keywords, tplstart as MJD packages: - Armazones @@ -37,13 +39,20 @@ properties : tech : IMAGE type : OBJECT # Should be datetimes, but is copied verbatim, so should work. - mjdobs : "2022-05-04T02:30:00" - tplstart : "2022-05-04T02:30:00" + mjdobs : 61529.104 + tplstart : 61529.104 tplexpno : 0 tplno : 0 obsname : "MyScienceTest" ra : 0.0 dec : 0.0 + # default FITS parameters + fits_ins_mode: "LRI" + fits_ins_mask: "Large" + fits_ins_slit: "" + fits_ins_coro: "" + fits_ins_stop: "" + fits_ins_filt: "" mode_yamls : - object : instrument @@ -59,6 +68,8 @@ mode_yamls : description : "MCAO optical system" yamls : - MORFEO.yaml + properties : + ins_mode: "MCAO" - object : observation alias: OBS @@ -71,6 +82,7 @@ mode_yamls : filter_name_fw1: open filter_name_fw2: Ks filter_name_pupil: open + fits_ins_filt: Ks - object : observation alias: OBS @@ -83,6 +95,7 @@ mode_yamls : filter_name_fw1: open filter_name_fw2: Ks filter_name_pupil: open + fits_ins_filt: Ks - object : observation alias: OBS @@ -102,9 +115,11 @@ mode_yamls : properties : trace_file : TRACE_MICADO.fits slit_file : MASK_slit_15000x20.dat - filter_name_fw1: Spec_HK - filter_name_fw2: open - filter_name_pupil: open + filter_name_fw1 : Spec_HK + filter_name_fw2 : open + filter_name_pupil : open + fits_ins_filt : Spec_HK + fits_ins_slit : "Long" - object : observation alias: OBS @@ -116,9 +131,11 @@ mode_yamls : properties : trace_file : TRACE_MICADO.fits slit_file : MASK_slit_3000x48.dat - filter_name_fw1: Spec_HK - filter_name_fw2: open - filter_name_pupil: open + filter_name_fw1 : Spec_HK + filter_name_fw2 : open + filter_name_pupil : open + fits_ins_filt : Spec_HK + fits_ins_slit : "Wide" - object : observation alias : OBS @@ -133,6 +150,8 @@ mode_yamls : filter_name_fw1 : Spec_IJ filter_name_fw2 : open filter_name_pupil : open + fits_ins_filt : Spec_IJ + fits_ins_slit : "Short" - object : observation alias: OBS @@ -151,6 +170,8 @@ mode_yamls : filter_name_fw1: Spec_HK filter_name_fw2: open filter_name_pupil: open + fits_ins_filt : Spec_HK + fits_ins_slit : "Long" - object : observation alias: OBS @@ -169,6 +190,8 @@ mode_yamls : filter_name_fw1: Spec_HK filter_name_fw2: open filter_name_pupil: open + fits_ins_filt : Spec_HK + fits_ins_slit : "Wide" - object : observation alias: OBS @@ -187,7 +210,8 @@ mode_yamls : filter_name_fw1: Spec_HK filter_name_fw2: open filter_name_pupil: open - + fits_ins_filt : Spec_HK + fits_ins_slit : "Short" --- ### default simulation parameters needed for a MICADO simulation diff --git a/MICADO/test_micado/test_micado_fits_headers.py b/MICADO/test_micado/test_micado_fits_headers.py index db0a134a..50f400d4 100644 --- a/MICADO/test_micado/test_micado_fits_headers.py +++ b/MICADO/test_micado/test_micado_fits_headers.py @@ -16,4 +16,4 @@ def test_extension_incremental_headers_count_up(self): for i, hdu in enumerate(hdul): if isinstance(hdu, fits.ImageHDU): - assert hdu.header["EXTNAME"] == f"DET{i}.DATA" + assert hdu.header["EXTNAME"] == f"DET{i}.IMG" diff --git a/MOSAIC/FPA_linearity_HxRG.dat b/MOSAIC/FPA_linearity_HxRG.dat new file mode 100644 index 00000000..8905e5ed --- /dev/null +++ b/MOSAIC/FPA_linearity_HxRG.dat @@ -0,0 +1,17 @@ +# name : HAWAII-2RG linearity curve +# author : Oliver Czoske +# sources: E-TNT-MPIA-MET-1004 +# date_created : 2021-04-01 +# date_modified : 2021-04-01 +# type : detector:linearity +# status : rough guess +# incident_unit : ph +# measured_unit : ph +# ndit : 1 +# +# changes : +# +incident measured +0 0 +1e5 1e5 +1e99 1e5 diff --git a/MOSAIC/FPA_mosaic_NIR_layout.dat b/MOSAIC/FPA_mosaic_NIR_layout.dat new file mode 100644 index 00000000..0c2ba100 --- /dev/null +++ b/MOSAIC/FPA_mosaic_NIR_layout.dat @@ -0,0 +1,19 @@ +# name: MOSAIC VIS NIR FPA +# author: Oliver Czoske +# sources: NIRspec-20250804.pptx, Ana Perez +# date_created: 2025-08-08 +# date_modified: 2025-08-08 +# x_cen_unit: mm +# y_cen_unit: mm +# x_size_unit: pix +# y_size_unit: pix +# pixel_size_unit: mm +# angle_unit: deg +# gain_unit: electron/adu +# image_plane_id: 0 +# +# changes: +# - 2025-08-08 (OC) initialised +# +id x_cen y_cen x_size y_size pixel_size angle gain + 0 0 0 4096 4096 0.015 0.0 1.0 diff --git a/MOSAIC/FPA_mosaic_VIS_layout.dat b/MOSAIC/FPA_mosaic_VIS_layout.dat new file mode 100644 index 00000000..eaebc425 --- /dev/null +++ b/MOSAIC/FPA_mosaic_VIS_layout.dat @@ -0,0 +1,19 @@ +# name: MOSAIC VIS B/R FPA (simple version) +# author: Oliver Czoske +# sources: E-MOS-SYS-ANR-0063-V20_VIS_OptDesign_preSAR.pdf, adapted +# date_created: 2025-07-17 +# date_modified: 2025-07-17 +# x_cen_unit: mm +# y_cen_unit: mm +# x_size_unit: pix +# y_size_unit: pix +# pixel_size_unit: mm +# angle_unit: deg +# gain_unit: electron/adu +# image_plane_id: 0 +# +# changes: +# - 2025-07-17 (OC) initialised +# +id x_cen y_cen x_size y_size pixel_size angle gain + 0 0 0 13000 160 0.015 0.0 1.0 diff --git a/MOSAIC/MOSAIC_DET_NIR.yaml b/MOSAIC/MOSAIC_DET_NIR.yaml new file mode 100644 index 00000000..f0513bc3 --- /dev/null +++ b/MOSAIC/MOSAIC_DET_NIR.yaml @@ -0,0 +1,107 @@ +### H4RG DETECTOR +object: detector +alias: DET +name: MOSAIC_DET_NIR +description: H4RG detector 2.5 um cut-off +date_modified: 2025-08-07 +changes: + - 2025-08-07 (OC) adapted from MICADO H4RG +properties: + detector: HAWAII4RG + image_plane_id: 0 + temperature: -230 # [deg Celsius] + dit: "!OBS.dit" + ndit: "!OBS.ndit" + read_noise: 12 # [e rms] from MICADO + dark_current: 0.05 # [e/s] conservative + gain: 2.5 # [e/ADU] estimate + full_well: 1.e+5 # [e] + mindit: 1.3 # [s] + layout: + file_name: "FPA_mosaic_NIR_layout.dat" + qe_curve: + file_name: "QE_detector_NIR.dat" + linearity: + file_name: "FPA_linearity_HxRG.dat" + +effects: + - name: detector_array + description: MOSAIC NIR detector array + class: DetectorList + kwargs: + filename: "!DET.layout.file_name" + + - name: qe_curve + description: Quantum efficiency curves for H4RG detector + class: QuantumEfficiencyCurve + kwargs: + filename: "!DET.qe_curve.file_name" + + - name: auto_exposure + description: automatic determination of DIT and NDIT + class: AutoExposure + include: true + kwargs: + fill_frac: 0.75 #"!OBS.auto_exposure.fill_frac" + full_well: "!DET.full_well" + mindit: "!DET.mindit" + + - name: exposure_integration + description: Summing up sky signal for all DITs and NDITs + class: ExposureIntegration + + - name: dark_current + description: MICADO dark current + class: DarkCurrent + kwargs: + value: "!DET.dark_current" + + - name: shot_noise + description: apply poisson shot noise to images + class: ShotNoise + + - name: detector_linearity + description: Linearity characteristics of H4RG chips + class: LinearityCurve + kwargs: + filename: "!DET.linearity.file_name" + + - name: border_reference_pixels + description: Blanks the signal on N edge row and column pixels + class: ReferencePixelBorder + kwargs: + all: 0 + + - name: readout_noise + description: Readout noise frames + class: BasicReadoutNoise + kwargs: + noise_std: "!DET.read_noise" + n_channels: 64 + + - name: exposure_output + description: Return average or sum over NDIT subexposures + class: ExposureOutput + kwargs: + mode: sum + + - name: ad_conversion + description: Apply gain and convert electron counts into integers + class: ADConversion + kwargs: + dtype: float32 + gain: "!DET.gain" + + - name: collapse_1d + description: Collapse fiber bundle to 1D spectrum + class: MosaicCollapseSpectralTraces + include: "!OBS.do_collapse_1d" + kwargs: + filename: "!OBS.trace_file" + +# - name: det_nir_fits_keywords +# description: FITS keywords specific to NIR detector +# class: ExtraFitsKeywords +# include: true +# kwargs: +# filename: headers/FITS_det_nir_keywords.yaml diff --git a/MOSAIC/MOSAIC_DET_VIS.yaml b/MOSAIC/MOSAIC_DET_VIS.yaml new file mode 100644 index 00000000..ee8fb79e --- /dev/null +++ b/MOSAIC/MOSAIC_DET_VIS.yaml @@ -0,0 +1,71 @@ +--- +### MOSAIC VISUAL detector (simple) +object: detector +alias: DET +name: MOSAIC_DET_VIS +description: virtual detector for one fiber bundle +data_modified: 2025-10-24 + + +properties: + detector: MOSAIC_DET_VIS + image_plane_id: 0 + temperature: -230 + dit: "!OBS.exptime" + ndit: 1 # this is a CCD which should only know exptime + gain: 1.0 + dark_current: 0.005 # e/s per fibre. E-MOS-SYS-ANR-0063: 3 e/hr/pixel + # assume about 6 pixels per fibre + readout_noise: 7. # e per read (E-MOS-SYS-ANR-0063_2-0: 2.5 + # scaled by sqrt(6) (pixels per fibre) + layout: + file_name: "FPA_mosaic_VIS_layout.dat" + qe_curve: + file_name: "QE_VIS_ML2_depleted.dat" + +effects: + - name: detector_array + description: MOSAIC VIS detector array list + class: DetectorList + kwargs: + filename: "!DET.layout.file_name" + + - name: quantum_efficiency + description: Quantum efficiency curves for each detector + class: QuantumEfficiencyCurve + kwargs: + filename: "!DET.qe_curve.file_name" + + - name: exposure_integration + description: Summing up sky signal for all DITs and NDITs + class: ExposureIntegration + + - name: dark_current + description: Dark current + class: DarkCurrent + kwargs: + value: "!DET.dark_current" + + - name: shot_noise + description: apply poisson shot noise to images + class: ShotNoise + + - name: readout_noise + description: Readout noise + class: BasicReadoutNoise + kwargs: + noise_std: "!DET.readout_noise" + n_channels: 2 + + - name: ad_conversion + description: Apply gain and convert electron counts + class: ADConversion + kwargs: + dtype: float32 + gain: "!DET.gain" + + - name: collapse_1d + description: Collapse fiber bundle to 1D spectrum + class: MosaicCollapseSpectralTraces + kwargs: + filename: "!OBS.trace_file" diff --git a/MOSAIC/MOSAIC_NIR.yaml b/MOSAIC/MOSAIC_NIR.yaml new file mode 100644 index 00000000..468627aa --- /dev/null +++ b/MOSAIC/MOSAIC_NIR.yaml @@ -0,0 +1,52 @@ +--- +### MOSAIC near-infrared arm + +object: instrument +alias: INST +name: MOSAIC +description: base configuration for MOSAIC NIR +date_modified: 2025-09-01 +changes: + - 2025-09-01 (OC) add line-spread function + + +properties: + pixel_scale: 0.01 # not sure what this means for a fibre spectrograph + plate_scale: 0.5 # -"- + temperature: -206 # TBC + +effects: + - name: fibre transmission + class: TERCurve + kwargs: + filename: "!OBS.fibre_ter_file" + + - name: spectrograph transmission + class: TERCurve + kwargs: + filename: "!OBS.spec_ter_file" + + - name: psf + description: Seeing limited PSF + class: SeeingPSF + kwargs: + fwhm: "!OBS.psf_fwhm" # [arcsec] + + - name: lsf + description: Line-spread function + class: LineSpreadFunction + kwargs: + lsfwidth: 2.75 # 41 um on 15um pixels (NIRspec-20250804.pptx) + + - name: fiber_bundle + description: field of view of fiber bundle + class: MetisLMSImageSlicer + kwargs: + filename: "!OBS.trace_file" + ext_id: "Aperture List" + + - name: spectral_traces + description: mapping of spectra onto the detector + class: MosaicSpectralTraceList + kwargs: + filename: "!OBS.trace_file" diff --git a/MOSAIC/MOSAIC_VIS.yaml b/MOSAIC/MOSAIC_VIS.yaml new file mode 100644 index 00000000..4325744d --- /dev/null +++ b/MOSAIC/MOSAIC_VIS.yaml @@ -0,0 +1,47 @@ +--- +### MOSAIC visual arm + +object: instrument +alias: INST +name: MOSAIC +description: base configuration for MOSAIC VIS +date_modified: 2025-09-01 +changes: + - 2025-09-01 (OC) add line-spread function + + +properties: + pixel_scale: 0.01 # not sure what this means for a fibre spectrograph + plate_scale: 0.5 # -"- + temperature: -206 # TBC + +effects: + - name: system transmission + class: TERCurve + kwargs: + filename: "!OBS.ter_file" + + - name: psf + description: Seeing limited PSF + class: SeeingPSF + kwargs: + fwhm: "!OBS.psf_fwhm" # [arcsec] + + - name: lsf + description: Line-spread function + class: LineSpreadFunction + kwargs: + lsfwidth: 4.5 # rough guess, E-MOS-SYS-ANR-0063-V20_VIS_OptDesign_preSAR.pdf + + - name: fiber_bundle + description: field of view of fiber bundle + class: MetisLMSImageSlicer + kwargs: + filename: "!OBS.trace_file" + ext_id: "Aperture List" + + - name: spectral_traces + description: mapping of spectra onto the detector + class: MosaicSpectralTraceList + kwargs: + filename: "!OBS.trace_file" diff --git a/MOSAIC/QE_VIS_ML2_depleted.dat b/MOSAIC/QE_VIS_ML2_depleted.dat new file mode 100644 index 00000000..4fddd721 --- /dev/null +++ b/MOSAIC/QE_VIS_ML2_depleted.dat @@ -0,0 +1,21 @@ +# name: ML2 deep depleted CCD QE +# author: Kieran Leschinski +# sources: E-MOS-SYS-ANR-0063-V20_VIS_OptDesign_preSAR.pdf, adapted +# date_created: 2025-07-18 +# date_modified: 2025-07-18 +# status : estimate +# action : transmission +# wavelength_unit : um +# +# changes: +# - 2025-07-18 (KL) initialised +# +wavelength transmission +0.3 0.25 +0.4 0.9 +0.6 0.9 +0.75 0.92 +0.8 0.9 +0.85 0.8 +1.0 0.12 +1.05 0 \ No newline at end of file diff --git a/MOSAIC/QE_VIS_ML2_standard.dat b/MOSAIC/QE_VIS_ML2_standard.dat new file mode 100644 index 00000000..4beda69d --- /dev/null +++ b/MOSAIC/QE_VIS_ML2_standard.dat @@ -0,0 +1,20 @@ +# name: ML2 Standard CCD QE +# author: Kieran Leschinski +# sources: E-MOS-SYS-ANR-0063-V20_VIS_OptDesign_preSAR.pdf, adapted +# date_created: 2025-07-18 +# date_modified: 2025-07-18 +# status : estimate +# action : transmission +# wavelength_unit : um +# +# changes: +# - 2025-07-18 (KL) initialised +# +wavelength transmission +0.3 0.25 +0.4 0.9 +0.65 0.9 +0.75 0.8 +0.93 0.2 +1.0 0.05 +1.05 0 \ No newline at end of file diff --git a/MOSAIC/QE_detector_NIR.dat b/MOSAIC/QE_detector_NIR.dat new file mode 100644 index 00000000..8def421a --- /dev/null +++ b/MOSAIC/QE_detector_NIR.dat @@ -0,0 +1,50 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-07 +# status: pre-PDR +# wavelength_unit: um +# description: H4RG detector QE +# comment: value 1.547 um changed from 0.930 to 0.934 +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# +wavelength transmission +0.950 0.826 +0.975 0.834 +1.000 0.842 +1.025 0.849 +1.050 0.855 +1.075 0.861 +1.100 0.866 +1.125 0.869 +1.150 0.872 +1.175 0.875 +1.200 0.878 +1.225 0.881 +1.250 0.884 +1.275 0.887 +1.300 0.893 +1.325 0.903 +1.340 0.912 +1.430 0.927 +1.450 0.930 +1.475 0.934 +1.500 0.936 +1.522 0.935 +1.525 0.935 +1.547 0.934 +1.550 0.934 +1.572 0.933 +1.575 0.933 +1.597 0.932 +1.600 0.932 +1.622 0.931 +1.625 0.931 +1.650 0.930 +1.675 0.928 +1.700 0.926 +1.725 0.924 +1.750 0.923 +1.775 0.923 +1.800 0.923 diff --git a/MOSAIC/TER_grating_VIS_LR_B.dat b/MOSAIC/TER_grating_VIS_LR_B.dat new file mode 100644 index 00000000..d9b78462 --- /dev/null +++ b/MOSAIC/TER_grating_VIS_LR_B.dat @@ -0,0 +1,1017 @@ +# author: Oliver Czoske +# source: E-MOS-SYS-ANR-0063-V20, fit to Fig. 4.1 +# date_created: 2025-07-17 +# date_modified: 2025-07-17 +# status: specification +# wavelength_unit: nm +# description: fit to figure, green line Eavg +# comment: +# - fit function is sinc + linear +# - A np.sinc((wave - wavec)/width) + a * (wave - wavec) +# - A = 0.85 +# - wavec = 486.7 +# - width = 200 +# - a = 5e-4 +# +wave efficiency +380.00 0.4510 +380.22 0.4523 +380.44 0.4537 +380.66 0.4550 +380.88 0.4563 +381.10 0.4576 +381.32 0.4590 +381.54 0.4603 +381.76 0.4616 +381.98 0.4630 +382.20 0.4643 +382.42 0.4656 +382.64 0.4669 +382.86 0.4682 +383.08 0.4696 +383.30 0.4709 +383.52 0.4722 +383.74 0.4735 +383.96 0.4748 +384.18 0.4762 +384.40 0.4775 +384.62 0.4788 +384.84 0.4801 +385.06 0.4814 +385.28 0.4827 +385.50 0.4840 +385.72 0.4853 +385.94 0.4866 +386.16 0.4879 +386.38 0.4892 +386.60 0.4905 +386.82 0.4918 +387.04 0.4931 +387.26 0.4944 +387.48 0.4957 +387.70 0.4970 +387.92 0.4983 +388.14 0.4996 +388.36 0.5009 +388.58 0.5022 +388.80 0.5035 +389.02 0.5048 +389.24 0.5061 +389.46 0.5073 +389.68 0.5086 +389.90 0.5099 +390.12 0.5112 +390.34 0.5125 +390.56 0.5137 +390.78 0.5150 +391.00 0.5163 +391.22 0.5176 +391.44 0.5188 +391.66 0.5201 +391.88 0.5214 +392.10 0.5227 +392.32 0.5239 +392.54 0.5252 +392.76 0.5265 +392.98 0.5277 +393.20 0.5290 +393.42 0.5302 +393.64 0.5315 +393.86 0.5328 +394.08 0.5340 +394.30 0.5353 +394.52 0.5365 +394.74 0.5378 +394.96 0.5390 +395.18 0.5403 +395.40 0.5415 +395.62 0.5428 +395.84 0.5440 +396.06 0.5452 +396.28 0.5465 +396.50 0.5477 +396.72 0.5490 +396.94 0.5502 +397.16 0.5514 +397.38 0.5527 +397.60 0.5539 +397.82 0.5551 +398.04 0.5564 +398.26 0.5576 +398.48 0.5588 +398.70 0.5600 +398.92 0.5612 +399.14 0.5625 +399.36 0.5637 +399.58 0.5649 +399.80 0.5661 +400.02 0.5673 +400.24 0.5685 +400.46 0.5697 +400.68 0.5710 +400.90 0.5722 +401.12 0.5734 +401.34 0.5746 +401.56 0.5758 +401.78 0.5770 +402.00 0.5782 +402.22 0.5794 +402.44 0.5806 +402.66 0.5817 +402.88 0.5829 +403.10 0.5841 +403.32 0.5853 +403.54 0.5865 +403.76 0.5877 +403.98 0.5889 +404.20 0.5900 +404.42 0.5912 +404.64 0.5924 +404.86 0.5936 +405.08 0.5947 +405.30 0.5959 +405.52 0.5971 +405.74 0.5982 +405.96 0.5994 +406.18 0.6006 +406.40 0.6017 +406.62 0.6029 +406.84 0.6040 +407.06 0.6052 +407.28 0.6063 +407.50 0.6075 +407.72 0.6086 +407.94 0.6098 +408.16 0.6109 +408.38 0.6121 +408.60 0.6132 +408.82 0.6144 +409.04 0.6155 +409.26 0.6166 +409.48 0.6178 +409.70 0.6189 +409.92 0.6200 +410.14 0.6212 +410.36 0.6223 +410.58 0.6234 +410.80 0.6245 +411.02 0.6256 +411.24 0.6268 +411.46 0.6279 +411.68 0.6290 +411.90 0.6301 +412.12 0.6312 +412.34 0.6323 +412.56 0.6334 +412.78 0.6345 +413.00 0.6356 +413.22 0.6367 +413.44 0.6378 +413.66 0.6389 +413.88 0.6400 +414.10 0.6411 +414.32 0.6422 +414.54 0.6432 +414.76 0.6443 +414.98 0.6454 +415.20 0.6465 +415.42 0.6476 +415.64 0.6486 +415.86 0.6497 +416.08 0.6508 +416.30 0.6518 +416.52 0.6529 +416.74 0.6540 +416.96 0.6550 +417.18 0.6561 +417.40 0.6571 +417.62 0.6582 +417.84 0.6593 +418.06 0.6603 +418.28 0.6614 +418.50 0.6624 +418.72 0.6634 +418.94 0.6645 +419.16 0.6655 +419.38 0.6666 +419.60 0.6676 +419.82 0.6686 +420.04 0.6696 +420.26 0.6707 +420.48 0.6717 +420.70 0.6727 +420.92 0.6737 +421.14 0.6747 +421.36 0.6758 +421.58 0.6768 +421.80 0.6778 +422.02 0.6788 +422.24 0.6798 +422.46 0.6808 +422.68 0.6818 +422.90 0.6828 +423.12 0.6838 +423.34 0.6848 +423.56 0.6858 +423.78 0.6868 +424.00 0.6877 +424.22 0.6887 +424.44 0.6897 +424.66 0.6907 +424.88 0.6917 +425.10 0.6926 +425.32 0.6936 +425.54 0.6946 +425.76 0.6955 +425.98 0.6965 +426.20 0.6975 +426.42 0.6984 +426.64 0.6994 +426.86 0.7003 +427.08 0.7013 +427.30 0.7022 +427.52 0.7032 +427.74 0.7041 +427.96 0.7051 +428.18 0.7060 +428.40 0.7069 +428.62 0.7079 +428.84 0.7088 +429.06 0.7097 +429.28 0.7106 +429.50 0.7116 +429.72 0.7125 +429.94 0.7134 +430.16 0.7143 +430.38 0.7152 +430.60 0.7161 +430.82 0.7170 +431.04 0.7179 +431.26 0.7188 +431.48 0.7197 +431.70 0.7206 +431.92 0.7215 +432.14 0.7224 +432.36 0.7233 +432.58 0.7242 +432.80 0.7251 +433.02 0.7260 +433.24 0.7268 +433.46 0.7277 +433.68 0.7286 +433.90 0.7294 +434.12 0.7303 +434.34 0.7312 +434.56 0.7320 +434.78 0.7329 +435.00 0.7338 +435.22 0.7346 +435.44 0.7355 +435.66 0.7363 +435.88 0.7371 +436.10 0.7380 +436.32 0.7388 +436.54 0.7397 +436.76 0.7405 +436.98 0.7413 +437.20 0.7422 +437.42 0.7430 +437.64 0.7438 +437.86 0.7446 +438.08 0.7454 +438.30 0.7463 +438.52 0.7471 +438.74 0.7479 +438.96 0.7487 +439.18 0.7495 +439.40 0.7503 +439.62 0.7511 +439.84 0.7519 +440.06 0.7527 +440.28 0.7534 +440.50 0.7542 +440.72 0.7550 +440.94 0.7558 +441.16 0.7566 +441.38 0.7573 +441.60 0.7581 +441.82 0.7589 +442.04 0.7596 +442.26 0.7604 +442.48 0.7612 +442.70 0.7619 +442.92 0.7627 +443.14 0.7634 +443.36 0.7642 +443.58 0.7649 +443.80 0.7657 +444.02 0.7664 +444.24 0.7671 +444.46 0.7679 +444.68 0.7686 +444.90 0.7693 +445.12 0.7701 +445.34 0.7708 +445.56 0.7715 +445.78 0.7722 +446.00 0.7729 +446.22 0.7736 +446.44 0.7743 +446.66 0.7750 +446.88 0.7757 +447.10 0.7764 +447.32 0.7771 +447.54 0.7778 +447.76 0.7785 +447.98 0.7792 +448.20 0.7799 +448.42 0.7806 +448.64 0.7812 +448.86 0.7819 +449.08 0.7826 +449.30 0.7832 +449.52 0.7839 +449.74 0.7846 +449.96 0.7852 +450.18 0.7859 +450.40 0.7865 +450.62 0.7872 +450.84 0.7878 +451.06 0.7885 +451.28 0.7891 +451.50 0.7897 +451.72 0.7904 +451.94 0.7910 +452.16 0.7916 +452.38 0.7923 +452.60 0.7929 +452.82 0.7935 +453.04 0.7941 +453.26 0.7947 +453.48 0.7953 +453.70 0.7959 +453.92 0.7965 +454.14 0.7971 +454.36 0.7977 +454.58 0.7983 +454.80 0.7989 +455.02 0.7995 +455.24 0.8001 +455.46 0.8007 +455.68 0.8013 +455.90 0.8018 +456.12 0.8024 +456.34 0.8030 +456.56 0.8035 +456.78 0.8041 +457.00 0.8047 +457.22 0.8052 +457.44 0.8058 +457.66 0.8063 +457.88 0.8069 +458.10 0.8074 +458.32 0.8079 +458.54 0.8085 +458.76 0.8090 +458.98 0.8095 +459.20 0.8101 +459.42 0.8106 +459.64 0.8111 +459.86 0.8116 +460.08 0.8121 +460.30 0.8126 +460.52 0.8132 +460.74 0.8137 +460.96 0.8142 +461.18 0.8147 +461.40 0.8152 +461.62 0.8156 +461.84 0.8161 +462.06 0.8166 +462.28 0.8171 +462.50 0.8176 +462.72 0.8181 +462.94 0.8185 +463.16 0.8190 +463.38 0.8195 +463.60 0.8199 +463.82 0.8204 +464.04 0.8208 +464.26 0.8213 +464.48 0.8217 +464.70 0.8222 +464.92 0.8226 +465.14 0.8231 +465.36 0.8235 +465.58 0.8239 +465.80 0.8244 +466.02 0.8248 +466.24 0.8252 +466.46 0.8256 +466.68 0.8260 +466.90 0.8265 +467.12 0.8269 +467.34 0.8273 +467.56 0.8277 +467.78 0.8281 +468.00 0.8285 +468.22 0.8289 +468.44 0.8293 +468.66 0.8296 +468.88 0.8300 +469.10 0.8304 +469.32 0.8308 +469.54 0.8312 +469.76 0.8315 +469.98 0.8319 +470.20 0.8323 +470.42 0.8326 +470.64 0.8330 +470.86 0.8333 +471.08 0.8337 +471.30 0.8340 +471.52 0.8344 +471.74 0.8347 +471.96 0.8351 +472.18 0.8354 +472.40 0.8357 +472.62 0.8360 +472.84 0.8364 +473.06 0.8367 +473.28 0.8370 +473.50 0.8373 +473.72 0.8376 +473.94 0.8379 +474.16 0.8382 +474.38 0.8385 +474.60 0.8388 +474.82 0.8391 +475.04 0.8394 +475.26 0.8397 +475.48 0.8400 +475.70 0.8403 +475.92 0.8406 +476.14 0.8408 +476.36 0.8411 +476.58 0.8414 +476.80 0.8416 +477.02 0.8419 +477.24 0.8421 +477.46 0.8424 +477.68 0.8426 +477.90 0.8429 +478.12 0.8431 +478.34 0.8434 +478.56 0.8436 +478.78 0.8438 +479.00 0.8441 +479.22 0.8443 +479.44 0.8445 +479.66 0.8447 +479.88 0.8450 +480.10 0.8452 +480.32 0.8454 +480.54 0.8456 +480.76 0.8458 +480.98 0.8460 +481.20 0.8462 +481.42 0.8464 +481.64 0.8466 +481.86 0.8468 +482.08 0.8469 +482.30 0.8471 +482.52 0.8473 +482.74 0.8475 +482.96 0.8476 +483.18 0.8478 +483.40 0.8480 +483.62 0.8481 +483.84 0.8483 +484.06 0.8484 +484.28 0.8486 +484.50 0.8487 +484.72 0.8489 +484.94 0.8490 +485.16 0.8491 +485.38 0.8493 +485.60 0.8494 +485.82 0.8495 +486.04 0.8497 +486.26 0.8498 +486.48 0.8499 +486.70 0.8500 +486.92 0.8501 +487.14 0.8502 +487.36 0.8503 +487.58 0.8504 +487.80 0.8505 +488.02 0.8506 +488.24 0.8507 +488.46 0.8508 +488.68 0.8509 +488.90 0.8509 +489.12 0.8510 +489.34 0.8511 +489.56 0.8511 +489.78 0.8512 +490.00 0.8513 +490.22 0.8513 +490.44 0.8514 +490.66 0.8514 +490.88 0.8515 +491.10 0.8515 +491.32 0.8516 +491.54 0.8516 +491.76 0.8516 +491.98 0.8517 +492.20 0.8517 +492.42 0.8517 +492.64 0.8517 +492.86 0.8518 +493.08 0.8518 +493.30 0.8518 +493.52 0.8518 +493.74 0.8518 +493.96 0.8518 +494.18 0.8518 +494.40 0.8518 +494.62 0.8518 +494.84 0.8518 +495.06 0.8517 +495.28 0.8517 +495.50 0.8517 +495.72 0.8517 +495.94 0.8516 +496.16 0.8516 +496.38 0.8516 +496.60 0.8515 +496.82 0.8515 +497.04 0.8514 +497.26 0.8514 +497.48 0.8513 +497.70 0.8513 +497.92 0.8512 +498.14 0.8512 +498.36 0.8511 +498.58 0.8510 +498.80 0.8509 +499.02 0.8509 +499.24 0.8508 +499.46 0.8507 +499.68 0.8506 +499.90 0.8505 +500.12 0.8504 +500.34 0.8503 +500.56 0.8502 +500.78 0.8501 +501.00 0.8500 +501.22 0.8499 +501.44 0.8498 +501.66 0.8497 +501.88 0.8496 +502.10 0.8494 +502.32 0.8493 +502.54 0.8492 +502.76 0.8490 +502.98 0.8489 +503.20 0.8488 +503.42 0.8486 +503.64 0.8485 +503.86 0.8483 +504.08 0.8482 +504.30 0.8480 +504.52 0.8479 +504.74 0.8477 +504.96 0.8475 +505.18 0.8474 +505.40 0.8472 +505.62 0.8470 +505.84 0.8468 +506.06 0.8466 +506.28 0.8465 +506.50 0.8463 +506.72 0.8461 +506.94 0.8459 +507.16 0.8457 +507.38 0.8455 +507.60 0.8453 +507.82 0.8451 +508.04 0.8448 +508.26 0.8446 +508.48 0.8444 +508.70 0.8442 +508.92 0.8440 +509.14 0.8437 +509.36 0.8435 +509.58 0.8433 +509.80 0.8430 +510.02 0.8428 +510.24 0.8425 +510.46 0.8423 +510.68 0.8420 +510.90 0.8418 +511.12 0.8415 +511.34 0.8413 +511.56 0.8410 +511.78 0.8407 +512.00 0.8405 +512.22 0.8402 +512.44 0.8399 +512.66 0.8396 +512.88 0.8393 +513.10 0.8390 +513.32 0.8388 +513.54 0.8385 +513.76 0.8382 +513.98 0.8379 +514.20 0.8376 +514.42 0.8373 +514.64 0.8369 +514.86 0.8366 +515.08 0.8363 +515.30 0.8360 +515.52 0.8357 +515.74 0.8353 +515.96 0.8350 +516.18 0.8347 +516.40 0.8344 +516.62 0.8340 +516.84 0.8337 +517.06 0.8333 +517.28 0.8330 +517.50 0.8326 +517.72 0.8323 +517.94 0.8319 +518.16 0.8316 +518.38 0.8312 +518.60 0.8308 +518.82 0.8305 +519.04 0.8301 +519.26 0.8297 +519.48 0.8293 +519.70 0.8289 +519.92 0.8286 +520.14 0.8282 +520.36 0.8278 +520.58 0.8274 +520.80 0.8270 +521.02 0.8266 +521.24 0.8262 +521.46 0.8258 +521.68 0.8254 +521.90 0.8249 +522.12 0.8245 +522.34 0.8241 +522.56 0.8237 +522.78 0.8233 +523.00 0.8228 +523.22 0.8224 +523.44 0.8220 +523.66 0.8215 +523.88 0.8211 +524.10 0.8206 +524.32 0.8202 +524.54 0.8197 +524.76 0.8193 +524.98 0.8188 +525.20 0.8184 +525.42 0.8179 +525.64 0.8174 +525.86 0.8170 +526.08 0.8165 +526.30 0.8160 +526.52 0.8156 +526.74 0.8151 +526.96 0.8146 +527.18 0.8141 +527.40 0.8136 +527.62 0.8131 +527.84 0.8126 +528.06 0.8121 +528.28 0.8116 +528.50 0.8111 +528.72 0.8106 +528.94 0.8101 +529.16 0.8096 +529.38 0.8091 +529.60 0.8086 +529.82 0.8080 +530.04 0.8075 +530.26 0.8070 +530.48 0.8065 +530.70 0.8059 +530.92 0.8054 +531.14 0.8048 +531.36 0.8043 +531.58 0.8038 +531.80 0.8032 +532.02 0.8027 +532.24 0.8021 +532.46 0.8016 +532.68 0.8010 +532.90 0.8004 +533.12 0.7999 +533.34 0.7993 +533.56 0.7987 +533.78 0.7982 +534.00 0.7976 +534.22 0.7970 +534.44 0.7964 +534.66 0.7958 +534.88 0.7952 +535.10 0.7947 +535.32 0.7941 +535.54 0.7935 +535.76 0.7929 +535.98 0.7923 +536.20 0.7917 +536.42 0.7910 +536.64 0.7904 +536.86 0.7898 +537.08 0.7892 +537.30 0.7886 +537.52 0.7880 +537.74 0.7873 +537.96 0.7867 +538.18 0.7861 +538.40 0.7855 +538.62 0.7848 +538.84 0.7842 +539.06 0.7835 +539.28 0.7829 +539.50 0.7822 +539.72 0.7816 +539.94 0.7809 +540.16 0.7803 +540.38 0.7796 +540.60 0.7790 +540.82 0.7783 +541.04 0.7776 +541.26 0.7770 +541.48 0.7763 +541.70 0.7756 +541.92 0.7750 +542.14 0.7743 +542.36 0.7736 +542.58 0.7729 +542.80 0.7722 +543.02 0.7715 +543.24 0.7709 +543.46 0.7702 +543.68 0.7695 +543.90 0.7688 +544.12 0.7681 +544.34 0.7674 +544.56 0.7666 +544.78 0.7659 +545.00 0.7652 +545.22 0.7645 +545.44 0.7638 +545.66 0.7631 +545.88 0.7624 +546.10 0.7616 +546.32 0.7609 +546.54 0.7602 +546.76 0.7594 +546.98 0.7587 +547.20 0.7580 +547.42 0.7572 +547.64 0.7565 +547.86 0.7557 +548.08 0.7550 +548.30 0.7542 +548.52 0.7535 +548.74 0.7527 +548.96 0.7520 +549.18 0.7512 +549.40 0.7504 +549.62 0.7497 +549.84 0.7489 +550.06 0.7481 +550.28 0.7474 +550.50 0.7466 +550.72 0.7458 +550.94 0.7450 +551.16 0.7443 +551.38 0.7435 +551.60 0.7427 +551.82 0.7419 +552.04 0.7411 +552.26 0.7403 +552.48 0.7395 +552.70 0.7387 +552.92 0.7379 +553.14 0.7371 +553.36 0.7363 +553.58 0.7355 +553.80 0.7347 +554.02 0.7339 +554.24 0.7331 +554.46 0.7322 +554.68 0.7314 +554.90 0.7306 +555.12 0.7298 +555.34 0.7289 +555.56 0.7281 +555.78 0.7273 +556.00 0.7264 +556.22 0.7256 +556.44 0.7248 +556.66 0.7239 +556.88 0.7231 +557.10 0.7222 +557.32 0.7214 +557.54 0.7206 +557.76 0.7197 +557.98 0.7188 +558.20 0.7180 +558.42 0.7171 +558.64 0.7163 +558.86 0.7154 +559.08 0.7145 +559.30 0.7137 +559.52 0.7128 +559.74 0.7119 +559.96 0.7111 +560.18 0.7102 +560.40 0.7093 +560.62 0.7084 +560.84 0.7075 +561.06 0.7067 +561.28 0.7058 +561.50 0.7049 +561.72 0.7040 +561.94 0.7031 +562.16 0.7022 +562.38 0.7013 +562.60 0.7004 +562.82 0.6995 +563.04 0.6986 +563.26 0.6977 +563.48 0.6968 +563.70 0.6959 +563.92 0.6950 +564.14 0.6941 +564.36 0.6932 +564.58 0.6922 +564.80 0.6913 +565.02 0.6904 +565.24 0.6895 +565.46 0.6886 +565.68 0.6876 +565.90 0.6867 +566.12 0.6858 +566.34 0.6848 +566.56 0.6839 +566.78 0.6830 +567.00 0.6820 +567.22 0.6811 +567.44 0.6801 +567.66 0.6792 +567.88 0.6783 +568.10 0.6773 +568.32 0.6764 +568.54 0.6754 +568.76 0.6744 +568.98 0.6735 +569.20 0.6725 +569.42 0.6716 +569.64 0.6706 +569.86 0.6697 +570.08 0.6687 +570.30 0.6677 +570.52 0.6668 +570.74 0.6658 +570.96 0.6648 +571.18 0.6638 +571.40 0.6629 +571.62 0.6619 +571.84 0.6609 +572.06 0.6599 +572.28 0.6589 +572.50 0.6580 +572.72 0.6570 +572.94 0.6560 +573.16 0.6550 +573.38 0.6540 +573.60 0.6530 +573.82 0.6520 +574.04 0.6510 +574.26 0.6500 +574.48 0.6490 +574.70 0.6480 +574.92 0.6470 +575.14 0.6460 +575.36 0.6450 +575.58 0.6440 +575.80 0.6430 +576.02 0.6420 +576.24 0.6410 +576.46 0.6400 +576.68 0.6389 +576.90 0.6379 +577.12 0.6369 +577.34 0.6359 +577.56 0.6349 +577.78 0.6338 +578.00 0.6328 +578.22 0.6318 +578.44 0.6308 +578.66 0.6297 +578.88 0.6287 +579.10 0.6277 +579.32 0.6266 +579.54 0.6256 +579.76 0.6246 +579.98 0.6235 +580.20 0.6225 +580.42 0.6214 +580.64 0.6204 +580.86 0.6194 +581.08 0.6183 +581.30 0.6173 +581.52 0.6162 +581.74 0.6152 +581.96 0.6141 +582.18 0.6131 +582.40 0.6120 +582.62 0.6109 +582.84 0.6099 +583.06 0.6088 +583.28 0.6078 +583.50 0.6067 +583.72 0.6056 +583.94 0.6046 +584.16 0.6035 +584.38 0.6025 +584.60 0.6014 +584.82 0.6003 +585.04 0.5992 +585.26 0.5982 +585.48 0.5971 +585.70 0.5960 +585.92 0.5949 +586.14 0.5939 +586.36 0.5928 +586.58 0.5917 +586.80 0.5906 +587.02 0.5896 +587.24 0.5885 +587.46 0.5874 +587.68 0.5863 +587.90 0.5852 +588.12 0.5841 +588.34 0.5830 +588.56 0.5819 +588.78 0.5809 +589.00 0.5798 +589.22 0.5787 +589.44 0.5776 +589.66 0.5765 +589.88 0.5754 +590.10 0.5743 +590.32 0.5732 +590.54 0.5721 +590.76 0.5710 +590.98 0.5699 +591.20 0.5688 +591.42 0.5677 +591.64 0.5666 +591.86 0.5655 +592.08 0.5644 +592.30 0.5632 +592.52 0.5621 +592.74 0.5610 +592.96 0.5599 +593.18 0.5588 +593.40 0.5577 +593.62 0.5566 +593.84 0.5555 +594.06 0.5543 +594.28 0.5532 +594.50 0.5521 +594.72 0.5510 +594.94 0.5499 +595.16 0.5487 +595.38 0.5476 +595.60 0.5465 +595.82 0.5454 +596.04 0.5443 +596.26 0.5431 +596.48 0.5420 +596.70 0.5409 +596.92 0.5397 +597.14 0.5386 +597.36 0.5375 +597.58 0.5364 +597.80 0.5352 +598.02 0.5341 +598.24 0.5330 +598.46 0.5318 +598.68 0.5307 +598.90 0.5296 +599.12 0.5284 +599.34 0.5273 +599.56 0.5261 +599.78 0.5250 +600.00 0.5239 diff --git a/MOSAIC/TER_mIFU_HR-H.dat b/MOSAIC/TER_mIFU_HR-H.dat new file mode 100644 index 00000000..ff763902 --- /dev/null +++ b/MOSAIC/TER_mIFU_HR-H.dat @@ -0,0 +1,19 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC mIFU fibre throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +1.510 0. +1.522 0.612 +1.547 0.612 +1.572 0.612 +1.597 0.612 +1.622 0.612 +1.630 0. \ No newline at end of file diff --git a/MOSAIC/TER_mIFU_LR-H.dat b/MOSAIC/TER_mIFU_LR-H.dat new file mode 100644 index 00000000..5337ad81 --- /dev/null +++ b/MOSAIC/TER_mIFU_LR-H.dat @@ -0,0 +1,30 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC mIFU fibre throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +1.420 0. +1.430 0.612 +1.450 0.612 +1.475 0.612 +1.500 0.612 +1.525 0.612 +1.550 0.612 +1.575 0.612 +1.600 0.612 +1.625 0.612 +1.650 0.612 +1.675 0.612 +1.700 0.612 +1.725 0.611 +1.750 0.609 +1.775 0.608 +1.800 0.607 +1.810 0. \ No newline at end of file diff --git a/MOSAIC/TER_mIFU_LR-J.dat b/MOSAIC/TER_mIFU_LR-J.dat new file mode 100644 index 00000000..8ce1381a --- /dev/null +++ b/MOSAIC/TER_mIFU_LR-J.dat @@ -0,0 +1,31 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC mIFU fibre throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +0.925 0. +0.950 0.605 +0.975 0.606 +1.000 0.607 +1.025 0.608 +1.050 0.608 +1.075 0.608 +1.100 0.608 +1.125 0.609 +1.150 0.609 +1.175 0.609 +1.200 0.609 +1.225 0.610 +1.250 0.610 +1.275 0.610 +1.300 0.611 +1.325 0.609 +1.340 0.607 +1.350 0. \ No newline at end of file diff --git a/MOSAIC/TER_mos_HR-H.dat b/MOSAIC/TER_mos_HR-H.dat new file mode 100644 index 00000000..8a8e854a --- /dev/null +++ b/MOSAIC/TER_mos_HR-H.dat @@ -0,0 +1,8 @@ +wavelength transmission +1.500 0. +1.522 0.606 +1.547 0.605 +1.572 0.605 +1.597 0.605 +1.622 0.605 +1.63 0. diff --git a/MOSAIC/TER_mos_LR-H.dat b/MOSAIC/TER_mos_LR-H.dat new file mode 100644 index 00000000..10150d96 --- /dev/null +++ b/MOSAIC/TER_mos_LR-H.dat @@ -0,0 +1,30 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC NIR MOS fibre throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +1.420 0. +1.430 0.605 +1.450 0.605 +1.475 0.605 +1.500 0.606 +1.525 0.605 +1.550 0.605 +1.575 0.605 +1.600 0.605 +1.625 0.605 +1.650 0.605 +1.675 0.605 +1.700 0.605 +1.725 0.604 +1.750 0.603 +1.775 0.602 +1.800 0.601 +1.810 0. \ No newline at end of file diff --git a/MOSAIC/TER_mos_LR-J.dat b/MOSAIC/TER_mos_LR-J.dat new file mode 100644 index 00000000..93b77cc2 --- /dev/null +++ b/MOSAIC/TER_mos_LR-J.dat @@ -0,0 +1,31 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC NIR MOS fibre throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +0.940 0. +0.950 0.599 +0.975 0.600 +1.000 0.601 +1.025 0.601 +1.050 0.601 +1.075 0.601 +1.100 0.602 +1.125 0.602 +1.150 0.602 +1.175 0.602 +1.200 0.603 +1.225 0.603 +1.250 0.603 +1.275 0.604 +1.300 0.604 +1.325 0.602 +1.340 0.601 +1.350 0. \ No newline at end of file diff --git a/MOSAIC/TER_spec_HR-H.dat b/MOSAIC/TER_spec_HR-H.dat new file mode 100644 index 00000000..accabcb2 --- /dev/null +++ b/MOSAIC/TER_spec_HR-H.dat @@ -0,0 +1,19 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC NIR spectrograph throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +1.510 0. +1.522 0.204 +1.547 0.367 +1.572 0.475 +1.597 0.373 +1.622 0.156 +1.630 0. \ No newline at end of file diff --git a/MOSAIC/TER_spec_LR-H.dat b/MOSAIC/TER_spec_LR-H.dat new file mode 100644 index 00000000..8c8c00d8 --- /dev/null +++ b/MOSAIC/TER_spec_LR-H.dat @@ -0,0 +1,30 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC NIR spectrograph throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +1.420 0. +1.430 0.540 +1.450 0.554 +1.475 0.568 +1.500 0.582 +1.525 0.589 +1.550 0.589 +1.575 0.596 +1.600 0.603 +1.625 0.603 +1.650 0.603 +1.675 0.596 +1.700 0.582 +1.725 0.568 +1.750 0.561 +1.775 0.554 +1.800 0.547 +1.810 0. \ No newline at end of file diff --git a/MOSAIC/TER_spec_LR-J.dat b/MOSAIC/TER_spec_LR-J.dat new file mode 100644 index 00000000..7a30f8e3 --- /dev/null +++ b/MOSAIC/TER_spec_LR-J.dat @@ -0,0 +1,31 @@ +# author: Oliver Czoske +# source: MOSAIC-NIRchannel-throughput-20250120.xlsx, Ana Perez +# date_created: 2025-08-07 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# description: MOSAIC NIR spectrograph throughput +# changes: +# - 2025-08-07 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added metadata +# +wavelength transmission +0.940 0. +0.950 0.505 +0.975 0.534 +1.000 0.563 +1.025 0.577 +1.050 0.592 +1.075 0.613 +1.100 0.621 +1.125 0.635 +1.150 0.628 +1.175 0.628 +1.200 0.621 +1.225 0.590 +1.250 0.599 +1.275 0.577 +1.300 0.570 +1.325 0.556 +1.340 0.541 +1.350 0. \ No newline at end of file diff --git a/MOSAIC/TER_sys_MOS-HR-B1.dat b/MOSAIC/TER_sys_MOS-HR-B1.dat new file mode 100644 index 00000000..7a77e9a4 --- /dev/null +++ b/MOSAIC/TER_sys_MOS-HR-B1.dat @@ -0,0 +1,17 @@ +# author: Oliver Czoske +# source: Throughput_VIS_20240508.xlsx, Walter Seifert +# description: MOSAIC visual arm system transmission +# date_created: 2025-07-31 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# changes: +# - 2025-07-31 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added meta data +# +wavelength transmission +0.500 0. +0.510 0.19 +0.558 0.28 +0.598 0.20 +0.610 0. \ No newline at end of file diff --git a/MOSAIC/TER_sys_MOS-HR-B2.dat b/MOSAIC/TER_sys_MOS-HR-B2.dat new file mode 100644 index 00000000..effe1296 --- /dev/null +++ b/MOSAIC/TER_sys_MOS-HR-B2.dat @@ -0,0 +1,17 @@ +# author: Oliver Czoske +# source: Throughput_VIS_20240508.xlsx, Walter Seifert +# description: MOSAIC visual arm system transmission +# date_created: 2025-07-31 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# changes: +# - 2025-07-31 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added meta data +# +wavelength transmission +0.380 0. +0.390 0.11 +0.426 0.24 +0.457 0.15 +0.470 0. \ No newline at end of file diff --git a/MOSAIC/TER_sys_MOS-HR-R1.dat b/MOSAIC/TER_sys_MOS-HR-R1.dat new file mode 100644 index 00000000..b978e017 --- /dev/null +++ b/MOSAIC/TER_sys_MOS-HR-R1.dat @@ -0,0 +1,17 @@ +# author: Oliver Czoske +# source: Throughput_VIS_20240508.xlsx, Walter Seifert +# description: MOSAIC visual arm system transmission +# date_created: 2025-07-31 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# changes: +# - 2025-07-31 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added meta data +# +wavelength transmission +0.600 0. +0.610 0.22 +0.667 0.31 +0.715 0.24 +0.725 0. \ No newline at end of file diff --git a/MOSAIC/TER_sys_MOS-HR-R2.dat b/MOSAIC/TER_sys_MOS-HR-R2.dat new file mode 100644 index 00000000..4de2f986 --- /dev/null +++ b/MOSAIC/TER_sys_MOS-HR-R2.dat @@ -0,0 +1,17 @@ +# author: Oliver Czoske +# source: Throughput_VIS_20240508.xlsx, Walter Seifert +# description: MOSAIC visual arm system transmission +# date_created: 2025-07-31 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# changes: +# - 2025-07-31 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added meta data +# +wavelength transmission +0.790 0. +0.800 0.25 +0.874 0.28 +0.937 0.12 +0.950 0. \ No newline at end of file diff --git a/MOSAIC/TER_sys_MOS-LR-B.dat b/MOSAIC/TER_sys_MOS-LR-B.dat new file mode 100644 index 00000000..efbdb94b --- /dev/null +++ b/MOSAIC/TER_sys_MOS-LR-B.dat @@ -0,0 +1,18 @@ +# author: Oliver Czoske +# source: Throughput_VIS_20240508.xlsx, Walter Seifert +# description: MOSAIC visual arm system transmission +# date_created: 2025-07-31 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# changes: +# - 2025-07-31 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added meta data +# +wavelength transmission +0.370 0. +0.380 0.14 +0.400 0.20 +0.495 0.31 +0.604 0.24 +0.610 0. \ No newline at end of file diff --git a/MOSAIC/TER_sys_MOS-LR-R.dat b/MOSAIC/TER_sys_MOS-LR-R.dat new file mode 100644 index 00000000..08ab635e --- /dev/null +++ b/MOSAIC/TER_sys_MOS-LR-R.dat @@ -0,0 +1,18 @@ +# author: Oliver Czoske +# source: Throughput_VIS_20240508.xlsx, Walter Seifert +# description: MOSAIC visual arm system transmission +# date_created: 2025-07-31 +# date_modified: 2025-08-08 +# status: pre-PDR +# wavelength_unit: um +# changes: +# - 2025-07-31 (OC) extracted from spreadsheet +# - 2025-08-08 (OC) added meta data +# +wavelength transmission +0.580 0. +0.590 0.27 +0.774 0.36 +0.875 0.24 +0.947 0.10 +0.960 0. \ No newline at end of file diff --git a/MOSAIC/TRACE_MOS-HR-B1.fits b/MOSAIC/TRACE_MOS-HR-B1.fits new file mode 100644 index 00000000..2547feb2 Binary files /dev/null and b/MOSAIC/TRACE_MOS-HR-B1.fits differ diff --git a/MOSAIC/TRACE_MOS-HR-B2.fits b/MOSAIC/TRACE_MOS-HR-B2.fits new file mode 100644 index 00000000..aa010d8b Binary files /dev/null and b/MOSAIC/TRACE_MOS-HR-B2.fits differ diff --git a/MOSAIC/TRACE_MOS-HR-H.fits b/MOSAIC/TRACE_MOS-HR-H.fits new file mode 100644 index 00000000..66442091 Binary files /dev/null and b/MOSAIC/TRACE_MOS-HR-H.fits differ diff --git a/MOSAIC/TRACE_MOS-HR-R1.fits b/MOSAIC/TRACE_MOS-HR-R1.fits new file mode 100644 index 00000000..229aa064 Binary files /dev/null and b/MOSAIC/TRACE_MOS-HR-R1.fits differ diff --git a/MOSAIC/TRACE_MOS-HR-R2.fits b/MOSAIC/TRACE_MOS-HR-R2.fits new file mode 100644 index 00000000..e561ef94 Binary files /dev/null and b/MOSAIC/TRACE_MOS-HR-R2.fits differ diff --git a/MOSAIC/TRACE_MOS-LR-B.fits b/MOSAIC/TRACE_MOS-LR-B.fits new file mode 100644 index 00000000..44748461 Binary files /dev/null and b/MOSAIC/TRACE_MOS-LR-B.fits differ diff --git a/MOSAIC/TRACE_MOS-LR-H.fits b/MOSAIC/TRACE_MOS-LR-H.fits new file mode 100644 index 00000000..8cd135e3 Binary files /dev/null and b/MOSAIC/TRACE_MOS-LR-H.fits differ diff --git a/MOSAIC/TRACE_MOS-LR-J.fits b/MOSAIC/TRACE_MOS-LR-J.fits new file mode 100644 index 00000000..ef98b21b Binary files /dev/null and b/MOSAIC/TRACE_MOS-LR-J.fits differ diff --git a/MOSAIC/TRACE_MOS-LR-R.fits b/MOSAIC/TRACE_MOS-LR-R.fits new file mode 100644 index 00000000..10107e97 Binary files /dev/null and b/MOSAIC/TRACE_MOS-LR-R.fits differ diff --git a/MOSAIC/TRACE_mIFU-HR-H.fits b/MOSAIC/TRACE_mIFU-HR-H.fits new file mode 100644 index 00000000..de05772d Binary files /dev/null and b/MOSAIC/TRACE_mIFU-HR-H.fits differ diff --git a/MOSAIC/TRACE_mIFU-LR-H.fits b/MOSAIC/TRACE_mIFU-LR-H.fits new file mode 100644 index 00000000..be14e910 Binary files /dev/null and b/MOSAIC/TRACE_mIFU-LR-H.fits differ diff --git a/MOSAIC/TRACE_mIFU-LR-J.fits b/MOSAIC/TRACE_mIFU-LR-J.fits new file mode 100644 index 00000000..4e397b13 Binary files /dev/null and b/MOSAIC/TRACE_mIFU-LR-J.fits differ diff --git a/MOSAIC/default.yaml b/MOSAIC/default.yaml new file mode 100644 index 00000000..07c61d28 --- /dev/null +++ b/MOSAIC/default.yaml @@ -0,0 +1,260 @@ +--- +### default observation parameters needed for a MOSAIC simulation +object : configuration +alias : OBS +name : MOSAIC_default_configuration +description : default parameters needed for a MOSAIC simulation +needs_scopesim: "v0.11.0" +date_modified: 2025-09-01 +changes: + - 2025-09-01 (OC) adjusted resolutions for modes + +packages : + - Armazones + - ELT + - MOSAIC + +yamls : + - Armazones.yaml + - ELT.yaml + +properties : + instrument: "MOSAIC" + modes : ["MOS-LR-R"] # default mode + airmass : 1.2 + declination : -30 + hour_angle : 0 + pupil_angle : 0 + exptime: 60 + dit : 60 + ndit : 1 + ra : 0.0 + dec : 0.0 + psf_fwhm : 0.2 + include_fibres : True + do_collapse_1d: True + +mode_yamls : + - object: observation + alias: OBS + name: MOS-LR-B + description: "MOSAIC visual low resolution B band" + status: development + yamls: + - MOSAIC_VIS.yaml + - MOSAIC_DET_VIS.yaml + properties: + ins_mode: MOS-LR-B # use as FITS header keyword + ter_file: TER_sys_MOS-LR-B.dat + # psf_file: PSF_GLAO_R.fits + trace_file: TRACE_MOS-LR-B.fits + dispersion: 1.9e-5 # um/pixel on the output detector + resolution: 32000 # resolution of sky spectrum + + - object: observation + alias: OBS + name: MOS-HR-B1 + description: "MOSAIC visual high resolution B1 band" + status: development + yamls: + - MOSAIC_VIS.yaml + - MOSAIC_DET_VIS.yaml + properties: + ins_mode: MOS-HR-B1 + ter_file: TER_sys_MOS-HR-B1.dat + trace_file: TRACE_MOS-HR-B1.fits + dispersion: 6.5e-6 # um/pixel on detector + resolution: 72000 # resolution of sky spectrum + + - object: observation + alias: OBS + name: MOS-HR-B2 + description: "MOSAIC visual high resolution B2 band" + status: development + yamls: + - MOSAIC_VIS.yaml + - MOSAIC_DET_VIS.yaml + properties: + ins_mode: MOS-HR-B2 + ter_file: TER_sys_MOS-HR-B2.dat + trace_file: TRACE_MOS-HR-B2.fits + dispersion: 5e-6 # um/pixel on detector + resolution: 72000 # resolution of sky spectrum + + - object: observation + alias: OBS + name: MOS-LR-R + description: "MOSAIC visual low resolution R band" + status: development + yamls: + - MOSAIC_VIS.yaml + - MOSAIC_DET_VIS.yaml + properties: + ins_mode: MOS-LR-R # use as FITS header keyword + ter_file: TER_sys_MOS-LR-R.dat + # psf_file: PSF_GLAO_R.fits + trace_file: TRACE_MOS-LR-R.fits + dispersion: 3e-5 # um/pixel on the output detector + resolution: 32000 # resolution of sky spectrum + + - object: observation + alias: OBS + name: MOS-HR-R1 + description: "MOSAIC visual high resolution R1 band" + status: development + yamls: + - MOSAIC_VIS.yaml + - MOSAIC_DET_VIS.yaml + properties: + ins_mode: MOS-HR-R1 + ter_file: TER_sys_MOS-HR-R1.dat + trace_file: TRACE_MOS-HR-R1.fits + dispersion: 8e-6 # um/pixel on detector + resolution: 72000 # resolution of sky spectrum + + - object: observation + alias: OBS + name: MOS-HR-R2 + description: "MOSAIC visual high resolution R2 band" + status: development + yamls: + - MOSAIC_VIS.yaml + - MOSAIC_DET_VIS.yaml + properties: + ins_mode: MOS-HR-R2 + ter_file: TER_sys_MOS-HR-R2.dat + trace_file: TRACE_MOS-HR-R2.fits + dispersion: 1e-5 # um/pixel on detector + resolution: 72000 # resolution of sky spectrum + + - object : instrument + alias: OBS + name: MOS-LR-J + description: "MOSAIC near-infrared low resolution J band" + status: development + yamls: + - MOSAIC_NIR.yaml + - MOSAIC_DET_NIR.yaml + properties: + ins_mode: MOS-LR-J + fibre_ter_file: TER_mos_LR-J.dat + spec_ter_file: TER_spec_LR-J.dat + trace_file: TRACE_MOS-LR-J.fits + dispersion: 9.5e-5 # um/pixel on detector + resolution: 16000 # resolution of sky spectrum + + - object : instrument + alias: OBS + name : MOS-LR-H + description : "MOSAIC near-infrared low resolution H band" + status: development + yamls : + - MOSAIC_NIR.yaml + - MOSAIC_DET_NIR.yaml + properties: + ins_mode: MOS-LR-H + fibre_ter_file: TER_mos_LR-H.dat + spec_ter_file: TER_spec_LR-H.dat + trace_file: TRACE_MOS-LR-H.fits + dispersion: 9.e-5 # um/pixel on detector + resolution: 16000 # resolution of sky spectrum + + - object : instrument + alias: OBS + name : MOS-HR-H + description : "MOSAIC near-infrared high resolution H band" + status: development + yamls : + - MOSAIC_NIR.yaml + - MOSAIC_DET_NIR.yaml + properties: + ins_mode: MOS-HR-H + fibre_ter_file: TER_mos_HR-H.dat + spec_ter_file: TER_spec_HR-H.dat + trace_file: TRACE_MOS-HR-H.fits + dispersion: 2.4e-5 # um/pixel on detector + resolution: 72000 # resolution of sky spectrum + + - object : instrument + alias: OBS + name : mIFU-LR-J + description : "MOSAIC near-infrared low resolution J band" + status: development + yamls : + - MOSAIC_NIR.yaml + - MOSAIC_DET_NIR.yaml + properties: + ins_mode: mIFU-LR-J + fibre_ter_file: TER_mIFU_LR-J.dat + spec_ter_file: TER_spec_LR-J.dat + trace_file: TRACE_mIFU-LR-J.fits + dispersion: 9.5e-5 # um/pixel on detector + resolution: 16000 # resolution of sky spectrum + do_collapse_1d: False + + - object : instrument + alias: OBS + name : mIFU-LR-H + description : "MOSAIC near-infrared low resolution H band" + status: development + yamls : + - MOSAIC_NIR.yaml + - MOSAIC_DET_NIR.yaml + properties: + ins_mode: mIFU-LR-H + fibre_ter_file: TER_mIFU_LR-H.dat + spec_ter_file: TER_spec_LR-H.dat + trace_file: TRACE_mIFU-LR-H.fits + dispersion: 9.e-5 # um/pixel on detector + resolution: 16000 # resolution of sky spectrum + do_collapse_1d: False + + - object : instrument + alias: OBS + name : mIFU-HR-H + description : "MOSAIC near-infrared high resolution H band" + status: development + yamls : + - MOSAIC_NIR.yaml + - MOSAIC_DET_NIR.yaml + properties: + ins_mode: mIFU-HR-H + fibre_ter_file: TER_mIFU_HR-H.dat + spec_ter_file: TER_spec_NIR_HR_H.dat + trace_file: TRACE_mIFU_NIR-HR-H.fits + dispersion: 2.4e-5 # um/pixel on detector + resolution: 72000 # resolution of sky spectrum + do_collapse_1d: False + + + +--- +### default simulation parameters needed for a MOSAIC simulation +object : simulation +alias : SIM +name : MOSAIC_simulation_parameters +description : RC simulation paramters which need to change for a MOSAIC run + +properties : + random : + seed : None + + spectral : + wave_min : 0.35 + wave_mid : 1.125 + wave_max : 1.9 + spectral_bin_width: "!OBS.dispersion" + spectral_resolution: "!OBS.resolution" + + computing : + preload_field_of_views : True + +--- +### default instrument parameters +object: instrument +alias: INST +name: MOSAIC_instrument_parameters +description: instrument parameters common to all MOSAIC modes + +properties: + decouple_detector_from_sky_headers: True diff --git a/MOSAIC/docs/example_notebooks/MOSAIC_demo.ipynb b/MOSAIC/docs/example_notebooks/MOSAIC_demo.ipynb new file mode 100644 index 00000000..9f7725a6 --- /dev/null +++ b/MOSAIC/docs/example_notebooks/MOSAIC_demo.ipynb @@ -0,0 +1,725 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "612ecdf2-d7da-4a1f-87da-ff42d5a7e222", + "metadata": {}, + "source": [ + "This is a simple demo of the \"ETC\" mode for MOSAIC. To use this you need the `oc/mosaic` branch of Scopesim and the `oc/mosaic` branch of the irdb. The implementation creates one-dimensional spectra for the output (summed over the fibres in a bundle for the MOS modes). The first sections demonstrate how to use Scopesim for the MOS and mIFU modes. The final section provides a more detailed description of the implementation and instrument definition that is currently used." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ade0fcb7-352f-4659-9cf6-abe22b49b8d6", + "metadata": {}, + "outputs": [], + "source": [ + "import scopesim as sim\n", + "import numpy as np\n", + "from matplotlib import pyplot as plt\n", + "from astropy import units as u" + ] + }, + { + "cell_type": "markdown", + "id": "bfda4486-6cf3-407d-b1fe-1f39e9f5ffd4", + "metadata": {}, + "source": [ + "Change the path below to your local irdb copy." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d273f5c3-bd10-4c54-ac2b-f5722cade6dd", + "metadata": {}, + "outputs": [], + "source": [ + "# Edit this path if you have a custom install directory, otherwise comment it out. (For ReadTheDocs only)\n", + "sim.link_irdb(\"../../../\")" + ] + }, + { + "cell_type": "markdown", + "id": "6e726529-9a90-45ac-9af1-0f23c1015743", + "metadata": {}, + "source": [ + "To simulate observations with MOSAIC, the instrument packages for MOSAIC, the ELT, and Armazones are required. The packages are downloaded from the server and installed into sub-directory `inst_pkgs` in the current working directory. If you have not got the packages yet, uncomment the following cell." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e3a2cc34-18fc-41c9-b1af-ba85bae7df24", + "metadata": {}, + "outputs": [], + "source": [ + "#sim.download_packages([\"MOSAIC\", \"ELT\", \"Armazones\"])" + ] + }, + { + "cell_type": "markdown", + "id": "e288ac3a-4d10-4676-9bfe-76810824043a", + "metadata": {}, + "source": [ + "The following command gives an overview of installed packages used by Scopesim. Please include the output in every bug report or question." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ea2dfab3-9ada-4854-a387-cfe3dd0dbd3a", + "metadata": {}, + "outputs": [], + "source": [ + "sim.bug_report()" + ] + }, + { + "cell_type": "markdown", + "id": "db5a8af4-1a32-431a-838f-cce1344fb3de", + "metadata": {}, + "source": [ + "## Instrument modes" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d482facd-efa0-41b5-9cff-5c897e3b1698", + "metadata": {}, + "outputs": [], + "source": [ + "cmd = sim.UserCommands(use_instrument=\"MOSAIC\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d63b47ba-6a26-4f09-8ded-1bec7930d949", + "metadata": {}, + "outputs": [], + "source": [ + "cmd.modes" + ] + }, + { + "cell_type": "markdown", + "id": "38063222-20bf-4668-aa31-3183d09a6b75", + "metadata": {}, + "source": [ + "- The visual modes map spectra to a pseudo-detector of length 13000 pixels; the gap between the two 6k detectors in the real instrument is not simulated.\n", + "- The near-infrared modes map spectra to a 4k x 4k detector.\n", + "- As stated above, the MOS modes collapse the 7 (low-res modes) or 19 (high-res modes) fibres in a bundle to a single one-dimensional spectrum, the output is a FITS binary table with wavelength and flux (in ADU).\n", + "- The mIFU modes return a 4k x 4k image with each of the 4xx fibre spectra mapped onto a detector row each. Rearrangement of the spectra into a cube has not been implemented." + ] + }, + { + "cell_type": "markdown", + "id": "702ed374-0367-4cfe-be42-2305dfecc131", + "metadata": {}, + "source": [ + "## MOS modes\n", + "All the MOS modes work identically, and we will only demonstrate the low-resolution R band mode." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3df6161a-01d3-459c-a148-48241ab340e1", + "metadata": {}, + "outputs": [], + "source": [ + "cmd = sim.UserCommands(use_instrument=\"MOSAIC\", set_modes=['MOS-LR-R'])" + ] + }, + { + "cell_type": "markdown", + "id": "13f81b36-cba5-42c7-9c04-22387e7de69d", + "metadata": {}, + "source": [ + "We shall use an exposure time of 10 seconds throughout. This could be set in the `Usercommands` object (`cmd[\"!OBS.exptime\"]`) but we prefer to set it explicitely in the `readout` commands." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0aae4148-49e1-4f18-bb29-7f17ee6592dc", + "metadata": {}, + "outputs": [], + "source": [ + "t_exp = 10 # seconds" + ] + }, + { + "cell_type": "markdown", + "id": "1406571f-e35a-4470-8e71-0edca5dda649", + "metadata": {}, + "source": [ + "We can now build the instrument model as an instance of the `OpticalTrain` class." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ff8a4137-cc1d-461c-b2e7-8d7cfca31d67", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic = sim.OpticalTrain(cmd)" + ] + }, + { + "cell_type": "markdown", + "id": "4a3dd85d-a417-4363-80c9-2061f5453637", + "metadata": {}, + "source": [ + "The following gives an overview of the effects that are included in the optical train. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5e6c651b-1b52-4b40-b0c1-e3b36f35489e", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic.effects" + ] + }, + { + "cell_type": "markdown", + "id": "e630c9a8-8499-4c7a-a9ec-e7df735364b4", + "metadata": {}, + "source": [ + "We start by observing blank sky; this will be useful for background subtraction when we observe a source later." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0f0eae6d-646f-4233-8460-5490fb666f79", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic.observe()" + ] + }, + { + "cell_type": "markdown", + "id": "3c69954d-901f-444b-a3fa-1d4ccd89e927", + "metadata": {}, + "source": [ + "This step creates an `ImagePlane` object, a noise-less image of the detector that records the expected number of electrons per second per pixel. In the current implementation for the visual branch of MOSAIC this is a pseudo-detector with 13000 pixels in the dispersion direction (x-axis), and just enough pixels in the y-direction to hold the 19 fibres of the HR modes (only 7 for LR modes, as in the example). Each fibre is mapped to a single row in the `ImagePlane`. Normally, the `ImagePlane` is not of interest to the user; we save it here for later when we will use to estimate signal-to-noise ratios." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d0e152b2-10c0-4d08-aa94-2df9c6f274b4", + "metadata": {}, + "outputs": [], + "source": [ + "sky_implane = mosaic.image_planes[0].data\n", + "print(f\"Size of imageplane: {sky_implane.shape}\")\n", + "plt.imshow(sky_implane[:, 2000:3000], origin='lower', vmax=0.1);" + ] + }, + { + "cell_type": "markdown", + "id": "6870b5cb-da6f-48ab-b841-d1b60400c79c", + "metadata": {}, + "source": [ + "The actual detector \"image\" including dark current, shot noise and readout noise is created in the next step, where we have to specify the exposure time." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "533ee95c-cdac-4638-b600-6b1b2e6a7c80", + "metadata": {}, + "outputs": [], + "source": [ + "sky = mosaic.readout(exptime=t_exp)[0]" + ] + }, + { + "cell_type": "markdown", + "id": "c3b11f15-2d69-460d-bef8-53418d7dfbb8", + "metadata": {}, + "source": [ + "The result is a binary table with columns `wavelength` and `spectrum`:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "68c08091-93af-4160-a144-9f3667c8589e", + "metadata": {}, + "outputs": [], + "source": [ + "sky[1].data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7a72913d-5d32-4939-ad1d-e38b431b678d", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(sky[1].data['wavelength'], sky[1].data['spectrum'])" + ] + }, + { + "cell_type": "markdown", + "id": "0dad3635-cfef-4150-8a52-ce3c6ee46220", + "metadata": {}, + "source": [ + "As a source, we'll use a star of 15 mag:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9ea43e01-9371-491b-8c4e-a67735696f42", + "metadata": {}, + "outputs": [], + "source": [ + "src = sim.source.source_templates.star(flux=15 * u.mag)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e649ae17-ec87-4614-92d9-56a5c7191c02", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic.observe(src)" + ] + }, + { + "cell_type": "markdown", + "id": "b7fc01d7-1e79-434c-b428-802b2000b3b4", + "metadata": {}, + "source": [ + "Again, we save the `ImagePlane` for later. Note that this contains the expected electron counts (per second) from both the source and the background. We then proceed to create the actual detector readout." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4bb4d584-04b4-4059-9081-a514eb0ad1e1", + "metadata": {}, + "outputs": [], + "source": [ + "star_implane = mosaic.image_planes[0].data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8ed08e9a-e06b-4af5-910c-fb4468f117c3", + "metadata": {}, + "outputs": [], + "source": [ + "star = mosaic.readout(exptime=t_exp)[0] # same exposure time as for the background simulation" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "80ac5af9-cacb-4f69-9150-663c02df11f0", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(star[1].data['wavelength'], star[1].data['spectrum'], label=\"raw spectrum\", lw=1)\n", + "plt.plot(star[1].data['wavelength'], star[1].data['spectrum'] - sky[1].data['spectrum'], label=\"background subtracted\", lw=1)\n", + "plt.plot(sky[1].data['wavelength'], sky[1].data['spectrum'], label=\"background spectrum\", lw=1)\n", + "plt.legend()\n", + "plt.text(0.656281, 1700, r\"H$\\alpha$\", horizontalalignment=\"center\")\n", + "plt.text(0.686719, 1700, r\"O$_2$\", horizontalalignment=\"center\")\n", + "plt.text(0.72, 2500, r\"H$_2$O\", horizontalalignment=\"center\")\n", + "plt.text(0.759370, 450, r\"O$_2$\", horizontalalignment=\"center\")\n", + "plt.text(0.822696, 1300, r\"O$_2$\", horizontalalignment=\"center\")\n", + "plt.xlabel(\"Wavelength [um]\")\n", + "plt.ylabel(\"Electrons\");" + ] + }, + { + "cell_type": "markdown", + "id": "4fb502c1-81e5-4731-9ccf-9b0f57bf084f", + "metadata": {}, + "source": [ + "Strictly speaking, the flux units is ADU, but the gain is currently set to 1, so that 1 ADU corresponds to 1 electron collected over the exposure time (60 s).\n", + "The spectrum is the sum over the seven fibres (19 for the high-resolution modes), each covering a solid angle of 0.0118 arcsec$^2$. " + ] + }, + { + "cell_type": "markdown", + "id": "33dbb6ff-c41d-4be5-bb20-a26a91fff215", + "metadata": {}, + "source": [ + "Note that the `mosaic.readout()` method above has been set by the `exptime` keyword, and the exposure is a single readout of that integration time. This is appropriate for the visual modes. The near-infrared modes can also receive a simple `exptime`. In this case, the exposure time is automatically split into `ndit` subexposures of integration time `dit` each (cf. the readout of the mIFU example below). It is also possible to set `dit` and `ndit` directly. " + ] + }, + { + "cell_type": "markdown", + "id": "94011e79-ad05-4f2c-a82b-66f9ea3b19c0", + "metadata": {}, + "source": [ + "## Signal-to-noise estimation from the simulated data\n", + "Scopesim does not have a built-in function to compute a signal-to-noise ratio for the simulation. Using the simulations for the background and star+background, it can be easily estimated. " + ] + }, + { + "cell_type": "markdown", + "id": "dc80b6a1-4305-4f13-af36-d1da5073cfb9", + "metadata": {}, + "source": [ + "To start with we have to convert the spectra from ADU to electrons by multiplying by the gain (in the visual mode, this is currently set to 1; in the near-infrared it is set to 2.5 from our previous experience with HxRG detectors)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8e366cb3-4e47-4a3e-b6be-dc0322cdd10e", + "metadata": {}, + "outputs": [], + "source": [ + "gain = mosaic.cmds[\"!DET.gain\"]\n", + "print(f\"Gain: {gain}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "103ef8f4-5a9d-48fd-8eac-7931a5cdbf6f", + "metadata": {}, + "outputs": [], + "source": [ + "noise = np.sqrt(star[1].data['spectrum'] / gain)\n", + "signal = (star[1].data['spectrum'] - sky[1].data['spectrum'])/ gain\n", + "SNR_emp = signal/noise" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cbac25c6-11a5-4e7e-8953-5d9cfe586962", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(star[1].data['wavelength'], SNR_emp)\n", + "plt.ylim(0, 80)\n", + "plt.xlabel(\"Wavelength [um]\")\n", + "plt.ylabel(\"Signal-to-noise ration\")\n", + "plt.title(\"Empirical signal-to-noise ratio\");" + ] + }, + { + "cell_type": "markdown", + "id": "d9d180bd-a5ce-461f-bfc6-8ead334cd36d", + "metadata": {}, + "source": [ + "## Signal-to-noise ration determination from expected values\n", + "We can also break down the noise into its constituent components as they are currently implemented in Scopesim. For the signal and the Poisson noise due to source and background we go back to the expected values that are provided in the `ImagePlane` of the respective simulations. We use the following prescription for the SNR computation ([ELT Spectroscopy ETC document](https://www.eso.org/observing/etc/doc/elt/etc_spec_model.pdf)): \n", + "$$\n", + "\\frac{S}{N} = \\frac{\\sqrt{n_\\mathrm{exp}}\\cdot N_\\mathrm{obj}}{\\sqrt{N_\\mathrm{obj} + N_\\mathrm{sky} + n_\\mathrm{pix} R^2 + n_\\mathrm{pix} D t_\\mathrm{exp}}}\n", + "$$\n", + "For the electron numbers $N_\\mathrm{obj}$ and $N_\\mathrm{sky}$ from the source and the background, respectively, we recur to the `ImagePlane`s that we saved earlier. These give the expected number of electrons per second per pixels." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bac4c598-434e-4ca6-ac01-55b771faba7f", + "metadata": {}, + "outputs": [], + "source": [ + "N_obj = (star_implane - sky_implane).sum(axis=0) * t_exp # sum over all fibres (non-fibre rows are zero, so summing over y-axis is fine)\n", + "N_sky = sky_implane.sum(axis=0) * t_exp" + ] + }, + { + "cell_type": "markdown", + "id": "edada196-0331-4dcb-bd12-5a0129356bd7", + "metadata": {}, + "source": [ + "Scopesim uses $R=7$ electrons and $D=0.005$ electrons per second. These values were taken from E-MOS-SYS-ANR-0063-2_0, where they are given as $R\\approx 2.5$ electrons and $D=3$ electrons per hour, respectively. Our adopted values take into account that each row in the `ImagePlane` is the sum over a fibre, which we take to be around 6 pixels wide in a (real) detector image ($D$ scales linearly with that number, while $R$ scales with its square root). In the formula above $n_\\mathrm{pix}$ corresponds to the number of fibres that have been summed over, which is 7 in our case. The number of exposures is $n_\\mathrm{exp} = 1$ in the visual." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cac86d14-b567-43ac-861e-52c126abbfc6", + "metadata": {}, + "outputs": [], + "source": [ + "rdnoise = mosaic.cmds[\"!DET.readout_noise\"]\n", + "dark = mosaic.cmds[\"!DET.dark_current\"]\n", + "print(f\"Readout noise: {rdnoise} electrons\")\n", + "print(f\"Dark current: {dark} electrons/second\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a1971fa9-d724-487a-b8b6-d673e3979c2c", + "metadata": {}, + "outputs": [], + "source": [ + "SNR_exp = N_obj / np.sqrt(N_obj + N_sky + 7 * rdnoise**2 + 7 * dark * t_exp)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a56d18b0-7b85-4ec0-ac75-13ef5a6c906d", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(star[1].data['wavelength'], SNR_exp)\n", + "plt.xlabel(\"Wavelength [um]\")\n", + "plt.ylabel(\"Signal-to-noise ration\")\n", + "plt.title(\"Expected signal-to-noise ratio\")\n", + "plt.ylim(0, 80);" + ] + }, + { + "cell_type": "markdown", + "id": "5edcad41-9ab7-4acb-a20a-d5c613f83064", + "metadata": {}, + "source": [ + "## Using a galaxy as a source\n", + "The `scopesim_templates` package includes models for a variety of astronomical source. We will use it to simulate an observation of an elliptical galaxy at some redshift." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5d027a0b-2f2f-4386-876b-0a1e362472d4", + "metadata": {}, + "outputs": [], + "source": [ + "import scopesim_templates as sim_tp" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "02764a5e-ee9d-43e2-b0ad-e995e0698974", + "metadata": {}, + "outputs": [], + "source": [ + "gal = sim_tp.extragalactic.galaxy(\"kc96/elliptical\", z=0.1, amplitude=15, filter_curve=\"g\", pixel_scale=0.01, r_eff=0.3, \n", + " n=4, ellip=0.5, theta=45, extend=3)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "43dc0b6d-faef-499f-8d63-625bf29362bd", + "metadata": {}, + "outputs": [], + "source": [ + "plt.imshow(gal.fields[0].data, origin=\"lower\", norm=\"log\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "04eff4a6-e1f0-4b15-8e0d-bdd07b435b3a", + "metadata": {}, + "outputs": [], + "source": [ + "gal.fields[0].header" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "01565313-f413-4a5f-bc16-394fd7d83f50", + "metadata": {}, + "outputs": [], + "source": [ + "cmd_b = sim.UserCommands(use_instrument=\"MOSAIC\", set_modes=[\"MOS-LR-B\"])\n", + "mosaic_b = sim.OpticalTrain(cmd_b)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7c6ed987-2d28-4408-82c5-cf93a7b7de87", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic_b.observe(gal)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8662f382-f263-4717-8891-c1d9783f48fb", + "metadata": {}, + "outputs": [], + "source": [ + "galobs = mosaic_b.readout(exptime=t_exp)[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4f3b4a1e-9f30-4612-8dbb-e66bb7cc7288", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(galobs[1].data['wavelength'], galobs[1].data['spectrum'], label=\"galaxy\")\n", + "plt.plot(star[1].data['wavelength'], star[1].data['spectrum'] - sky[1].data['spectrum'], label=\"star\")\n", + "plt.xlabel(\"Wavelength [um]\")\n", + "plt.legend();" + ] + }, + { + "cell_type": "markdown", + "id": "b612c2b2-ad88-445e-bd1f-f2bf93a251cc", + "metadata": {}, + "source": [ + "## mIFU modes" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "59a4a82b-3fc0-47a3-90c2-345e21330902", + "metadata": {}, + "outputs": [], + "source": [ + "cmd = sim.UserCommands(use_instrument=\"MOSAIC\", set_modes=[\"mIFU-LR-J\"])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fc86a53d-1a51-4007-9990-fbf5d9c03729", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic = sim.OpticalTrain(cmd)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "31260e7f-d10c-47e3-8891-1cbaa2c4e867", + "metadata": {}, + "outputs": [], + "source": [ + "mosaic.observe()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "be7b9f59-d8a6-4484-ac34-6ec28abee553", + "metadata": {}, + "outputs": [], + "source": [ + "hdul = mosaic.readout(exptime=3600)[0]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d4d3e953-795f-4c24-99d6-d5aa549a6bf2", + "metadata": {}, + "outputs": [], + "source": [ + "plt.imshow(hdul[1].data[900:1100, 1900:2100], norm='log', origin='lower')\n", + "plt.colorbar();" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4c5b7377-c23d-4056-8148-d039072f412e", + "metadata": {}, + "outputs": [], + "source": [ + "plt.plot(hdul[1].data[991, :])" + ] + }, + { + "cell_type": "markdown", + "id": "f25addbb-0578-4ced-964d-f0560a41a963", + "metadata": {}, + "source": [ + "The mIFU mode is incomplete - it is currently not possible to deduce the wavelength vector and the spatial arrangement of the fibres from the readout alone. A table format might be better suited for that purpose." + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "id": "12f2011d-11b2-4680-9f41-4686637e2472", + "metadata": {}, + "source": [ + "## Instrument package\n", + "In this section we describe how the instrument is defined for Scopesim and what data files and parameters are used. The instrument configuration is found in `irdb/MOSAIC` (a release package will be provided once the code and configuration has been validated). The main file is `default.yaml` where in particular the available instrument modes are defined (see above for a list of these modes). The `OpticalTrain`, i.e. the software representation of the entire system of atmosphere, telescope, instrument optics and detector, is built as a series of `Effect` objects, which are set along with relevant parameters in further `yaml` files, as appropriate for each instrument mode. \n", + "All modes use the additional `Armazones` and `ELT` packages:\n", + "- `irdb/Armazones/Armazones.yaml` sets a single effect, `skycalc_atmosphere`, which provides atmospheric transmission and emission spectra as taken from ESO's skycalc server. The two parameters `spectral_resolution` and `spectral_bin_width` have been carefully chosen for each mode and should not be changed (unless for experimental purposes).\n", + "- `irdb/ELT/ELT.yaml` defines `telescope_reflection`, which provides reflectivity and thermal emission from the telescope mirrors. The parameter `!TEL.ter_curve.filename` is by default set to `TER_ELT_5_mirror.dat`. The irdb contains files for 5- and 6-mirror configurations (the latter including a flat mirror to deflect light to a side port), the latter with exposed (field-tracking) or hidden (pupil-tracking) telescope spiders, and for clean and not so clean mirror segments.\n", + "\n", + " \n", + " \n", + "\n", + "The instrument is split into a visual and a near-infrared arm, described by `MOSAIC_VIS.yaml` and `MOSAIC_NIR.yaml`, respectively. \n", + "- The transmission of the visual arm is given as a single combined `system transmission` effect, which uses the file named in the parameter \"!OBS.ter_file\" (TER = transmission, emission, reflection). For the near-infrared arm, the transmission is split into `fibre transmission` and `spectrograph transmission` (parameters `!OBS.fibre_ter_file` and `!OBS.spec_ter_file`). The fibre transmission files are named `TER_mos_*` to distinguish them from the IFU fibres, `TER_mIFU_*`. The available data are rather crude at present.\n", + "\n", + " \n", + " \n", + "\n", + "- The point-spread function (effect `psf`) is currently taken to be a `SeeingPSF`, with FWHM settable via `!OBS.psf_fwhm`. This parameter is currently set to a default of 0.2 arcsec for all modes, probably not always a good value.\n", + "- The line-spread function (effect `lsf`) is a convolution of a top-hat of width 4.5 spectral bins in the visual and 2.75 spectral bins in the near-infrared (the effect parameter `lsfwidth` is not currently user-settable, except by editing the yaml file; this should change in the future) with a Gaussian with standard deviation of 1 spectral bin. A spectral bin is given by the dispersion (um per pixel) on the detector.\n", + "- The `fibre_bundle` effect determines the outline of the fibre bundle on the sky, and the `spectral_traces` effect is responsible for mapping the spectra into the two-dimensional `ImagePlane` (i.e. the detector focal plane). Both effects use the same trace file. Trace files are available for all instrument modes as multi-extension FITS files. The spatial arrangement of the fibres in a bundle is given as a table in the second extension of the file. Note that the fibre apertures are modelled as squares rather than hexagons (this makes it easier to sample the source cube); of course the squares cover the same solid angle on sky as the hexagons.\n", + "\n", + " \n", + " \n", + "\n", + "The remaining traces map the spectra into the detector. This is done in a strictly linear manner, i.e. with constant dispersion (different for each mode). Each fibre is mapped as a one-dimensional spectrum onto a single row of the `ImagePlane`. \n", + "\n", + "The `ImagePlane` is produced by the `mosaic.observe()` command and is an image of the expected flux in photon/s in the detector plane, without noise. It is accessible by `mosaic.image_plane.hdu`.\n", + "\n", + "The `mosaic.readout()` command subsequently invokes the detector configuration to create a noisy detector readout from the `ImagePlane`. The detectors are defined in `MOSAIC_DET_VIS.yaml` and `MOSAIC_DET_NIR.yaml`, respectively. The geometric layout of the detectors is given by the effect `detector_array`, which reads `FPA_mosaic_VIS_layout.dat` and `FPA_mosaic_NIR_layout.dat`, respectively. The visual detector is currently described as a single 13000 x 160 array rather than the four 6k x 6k detectors foreseen for the actual instrument (hence the \"s(i)mpl(e)\" in the yaml file name) . This is because Scopesim only simulates a single fibre bundle, so a narrow effective detector is sufficient. Masking the gap between the two detectors is left to the user. The NIR detector is modeled as a single 4k x 4k detector (as in the actual instrument) to have enough room for the mIFU mode. \n", + "\n", + "The QE is handled by the effect `quantum_efficiency`, which uses the files `QE_VIS_ML2_depleted.dat` and `QE_detector_NIR.dat`, respectively.\n", + "\n", + " \n", + "\n", + "Finally, both detector yamls include the effect `collapse_1d`, which sums up the separate spectra from the fibres and produces a single output spectrum as described above. It is possible to switch this off with `mosaic['collapse_1d'].include=False` to see the \"detector image\". However, due to the way the spectra are currently formed, this is probably not of much interest." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.9" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/MOSAIC/docs/example_notebooks/static/ELT_emissivity.png b/MOSAIC/docs/example_notebooks/static/ELT_emissivity.png new file mode 100644 index 00000000..1495b5dc Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/ELT_emissivity.png differ diff --git a/MOSAIC/docs/example_notebooks/static/ELT_throughput.png b/MOSAIC/docs/example_notebooks/static/ELT_throughput.png new file mode 100644 index 00000000..aaec159a Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/ELT_throughput.png differ diff --git a/MOSAIC/docs/example_notebooks/static/MOS-HR-fibre_bundle.png b/MOSAIC/docs/example_notebooks/static/MOS-HR-fibre_bundle.png new file mode 100644 index 00000000..9f11f5bc Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/MOS-HR-fibre_bundle.png differ diff --git a/MOSAIC/docs/example_notebooks/static/MOS-LR-fibre_bundle.png b/MOSAIC/docs/example_notebooks/static/MOS-LR-fibre_bundle.png new file mode 100644 index 00000000..1d2441bf Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/MOS-LR-fibre_bundle.png differ diff --git a/MOSAIC/docs/example_notebooks/static/MOSAIC-QE.png b/MOSAIC/docs/example_notebooks/static/MOSAIC-QE.png new file mode 100644 index 00000000..5d46f7a7 Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/MOSAIC-QE.png differ diff --git a/MOSAIC/docs/example_notebooks/static/MOS_NIR_transmission.png b/MOSAIC/docs/example_notebooks/static/MOS_NIR_transmission.png new file mode 100644 index 00000000..b51670fd Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/MOS_NIR_transmission.png differ diff --git a/MOSAIC/docs/example_notebooks/static/MOS_VIS_transmission.png b/MOSAIC/docs/example_notebooks/static/MOS_VIS_transmission.png new file mode 100644 index 00000000..1c1260d4 Binary files /dev/null and b/MOSAIC/docs/example_notebooks/static/MOS_VIS_transmission.png differ diff --git a/irdb/tests/test_package_contents.py b/irdb/tests/test_package_contents.py index 5725d41d..0ad71e1c 100644 --- a/irdb/tests/test_package_contents.py +++ b/irdb/tests/test_package_contents.py @@ -57,7 +57,9 @@ def test_default_yaml_contains_packages_list(self, package, badges): result = "packages" in yaml_dict # METIS is special since in WCU mode it operates without METIS. - if pkg_name not in {"METIS"}: + # MOSAIC has no MOSAIC.yaml. + # TODO: is {pkg_name}.yaml necessary? + if pkg_name not in {"METIS", "MOSAIC"}: result &= "yamls" in yaml_dict \ and f"{pkg_name}.yaml" in yaml_dict["yamls"] if result: