desihub / desisim

DESI simulations
BSD 3-Clause "New" or "Revised" License
16 stars 22 forks source link

fiber angular size #77

Closed sbailey closed 6 years ago

sbailey commented 8 years ago

The DESI platescale is a function of focal plane radius (see $DESIMODEL/data/focalplane/platescale.txt), and thus fibers have a different angular size on the sky depending upon their radius on the focal plane.

Model that.

This affects both the amount of object light that makes it into the fiber and the amount of sky background that makes it into the fiber.

Downstream pipeline steps will need to model this and remove the effective fiber input throughput differences as part of the sky subtraction, flux calibration, fiber flat fielding, etc.

dkirkby commented 8 years ago

This is related to desihub/specsim#24. Both this issue and #76 require moving away from having a few pre-calculated filberloss files to being able to calculate fiberloss curves on the fly. I have been thinking about how to do this in specsim, and leaning towards using GalSim, which already does the hard work of evaluating and convolving all the relevant profiles (Airy, Kolmogorov, Sersic, etc). However, that's not a lightweight dependency, so I would also implement a fallback where everything is Gaussian. Thoughts?

sbailey commented 8 years ago

You are quite right that galsim is "not a lightweight dependency" (e.g. its INSTALL.md is 13 pages long with many manual steps...) Core DESI code should not depend upon something that complicated to install. At the same time, an "everything is Gaussian" fallback likely isn't realistic enough, so we'd still need a different solution.

This seems like a good candidate for writing a custom code in-house that does exactly what we need but no more (possibly borrowing ideas from galsim, but not galsim itself). The parameter space seems too large for a brute force lookup table interpolation, but perhaps a cythonized version of the convolutions would work.

Parameters that we should vary:

Galsim does this but is too heavyweight to be viable unless we are really desperate. Gaussians are too simple to be sufficiently realistic. This is definitely a "help wanted" (help needed!) task to find a pragmatic middle ground.

dkirkby commented 8 years ago

For the seeing model, I recommend a Kolmogorov model since it includes a physically motivated wavelength dependence. I think we also need an optical PSF, for which I recommend an Airy model that includes the pupil obscuration of the secondary and supports, since this also has a physically motivated wavelength dependence.

As a next step, I propose to put together the pieces in some standalone code using GalSim so we have a reference point for any non-GalSim implementation and can compare with a Gaussian-only calculation.

I also (re)raised the issue of making GalSim conda / pip installable here: GalSim-developers/GalSim#658

sbailey commented 6 years ago

implemented in desisim via specsim, with options for galsim or fastsim model.