Suggested change to Dithering Algorithm

43 views
Skip to first unread message

David Wilden

unread,
Nov 3, 2025, 3:35:35 PM (3 days ago) Nov 3
to Open PHD Guiding
Brian, 

I've been been  using some of my log data files to reverse engineer how the new lock position is calculated when dithering is applied, and I believe the algorithm is first rotating  each dither (x,y) offset to allow for the angular offset between the camera  axis and the mount axis and then simply adding the rotated  dither coordinates to the old lock position to generate the new lock position.

The problem with this is that cumulatively adding each dither change to the previous one results in a random walk which introduces an unnecessary long term shift from sub exposure to sub exposure.  Addition of N random steps results in an average walk distance of root(N) times the step magnitude, even though on average the steps may be drawn a distribution with zero mean.  This means that pixels have to be unnecessarily clipped from the final image.

Of couse the worst case is much worse than this up to a maximum of  N times the step size, although the chance of such high offsets becomes increasingly small as N increases

To take an example, if we do 100 sub exposures and  apply a random dither within the range +/-10 camera pixels between each exposure, this means on average we would end up root(100) x 10 = 100 pixels away from the start position (assuming other sources of drift are negligible).  Of course if we were unlucky, the random changes could result in a much larger offset than this average value.

It would be better if each dither change was applied to the original position rather than being applied cumulatively. This would still distribute hot and cold pixels randomly over (in this example) 20 x 20 = 400 pixels in the final image, but would not introduce any systematic random walk.

I think the simplest way of achieving this is to store the previous dither offset, and subtract it from the lock position before adding in the new dither offset.

I appreciate that the dither algorithm has to work in the presence of other effects which are causing the signal to drift in RA and Dec,  but I think the  simple modification I have suggested above would still work in this case.

Would it be possible to make this change to the way the random dithering is applied in a future update to PHD2, or at least provide an option to  add this as an optional setting, please?

Regards

Dave 




Jens Scheidtmann

unread,
Nov 4, 2025, 3:31:04 AM (2 days ago) Nov 4
to open-phd...@googlegroups.com
Dear Dave,

Note that „systematic random walk“ is kind of a misconception. It is a random walk: The probability to return to the start point is never zero. So there won‘t be any „systematic“ regularity involved, unless your pseudorandom number generator is bad (which it isn‘t).

If you want to have it more constraint, just reduce the dither setting or

If you want to avoid that it strays too far from the start point, have your imaging software platesolve and return to the start point from time to time. 

Most of the time people tend to choose a too big 
a dither anyway, because it it is given in guide pixels and not in imaging pixels.

Hope this helps,

Jens


--
You received this message because you are subscribed to the Google Groups "Open PHD Guiding" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-phd-guidi...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open-phd-guiding/6fd53bff-1fa8-47e4-86db-d8b085ea2b77n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages