Does SGP talk to Planewave's PWI AutoFocus?

If a human can do it like you folks are above, a computer can too. (-:

High level…

  1. Be sure you’re only using stars to the best of your knowledge. Comparing against a star catalog is likely the best way for a computer to do that.
  2. On top of the above, reject any outliers. Any HFD that falls outside a default 3-sigma average sounds good. Make this limit user adjustable.

I’ll see if I can get more details for the Planewave PWI3 logic. It may be getting some help from Maxim. Its V-curve is very consistent. If I run it 5 times on the same star field, my results are within +/- 20 microns on a 5800 micron focus. It detects more stars as you get closer to focus. It also seems to work well when detecting only 10 stars.

KG

One more measurement with artificial stars with a HFD=2.0 /HFR 1.0. The variation in the SGP measurements becomes much higher. Also for the brightest stars with a very good SNR value.

1 Like

I tried something I didn’t do before. In the star simulation the star center of gravity is at a pixel center. I have modified the simulator such that the star center is at a pixel corner. This results in four equal illuminated pixels in the middle. Then for the simulation HFR=1 SGP reports the correct HFR and values are very stable. But the star detection algorithm should be able to detect the stars at any location. ASTAP report for this artificial image a HFR of 1.15 In practice the star can be at any location and the algorithm should ideally report the same value for each location.

Han

1 Like

I have issued an ASTAP development version 0.9.439 with an improved artificial star image creation tool (tab pixel math 2). The center of the star is placed random within a pixel. The Gaussian signal dropoof is calculated on sub pixel level. Download:http://www.hnsky.org/astap_setup.exe It will show Gaussian shaped stars up to HFD= 5 (HFR=2.5). Above this value it will produce star donuts. The produced artificial images should be very close to reality.

After loading and measuring these artificial images in SGP, the measured HFR values are varying more then they should and this could effect focusing. Especially if only a few stars are visible. I see the similar variation in HFR values if real images are tested in SGP.

Han

1 Like

Hi Han,

fyi: I’ve just downloaded your latest version 0.9.439 (I think I was on 0.9.418 previously) and have so far reviewed a couple of the AF packs that I reported on in my Excel spreadsheet. From this so far limited analysis I’m seeing a) a small improvement in #stars detected slightly moreso in the extremeties of the AF curve than near best focus; b) a small reduction (0.01-0.02) in the reported median HFD values reported - I assume as a result of the few extra star detections. All this I feel suggests we (or more precisely you!) are helping make some further minor improvements to SGP AF.

*** In view of above I’m thinking that if/when Jared releases a beta with this proposed change that the release note should also include a recommendation to upgrade ASTAP to latest release ***

I’ve also been investigating some subs I have of targets that I thought might cause ASTAP star detection issues, such as Stephan’s Quintet compact galaxy group and M33 with its numerous Ha emission regions, but apart from that one PN discussed above I’ve not so far noticed any other objects or artifacts erroneously counted as star detections. Only a very small sample I readily admit but most encouraging I think.

On the topic of false detections I am wondering if it would be simple for you to include a menu item to request output of say a .csv file containing an ordered list of the HFD/HFR measurements calculated for an image? I’m thinking that in any future discussion on the merits of e.g. simple median versus sigma crop plus median, then numerical evidence could be readily obtained to support/reject a proposal.

Regards

Mike

1 Like

The best approach will be to get SGP star detection and focusing better. Use of ASTAP should be intermediate solution.

@han, cc @Jared

My apologies if I have somehow gotten ahead of the game.

I feel that with your generous assistance, investigating with ASTAP has produced a solid body of evidence to show SGP’s AF star detection could be somewhat improved.

I’m naturally hoping that Jared will soon report confirmatory feedback from the friends to whom he released his prototype to for testing and that this feedback will also be positive.

As a keen user (weather permitting) I am naturally interested in seeing seemingly solid improvements released as soon as possible. However it is clearly for the SGP devs to decide their long-term product direction.

I have no idea of the time and effort needed to get to the level of capability offered by ASTAP but as a user it seems you have in-depth knowledge and a product (or a component therein) that it would seemingly be somewhat short-sighted not to capitalise upon, with your mutual ageement.

Apologies again if I have accidently trodden on toes

Regards

Mike

1 Like

Mike, I don’t mind if they use ASTAP. The topic has my technical interest and there is always something to learn.

Jared, I have SGP running together with my “Sky Simulator for ASCOM. v0.1.19” so I can run focussing in simulation. Can I experiment with the SGP version capable of using ASTAP for HFR measurements to see the difference?

Han

Han,
Yes, I’ll PM you.

Jared

That helps. First I had some problems, but have now adapted the ASTAP commandline routine to work better with out-of-focus stars. I will release this version tonight. Also my simulator required some adaptations. This is the current result the normal routine and using ASTAP for HFD measurements:

Jared,
The updated ASTAP version is now released. Ask the beta testers to try this version. It will work much better. HFD probably up to about 20 max. (star diameter should be about 20 pixels max}

Download link for this development version 0.9.440:
http://www.hnsky.org/astap_setup.exe

Han

1 Like

Will do!

Thank you,
Jared

@han, @Jared

I don’t know anything about theory or implementation of the current star detection / HFR calculation in SGP but visually the ASTAP curve looks far superior. Excellent!

@jmacon

I recall that you were heavily involved in the recent changes to SGP to improve the AF curve fitting routines.

I appreciate that the data used in Han’s charts above is generated synthetically but believe it to be centred on a focusser setting of 24990 (Correct, Han?). It disturbs me somewhat that apart from the extra data point on the RHS, the data values are entirely symetrical in the ASTAP detection yet the curve fit has determined 25018 as the point of best focus!

I have often felt that the curve fitting was perhaps unduy weighted to the values at the AF curve extremeties. If this is so then a poor quality image at the extremes could well shift the centre point of the curve quite significantly. Just wondering if there is maybe room for a little further refinement? I guess that 28 focuser steps when the AF step-size is 200 is a relatively triffling amount but for a few I think this might still be troubling!

Regards

Mike

Yes, I wrote the Parabolic (quadratic) fitting routine that determines best focus given a set of data points. In the two focus runs above, they are sub-optimum because the wings are too tall. For better results they should not be so tall as to get into the region where the wings are a straight line. A focus curve theoretically, and in practice, follows most closely a hyperbola. I used a parabolic fit. It would have been much better to program a hyperbolic fit. Parabolas continue to curve indefinitely. Hyperbolas quickly shift to straight lines. Shoot for a max/min hfr ratio of around 3. These curves are closer to 5. I would never use more than 9 data points, that is plenty. In fact, I am currently using 5 which is working just great, and runs much faster. Adjust the step size so that 7 or 9 data points give you a 3 to 1 ratio.

The input image where the result of my simulator. It produces Gaussian shaped stars and the focus curve is following a perfect programmed hyperbolic curve. As jmacon indicted the hyperbolic curve fits better the real focus curve. For long focal lengths the lowest point of the curve is limited by the seeing but for my APO telescope of 580 mm focal length, I get an almost perfect hyperbola.

The ideal focus was 25000 but 25018 is good enough.

Now I’m interested in real field test reports. I don’t have SGP installed in my observatory and secondly it is cloudy here.

If ASTAP is performing satisfactory and in case of interest, I could consider exporting the star x,y positions as suggested. :slight_smile:

Han

I think the 25018 comes from the different length of the wings. That is a small disadvantage of trying to match an parabolic with the hyperbola.

I did a few more runs and in most cases the parabola curve fitting finds the perfect focus at 25000. (In case you want to experiment, the next version of the simulator 0.1.21 will be much faster and can build an artificial image in seconds.)

Han

Hi Han,

A few AF image packs have been uploaded at Posts 30 and 34. Would these be of any use for a small trial? Copy the images one by one to your camera simulator image file location. I’m sure some more could be provided if of use. Comparing a sample of ASTAP’s output with SGP’s present results would be a strong selling point I would hope!

On KG’s concern about non-stellar objects being caught up by the star detection process leading to anomalous results, I am wondering if as a future refinement it might be possible to use your catalogue files to generate a star mask for the AF image? I notice the SGP’s AF images do not currently have an RA/DEC hint - I recall this would be needed for ASTAP to plate solve the images in order to create the star mask.

Just floating some ideas

Mike

1 Like

Han, I think also exporting your calculated HFD values would be useful too. Not only for SGP, but also for others who might like to experiment with roll-you-own focusing algorithms or image quality analysis. Would that be possible?

Hello Ross,

I have tried some your packs and analysed the HFD values in ASTAP and produced graphs of the result to compare with theSGP curves. Based on that I have increased in ASTAP the minimum SNR value required for the stars from 10 to 30. Otherwise the result where not so good. Only a part of the star disk was detected. The results look a little better then SGP but not impressive. For some images the tracking was not optimal.

Download spreadsheet results:

The updated ASTAP 0.9.441 version:
http://www.hnsky.org/astap_setup.exe

And this is the way to extract the HFD values. Unfortunately the focus position is not available in the FITS header, so I had to add it manually. Maybe Jared can add that. For a command line version to export X, Y… I will look into later:

Han