desihub / specsim

Quick simulations of spectrograph response
2 stars 10 forks source link

Fiberloss method shouldn't read in file in galsim mode #90

Closed belaa closed 6 years ago

belaa commented 6 years ago

When the fiberloss method in the config file is set to galsim, initialize(config, camera_output) in instrument.py still looks for thegalsim-fiber-acceptance.fits file:

RuntimeError: Cannot find file ~/Data/desimodel/0.4.2/data/throughput/galsim-fiber-acceptance.fits. May need to update desimodel svn ?

This was run on an older desimodel version 0.9.0.dev307, but this file should still only be required in fastsim mode.

dkirkby commented 6 years ago

Although I suggested this issue, after looking at the code I think the correct way to work without this file is to comment out this line in the config file

fast_fiber_acceptance_path: throughput/galsim-fiber-acceptance.fits

which will simply disable the fastsim mode.

I just added some comments to this section of desi.yaml to clarify this, and improved the error handling when "fastsim" is requested, but this line is commented.