[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: PNG File 2fiberpositions.png     PNG File 2positions_firstmask.png     PNG File 7fiberpositions.png     PNG File FRD_Residual_Uncertainty.png     PNG File image-2020-11-09-16-47-01-525.png     PNG File v034b_noise2.png     PNG File v034b_noise_x10_2.png    
Issue Links:
Relates
relates to PIPE2D-630 Deliver algorithms to handle FRD extr... In Progress
relates to PIPE2D-636 FRD extraction function for noiseless... Done
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 PIPE2D-636 results in v034b_noise2.png. While the minimum of the residual plot can correlate with the input FRD (dot-dashed line), the spread in values due to the noise is large. Extraction of the FRD requires more finesse, as expected.

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.

Generated at Sat Feb 10 15:55:41 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.