[PIPE2D-799] Correct for Jacobian when resampling Created: 27/Mar/21 Updated: 31/Mar/22 Resolved: 11/Jan/22 |
|
| Status: | Done |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | price | Assignee: | price |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Story Points: | 2 | ||||||||||||
| Sprint: | 2DDRP-2021 A 10, 2DDRP-2021 A12 | ||||||||||||
| Reviewers: | hassan | ||||||||||||
| Description |
|
We need to correct for the Jacobian when resampling the wavelengths. |
| Comments |
| Comment by rhl [ 27/Mar/21 ] |
|
At the same time please support vector-valued dispersion values in DetectorMap (which will probably be needed anyway). The code can be as simple as this, but it needs to be a method. If we know more about the insides of the map we should be able to do better. def getDispersion(detectorMap, fiberId, wavelength, dwavelength=0.1): """Return the dispersion in nm/pixel detectorMap: DetectorMap fiberId: `int` The fiber whose dispersion is desired wavelength: `float` or iterable or `float` Wavelengths where the dispersion is desired dwavelength: `float` Interval to use for finite differencing to determine the dispersion """ wavelength = np.atleast_1d(wavelength) l0 = detectorMap.findPoint(fiberId, wavelength - 0.5*dwavelength)[:, 1] l1 = detectorMap.findPoint(fiberId, wavelength + 0.5*dwavelength)[:, 1] dispersion = dwavelength/(l1 - l0) return dispersion |
| Comment by price [ 21/Dec/21 ] |
|
pfsMerged now has units of summed counts per resampled pixel. |
| Comment by price [ 21/Dec/21 ] |
|
Before: After: |
| Comment by price [ 21/Dec/21 ] |
|
A demonstration that the units of the pfsMerged is summed counts per resampled pixel: At 637.4 nm: |
| Comment by hassan [ 08/Jan/22 ] |
|
Changes look fine to me. |
| Comment by price [ 11/Jan/22 ] |
|
Merged. |