[PIPE2D-777] Difference in centering between pipeline and 2d algorithm - centering and normalization Created: 12/Mar/21  Updated: 28/Jul/21  Resolved: 09/Jun/21

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: ncaplar Assignee: ncaplar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File differences_in_subtractions.png     PNG File different_subtractions.png     PNG File example.png    
Issue Links:
Relates
relates to PIPE2D-874 Centering/offset/interpolation - fix ... Done
Story Points: 5
Sprint: 2DDRP-2021 A 4, 2DDRP-2021 A5, 2DDRP-2021 A 6

 Description   

When subtracting arcline spots one can notice differences from the final result coming out of the pipeline and the result that I expect from my modelling. For instance, Figure ``different subtractions'', shows the difference when using pipeline (subtraction with pipeline product, where `pipeline product' is the output of psf.computeImage(fiber,wavelength)) and when running my modeling (subtraction with original product.)

I have identified two main reasons:
1. a) Differences in centering. My model searches for a centering that minimizes the chi**2 in 20x20 image around the arcline spot. The pipeline fits so that center of light of the model and the data is identical. The differences in the centering dominates the differences. For instance, in the example I am showing the difference in x direction is around 1.8% of a pixel (see left panel of the differences_in_subtractions.png).
b) Differences in normalization. Normalization in the pipeline is done in a way discussed in PIPE2D-736. In my code I search for normalization that minimizes the chi**2 in 20x20 image around the arcline spot. This is a minor effect (dipole dominates left panel of the differences_in_subtractions.png ). 
2. Even after I force my model to have the same centering as the model as generated by the pipeline (and ultimately derived from the same model) I see some differences. I believe that this is due to differences in interpolation/downsampling. See right panel of the differences_in_subrraction.png (note that the scale is 10 times more zoomed in that the left panel).

This ticket is to solve problem number 1, i.e., centering and normalization problem. I believe the simplest solution is to change that my algorithm uses the same centering and normalization method as the pipeline when investigating focused solutions. Having said that I would want to consult with pundits (perhaps next Monday meeting, March 15 2021). I would also need to investigate what is the degradation of the solutions (if any).



 Comments   
Comment by ncaplar [ 09/Jun/21 ]

I have implemented the changes. My model should now be working essentially in the same manner as the pipeline regarding the centering and normalization issues. I will close this ticket now and the effectiveness will be tested in the next set of solutions applied to the real data.

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