desihub / specsim

Quick simulations of spectrograph response
2 stars 9 forks source link

Simulation realism: part 1 #46

Closed dkirkby closed 8 years ago

dkirkby commented 8 years ago

This is the first major piece of adding simulation realism. The simulation now knows about the plate scale variation across the focal plane and can locate simulated sources on the focal plane, resulting in the correct variation of on-sky fiber area and shape.

The next step is to upgrade the fiber acceptance fraction calculations #5 so that the source throughput reflects focal plane position (currently only the sky background level reflects the on-sky fiber area).

Fixes #24.

dkirkby commented 8 years ago

@sbailey @moustakas I am planning to merge this tomorrow so I can start work on part 2, but let me know if I should hold off to allow time for review. Integration with desisim will not start until the dust settles on part 2.

moustakas commented 8 years ago

I'm not set up right now to test the code, but I did read through all the proposed changes. Everything looks good as far as I can tell. I wonder whether users will get tripped-up by having to specify the units with the exposure time (lines 30-31 of driver.py); for example, do I specify "minutes" with "m" or "min"? In any case I'm looking forward to the hook-up with desisim.

dkirkby commented 8 years ago

I actually made the same mistake ('m' vs 'min') when I was testing, so I just improved the error handling:

% quickspecsim -c desi --exposure-time=15m
Quantity "15m" is not convertible to s.