GithubHelp home page GithubHelp logo

Comments (1)

moustakas avatar moustakas commented on July 19, 2024

This ticket is a bit of a rabbit hole and I'm inclined to close it. The crash actually occurs in specsim when the atmospheric extinction is interpolated onto the input wavelength grid--
https://github.com/desihub/specsim/blob/master/specsim/config.py#L488

However, the extinction grid only extends to 9999.9 A while the wavelength grid in the example in this ticket extends to 10000.0 A and so an extrapolation exception is raised. In its defense, specsim does have some options to allow for extrapolated interpolation, but it looks like some of the options in scipy may have changed since the code was written.

Unfortunately, choosing a shorter maximum wavelength results in a different crash that I'm not inspired to pursue:

from desisim.simexp import simulate_spectra
from desisim.templates import ELG
flux, wave, meta, obj = ELG(maxwave=9990).make_templates(1, seed=1)
sim1 = simulate_spectra(wave, flux)
INFO:io.py:971:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v3.2/elg_templates_v2.2.fits
INFO:iers.py:82:freeze_iers: Freezing IERS table used by astropy time, coordinates.
DEBUG:simexp.py:418:simulate_spectra: loading specsim desi config desi
DEBUG:simexp.py:422:simulate_spectra: creating specsim desi simulator
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/ioannis/code/desihub/desisim/py/desisim/simexp.py", line 423, in simulate_spectra
    desi = desisim.specsim.get_simulator(config, num_fibers=nspec,
  File "/Users/ioannis/code/desihub/desisim/py/desisim/specsim.py", line 52, in get_simulator
    qsim = specsim.simulator.Simulator(config, num_fibers,
  File "/Users/ioannis/code/desihub/specsim/specsim/simulator.py", line 75, in __init__
    self.instrument = specsim.instrument.initialize(config, camera_output)
  File "/Users/ioannis/code/desihub/specsim/specsim/instrument.py", line 622, in initialize
    initialized_cameras.append(specsim.camera.Camera(
  File "/Users/ioannis/code/desihub/specsim/specsim/camera.py", line 145, in __init__
    raise RuntimeError(
RuntimeError: Wavelength grid min does not cover b-camera response.

For the record, this ticket came up as I was trying to understand #563.

from desisim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.