[PIPE2D-637] FRD extraction function for in-focus PSFs with noise Created: 01/Oct/20 Updated: 13/Jan/23 |
|
| Status: | In Progress |
| Project: | DRP 2-D Pipeline |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Normal |
| Reporter: | Brent Belland | Assignee: | Brent Belland |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Story Points: | 6 | ||||||||||||
| Sprint: | 2DDRP-2021 A | ||||||||||||
| Description |
|
This ticket is a specific implementation of the algorithm-development for ticket PIPE2D-630. The purpose of this ticket is to generate a function/class that takes an arbitrarily generated in-focus image from Neven's code and solves for its FRD. Read noise, Poisson noise, and continuum will be added in this step. Thus, FRD extraction is not expected to be perfect, and the error in FRD extraction will be determined. |
| Comments |
| Comment by Brent Belland [ 27/Oct/20 ] |
|
Adding Poisson and read+instrumental scattering noise to a 500,000 count PSF (~50,000 count in brightest pixel) and running the code extraction from v034b_noise_x10_2.png demonstrates the corresponding residual plot for a 5,000,000 count, 10x coadded PSF. While the minimum of the function is much more clearly correlated with the input FRD (dot-dashed line), it isn't likely to take 10 coadded images at a given position during calibration.
Next steps are: 1) Extract uncertainty in the FRD extraction algorithm, by calculating range within minimum + 1 sigma noise. 2) Determine the FRD and corresponding uncertainty from fitting 10 positions' FRD at the same time, hopefully beating down the error in a way similar to v034b_noise_x10_2.png. 3) Determine a better metric than squared residuals. FRD manifests most in the edges of the PSF |
| Comment by Brent Belland [ 10/Nov/20 ] |
|
Current status update: All residual fitting has been improved greatly by only considering the inner 10x10 pixels where the PSF resides. The noises at a given flux have been reduced more in line with practical expectation. I attempted to address point (1) from the previous comment by fitting a parabola (as a first-order approximation) to the minimum of the residual function. This allowed for a minimum to be determined and fit for. An uncertainty in the parabola minimum could be found (~ 1.5 mrad), but a more conservative metric finding a range of FRD within 1 sigma of the minimum was also calculated (+/- 4.5 mrad). (See FRD_Residual_Uncertainty.png)
(2) was subsequently addressed by fitting 10 parabolae to 10 residuals for 10 PSFs from the same fiber. This code did find the minimum to a lower uncertainty in the parabola minima (~ +/- 1 mrad) as would be expected from fitting multiple images. However, fitting N parabola for 1 parameter (FRD) is not efficient, and the residual function is not symmetric in FRD. After discussion with Neven earlier Monday, a much simpler approach using just the minima during image optimization/fitting was discussed. This approach will allow for fitting for the FRD directly and avoid the systematics of my current work. |
| Comment by Brent Belland [ 24/Nov/20 ] |
|
Chi squared minimization was incorporated that solves for the center of an arbitrary number of position inputs. 2fiberpositions.png and 7fiberpositions.png display how the center fitting for the position with the chi squared code works. The uncertainty range decreases when additional fibers are added but only a small amount; the uncertainty range from the chi squared map clearly exceed the minimum uncertainty by eye. This is due to the masking which has been discussed in previous telecons. Current work has been focused on implementing the proper masking corresponding to the uncertainty from the Cramer-Rao bound from the Fisher Information as Robert Lupton has suggested. |
| Comment by Brent Belland [ 24/Nov/20 ] |
|
2positions_firstmask.png displays what happens when I run the chi squared analysis with a mask restricted to 2-4 pixels away from the center of the PSF. The improvement in the mask is evident from the reduced chi squared, but the generation of the proper mask from Fisher information is still in development. |