A Couple of small feature requests

Got an idea for something that SharpCap should do? Share it here.
Forum rules
'+1' posts are welcome in this area of the forums to indicate your support for a particular feature suggestion. Suggestions that get the most +1's will be seriously considered for inclusion in future versions of SharpCap.
Post Reply
Borodog
Posts: 485
Joined: Fri Jan 01, 2021 7:25 pm

A Couple of small feature requests

#1

Post by Borodog »

I have a couple of small feature requests.

1) Under the FX, please add a version of the frame stacking (3, 5, 10) that averages the frames instead of adding them. The latter is completely useless as far as I can tell, as it forces you to turn down the exposure so it doesn't blow out. I have no idea what that the purpose of that is, but I desperately need a version that operates the way I would expect it to, by averaging.

2) On the autofocus graph (i.e. focus score vs. focuser position), please add error bars. Also, how is the fit being done? Is it being done with least squares or least absolute residuals? Please consider using LAR with outlier rejection instead of LS if it isn't already done that way. Also, I'd like the ability for the user to be able to click on an obviously bad sample and remove it manually from the fit.

Thanks for your consideration.
User avatar
admin
Site Admin
Posts: 17526
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#2

Post by admin »

Hi,

for the frame stack options, they were (I suppose still are) a way to brighten the image when looking for faint stuff, so they are supposed to increase the total brightness. If you want to use them as a 'reduce noise' filter, then can turn down the gain instead of the exposure - unless you are already at minimum gain of course. By turning down the gain, you keep collecting the same number of photons per pixel per frame, so the averaging will have a useful effect in reducing noise without overexposing.

On the focus score front, the current regression is least squares. However I do already have code that does least absolute deviation for the background gradiant removal, so I have the tools to do LAD fits. I will have to be cautious about this change though, since I don't want to break anything that currently works. I will investigate.

cheers,

Robin
Borodog
Posts: 485
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#3

Post by Borodog »

On the stacking front, I was already at 0 gain. The use case is that I want to check collimation and collimate on a bright star, specifically my alignment star. But the star is so bright that even at zero gain you have to turn down the exposure so short that seeing dominates. So then you try to turn on averaging and it blows out. So you have to turn down exposure even more, until your shutter speed is so fast that most of the benefit of stacking is lost. I keep trying to figure out some combination that works well and there simply isn't one, where averaging would work perfectly.

If you want to see fainter stuff by integrating more photons, just turn up the exposure.

On the focus front, I understand not wanting to break what works, but for planetary imaging I use the Fourier Detail focus method and the autofocus routine has fairly frequent failures even in decent seeing. Given that LAR is more robust to outliers than LSR should make focusing more robust. But even if you leave LSR fitting, plotting the error bars/standard deviations of the measurements and automatically kicking out points with high standard deviations or allowing the user to manually kick them out would be a great enhancement.
User avatar
admin
Site Admin
Posts: 17526
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#4

Post by admin »

Hi,

OK, good feedback, thanks. Any chance that you can send me a log from a failed focus run please? I can extract the graph data from the log and then see how a least absolute deviation fit would compare to a least squares fit on some real data.

cheers,

Robin
Borodog
Posts: 485
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#5

Post by Borodog »

Edit: Never mind; I found it. Sent you an email.

By the way, have you considered adding a Laplacian focus method? They are quite good and very fast to calculate. You convolve the image in the focus box with the laplacian kernel:

0 -1 0
-1 4 -1
0 -1 0

and then calculate the variance, or something similar.

Autostakkert uses a Laplacian quality estimator and I have confirmed that its quality metric can definitely identify best focus. It may be more robust to seeing than other methods.

https://www.cloudynights.com/topic/7940 ... ry11444725
Borodog
Posts: 485
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#6

Post by Borodog »

More on focusing. I would like to use the sequence planner to do planetary animations. Because of temperature drop, I need to intermittently refocus. But I cannot trust the autofocus to work, because of the frequent failures, and when it fails, it just leaves the focus at the end of the focus scan instead of either automatically retrying, or failing that, at least returning to the previous focus. If I tried to automate the process using this method, the first time the automatic refocus failed, the rest of the frames would be hopelessly blurry.

Hence I guess what I would like is:

- A more focus method for planetary imaging that is less sensitive to seeing, perhaps the Laplacian method; I know this may be tough because bad seeing mimics bad focus, but honestly I am not going to be imaging in bad seeing.
- A more robust fitting method that is less sensitive to outliers (LAR) that automatically kicks out outliers
- Some kind of toggle that, upon failing to fit, returns the focuser to the original position and tries again, and either keeps retrying until it succeeds or leaves the focuser at the previous position, whatever the user selects

Separate from that automation, I want to see the error bars and be able to manually kick out bad data points.

I hope that clarifies what I am after and why.
Last edited by Borodog on Thu Oct 20, 2022 3:01 am, edited 1 time in total.
User avatar
admin
Site Admin
Posts: 17526
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#7

Post by admin »

Hi,

the 'Contrast (Edge) Detection' focus score option in SharpCap does use the standard deviation of the laplacian to calculate the value - the only tweaks are that areas below the black level are masked out and the result is scaled by the mean value of the area being measured to try to make the value produced somewhat insensitive to brightness changes.

However, the problem with that measurement is that it is highy influenced by pixel noise in the frame. For noisy images the Histogram Range detection may be superior, since the noise hardly affects it, but poor focus tends to blur detail and hence reduces the deviation of brightness from the mean.

Anyway, I will look through the data you have sent to see how much a least absolute deviation helps.

I can easily tweak the autofocus step to return to the start point if it fails - that can then be combined with the retry block in the sequencer to allow for retry in the case of an error, which should help.

Note that I am now making most feature related changes like these to SharpCap 4.1, which is in private alpha testing at the moment. Please let me know if you would be interested in joining the alpha testing group.

thanks,

Robin
Borodog
Posts: 485
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#8

Post by Borodog »

100% would like to join the group.
User avatar
admin
Site Admin
Posts: 17526
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: A Couple of small feature requests

#9

Post by admin »

Hi,

OK, I have added you. You will see an extra 'alpha testers' forum at the top level of the forums. That's the place to find download links and to discuss any issues you discover. Be prepared for possibly more bugs than usual, since I am using this opportunity to change things that are too risky for me to change in 4.0 and get into a weekly update. In general it's a good idea to make sure you keep SharpCap 4.0 installed so that you can switch back to that if you encounter a big problem.

Other alpha testers welcome - please contact me.

cheers,

Robin
Borodog
Posts: 485
Joined: Fri Jan 01, 2021 7:25 pm

Re: A Couple of small feature requests

#10

Post by Borodog »

Thanks, Robin. Will try it tonight.
Post Reply