[INSTRM-809] Reduce MCS image centroiding error Created: 06/Nov/19  Updated: 21/Aug/20  Resolved: 21/Aug/20

Status: Done
Project: Instrument control development
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: hassan Assignee: karr
Resolution: Done Votes: 0
Labels: MCS
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1005 Compare different MCS centroiding alg... Done
Story Points: 4

 Description   

Following the last ICS-PFI-MCS telecon 2019-11-01 and email exchanges during that day, the centroiding algorithm for MCS images may need to be improved. Please update those, or provide a rationale as to why they are as optimal as can be.

Excerpt from email from J Karr to ics mailing list 2019-10-31:

Some updates on the analysis of the data

  • looking closely at the video Robert made, it looks like he was working with the raw pixel values for the centroid, which have not been corrected for the affine transformation, so changes in scaling and translation can dominate.
  • I made some new videos using the transformed values in mm at PFI, plotting the difference in position relative to the first frame (files starting with diff1) and relative to the previous frame (files starting with diff2) for two sets of exposure times (0.5, 1, 2, 5 second). All the plots are on the same scale.

https://www.dropbox.com/sh/7krvq7oqiv1dzsi/AADN-MdooW6hd-j7pRLEMKYwa?dl=0

  • in the short exposure frames, seeing effects are dominant
  • in the long exposure frames, the seeing effects are much smaller. However, we can now see a distinct pattern emerging (look, for example, at the middle right of the image).
  • this pattern is similar to the persistent pattern we see in the size of the PSFs across the image, as measured by the FWHMs. Possibly areas with different PSF sizes have different RMSs in centroid position, or that the fitting for centroiding responds differently to different PSF shapes.
  • the variation in FWHM is small enough that it's not obvious by eye - a fraction of a pixel between frames. I'm trying to get a handle on whether this difference is real, or an artifact of centroiding. We see the effect from different PSF fitting methods, so it's not a simple numerical effect (but might be related to assumptions of Gaussinity). A quick look using very simple measures of the PSF width indicates that it's a real effect; I'm still working on this.

Excerpt from an email from R Lupton to J Karr 2019-11-01:

> - this pattern is similar to the persistent pattern we see in the size of the PSFs across the image, as measured by the FWHMs. Possibly areas with different PSF sizes have different RMSs in centroid position, or that the fitting for centroiding responds differently to different PSF shapes.

It's higher order than this. The response of the centroider to different stable PSFs is taken out because we're just plotting the differences of positions, so I think that this must be the response of the centroider to the PSF resulting from interaction of seeing with variations in optical quality from spot to spot.

These spots are very bright, so using a less statistically efficient centroiding algorithm would be interesting. You're using a Gaussian-weighted centroid + iteration (I can send you my writeup if you're interested, although I didn't yet write up the statistical properties; they have to approach the MVB when the PSF is Gaussian); if you use a different weighting the convergence scale magic number will be different (the magic "2"), but it'd be easy to calculate. If I were forced to guess I'd guess "1", but can easily check that guess. Hmm, I should do that.



 Comments   
Comment by karr [ 08/Dec/19 ]

The centroiding code has been updated to fix an with centroiding accuracy, where occasional individual centroids are slightly off in position (by less than a pixel, roughly 0.1 percent of the time). This was a convergence issue in calculating the centroidings; requiring a higher precision fixed the issue. 

 

Comment by karr [ 10/Jul/20 ]

A full analysis of the centroiding code has been completed, and described in detail in the report PFS-MCS-ASI000115-03_MCSCentroidAlgorithmtReport and in summary in PFS-MCS-ASI000116-02_MCSCentroidAlgorithmtPresentation

Comment by karr [ 21/Aug/20 ]

The report has been discussed and updated according to the discussion on the telecon. To summarize: 

The data from the engineering run of Aug 2019 were reduced and analyzed using several different centroiding algorithms (the implemented code and several variations, PSF fitting and windowed centroids via SeXtractor and PSFEx and a simple thresholded moment). We discussed the large scale variations of spot shape and brightness, frame to frame variations due to seeing, and a persistent moiré pattern seen in many images. The general characteristics were the same between algorithms; the more computationally intensive algorithms had lower RMS, but the implemented code was within requirements. In general, the centroiding accuracy, moiré effects and random and systematic differences between methods were all on the order of a micron or two. 

Comment by hassan [ 21/Aug/20 ]

Following the summary from karr and discussions during the PFI telecons on 2020-08-07 and 2020-08-21, this ticket can be closed.

Generated at Sat Feb 10 16:28:51 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.