[PIPE2D-342] Define {{Lsf}} class Created: 08/Feb/19 Updated: 05/Jan/21 Resolved: 26/Mar/20 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0 |
| Type: | Task | Priority: | Normal |
| Reporter: | hassan | Assignee: | price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Story Points: | 4 | ||||||||||||||||||||||||||||
| Epic Link: | 1D LSF modeling | ||||||||||||||||||||||||||||
| Sprint: | 2DDRP-2019 C, 2DDRP-2019 D, 2DDRP-2019 E, 2DDRP-2019 G, 2DDRP-2019 H, 2DDRP-2019 I, 2DDRP-2019 J, 2DDRP-2021 A | ||||||||||||||||||||||||||||
| Reviewers: | hassan | ||||||||||||||||||||||||||||
| Description |
|
Define a class for Line Spread Function information. This should ideally be a subset of the Psf class and thus have similar methods, such that it and the Psf class can be used in generic code. How the LSF is stored internally in given Lsf instance needs to be determined, as an analytical form may be useful in addition to a numerical form (an array of amplitudes versus x-position). |
| Comments |
| Comment by price [ 03/Apr/19 ] |
|
I've defined Lsf as an abstract base class, and provided a couple of example subclasses. |
| Comment by rhl [ 01/Jun/19 ] |
|
Glancing through the pull request it wasn't obvious that this class duck-types as a Psf. Does it? Actually, I don't quite see why it can't be the same class (with a 1xN image) and some pybind11 magic to always do the .array. Why can't a Kernel be an afw.Image? And I'm a bit worried about the name clashing with an afw.math.Kernel in people's minds (not the code). Does this class support undersampled data? This isn't critical yet, but it may be (well, should be if Jim builds a good spectrograph). Why provide the computeStdev method? It's a naïve implementation – what is it for? Theoretically the stdev of a perfect diffraction grating is infinite (as it is for a perfect diffraction-limited PSF) so this isn't just a concern about noise. I can think of other methods (e.g. offset Lsf by delta) but I don't think we should try to invent them now. |
| Comment by price [ 04/Jun/19 ] |
|
While the Lsf is related to an LSST Psf (in terms of history), it does not duck type as one. Is that a requirement? If so, can you give examples where you would make use of that? computeStdev is the one-dimensional equivalent of Psf::computeShape: it's the width of a line. Would a different name (computeFwhm?) help? As currently implemented, the base class convenience implementation of computeArray does not support undersampled data (it acts like LSST's Psf, just in 1D). To handle that, we'll need to make a subclass that does something clever, or use a functional form like the GaussianLsf. |
| Comment by rhl [ 04/Jun/19 ] |
|
The LSF needs to duck-type as a PSF, both to make it easier to use and (more importantly) to allow code that models spectra to work on 1-D and 2-D spectra.
|
| Comment by price [ 12/Sep/19 ] |
|
I've made the Lsf duck type as an LSST Psf. It will not work for C++ code (e.g., exposure.setPsf(lsf) won't work) because it's defined in python, but it should work in Task codes where the Psf is provided separately. Please have another look. |
| Comment by price [ 26/Mar/20 ] |
|
Addressed rhl's comments and merged to master. |