Skip to content

Gaps in spectroscopic traces when wavelength range is split into several FoVs #842

@oczoske

Description

@oczoske

What happened?

Sometimes the waverange covered by a spectrum is split into several subranges, e.g. when a PSF file contains extensions with the PSF specified at various wavelengths. For each of these subranges a FieldOfView object is built and mapped onto the ImagePlane by the SpectralTrace. Even though the subranges are supposed to be contiguous, gaps arise in the ImagePlane in the form of pixels (often lines of pixels in the spatial direction) which are not covered by any FoV and remain dark. An example for LMS was given in #838 and is shown again here:

Image

With the new METIS PSFs the problem is much worse in the LSS modes because each LSS mode covers several wavelengths for which PSFs exist.

  • check whether FoV wavelength ranges are really contiguous.
  • check why these dark pixels drop out of either adjacent FoV
  • if necessary create overlaps between FoVs and ensure that each ImagePlane pixel is covered by one and only one FoV.

Code to reproduce

cmd = sim.UserCommands(use_instrument="METIS", set_modes=["wcu_lss_l"])
metis = sim.OpticalTrain(cmd)
metis.observe()
plt.imshow(metis.image_planes[0].data)

Exception traceback

ScopeSim bug_report()

Python:
3.12.9 (main, Feb  5 2025, 01:31:18) [GCC 14.2.0]

Installed Python packages:
           anisocado: 0.4.0
         astar-utils: 0.4.0
             astropy: 6.1.7
      beautifulsoup4: 4.13.4
            docutils: 0.19
               httpx: 0.28.1
                lxml: 5.4.0
          matplotlib: 3.10.1
      more-itertools: 10.5.0
               numpy: 1.26.4
           packaging: 25.0
               pooch: 1.8.2
              pyyaml: 6.0.2
               scipy: 1.16.2
            scopesim: 0.11.1a1
       scopesim_data: could not be loaded.
  scopesim_templates: 0.6.2a0
         skycalc-ipy: 0.6.0
             synphot: 1.5.0
                tqdm: 4.67.1

IRDB installation

Cloned and linked IRDB repository

Use case

Other

Metadata

Metadata

Assignees

Labels

spectroscopyRelated to spectroscopic modes

Type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions