Autofocus on edge of solar spectral image

Discussions of using SharpCap for Solar or Lunar Imaging
Post Reply
Merlin66
Posts: 16
Joined: Fri Sep 15, 2017 4:20 am

Autofocus on edge of solar spectral image

#1

Post by Merlin66 »

I'm about to upgrade my focuser on the 120/1000 refractor used with the MLAstro SHG 125/125 for solar imaging. I will be adding a ZWO EAF drive motor. This seems to work under ASCOM.
I think Sharpcap has an Contrast (edge) detection which may work?
My focus need would be to "tighten" the edge focus on a ser video of the solar spectrum. This is basically to find best focus on a section of the edge of the solar disk.
The attached image shows an extract of the solar spectrum around the Ha absorption line (long dark line near the middle).
The left and right hand edges are the solar disk. To get best performance from the SHG these edges should be as sharp as possible.
Is this possible with Sharpcap?
solar spectrum edge for focus
solar spectrum edge for focus
solar edge for focus.jpg (31.68 KiB) Viewed 2365 times

Thanks.
"Astronomical Spectroscopy - The Final Frontier" - to boldly go where few amateurs have gone before....
https://groups.io/g/astronomicalspectroscopy
https://groups.io/g/Spectroheliograph
User avatar
admin
Site Admin
Posts: 17342
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Autofocus on edge of solar spectral image

#2

Post by admin »

Hi,

I have never tried anything like this (or heard of others working this way - at least no one has mentioned it here on the forums). However, I think you should be fine - you can select a sub-area of the image to measure when performing the focusing, so that the readings are based on the area at one edge or the other. The contrast focus tool measures contrast in both horizontal and vertical directions, but the edge should be the strongest contrast in the selection so should hopefully dominate the measurement over other contributions.

It's difficult for me to be sure from your screenshot, but I *think* the spectra is running vertically in the image, in which case vertical contrast will be coming from the spectrograph, so will be relatively constant compared to the horizontal contrast which will depend on focus. If that's the case then I would expect the focus scanning and best focus detection to work.

cheers,

Robin
Jean-Francois
Posts: 822
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Autofocus on edge of solar spectral image

#3

Post by Jean-Francois »

Hello,

For long time ago ... I tested the different focussing tool in SharpCap with my Sol'Ex.
Only the "Contrast (Edge) Detection" was working.

But I did not use it regularly after my tests. One reason is the field of view of the camera lens of the Sol'Ex has some field curvature.
The optimum focus (in the case of full sun disc) is not at the edge of the sun disc (and not in the centre) but in an intermediate position.
But ... you can still use it with some shift of the sun disc at the optimum position.

Robin, yes, the spectrum lines are the curved "horizontal" lines with the wavelength direction vertically (short = down and long wave = up).
The vertical lines on the image are coming from dark sun spots or some dust on the slit.

For the observation with a spectrometer ... you need to set 3 different focuses.
1. the collimator lens (between the slit and the grating), 2. the camera lens (between the grating and the camera),
and finally the telescope focus on the slit.

The contrast tool could be used for the camera lens and the telescope. But for the focus of the camera lens, I always set a strong defocus of the telescope before doing the focus of the camera.


For my SharpCap SHG capture script, a motorised focuser can be used at different position during one single capture.
The INTI processing software can generate a "static" image. I can explain more if wanted.

Regards,
Jean-Francois

Note:
New feature request ... FWHM measurement on a line (ideally working on a curved line too :-) )
User avatar
admin
Site Admin
Posts: 17342
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Autofocus on edge of solar spectral image

#4

Post by admin »

Hi Jean-Francois,

thanks for filling in the details :)

Not sure that I will get around to customized focus score measurements for quite some time, but interestingly the focus score is all based around a single function for each tool that essentially takes a 2D array of luminance and returns a single 'score' value based on measurements made to the image data. It would _probably_ be possible to add a scripting way to plug in a python function as the measurement routine if you are interested in writing the image processing side to evaluate the focus on curved spectral lines with FWHM. If you are interested in that approach, let me know and I will see how feasible the idea of a scripting plugin is.

cheers,

Robin
Merlin66
Posts: 16
Joined: Fri Sep 15, 2017 4:20 am

Re: Autofocus on edge of solar spectral image

#5

Post by Merlin66 »

Thanks for the discussion.
The motor is currently on back order, so may be little time before I get to try it.
I’ll keep you posted.
"Astronomical Spectroscopy - The Final Frontier" - to boldly go where few amateurs have gone before....
https://groups.io/g/astronomicalspectroscopy
https://groups.io/g/Spectroheliograph
Post Reply