Page 1 of 1

Record Focal Length with images

Posted: Sun Jan 14, 2018 9:53 pm
by howardgrams

I've been experimenting with various combinations of focal reducers and also with ASPS platesolving.

"One thing you may notice is that there is the option to include the current filter name in the filename using the {Filter} tag. If you are not using an ASCOM filter wheel then you can still use this feature by selecting 'Manual Filter Wheel' in the hardware settings - this will give you a filter wheel control in the camera controls panel which will not do anything except give a filter name to the file name template."

Inspired by that idea, I have started using the {Filter} tag to record the current effective focal length so as to get items like FL722 into the filenames.

It would be really nice if the current focal length could be recorded in the FOCALLEN FITS header and as a {FL} tag for use in filenames. Could you provide a Focal Length item on the Scope Controls panel similar to the current Manual Filter Wheel item and then use the value from there in the FITS header and template item for the filenames?

Presumably this would be useful for your internal calls to ASPS since platesolving is critically sensitive to focal length as well as pixel size.

(I just wasted a lot of time trying to figure out why I was no longer able to platesolve any new images nor to get Sharpcap 3.1 platesolving to work. It turned out that when I added an IR cut filter to my camera it made a 19% change in my effective focal length for images which was enough to keep any of them from solving since I was still using the focal length from before. So now I am very concerned about recording the effective focal length with any image!)


Re: Record Focal Length with images

Posted: Tue Jan 16, 2018 6:08 pm
by mAnKiNd
Hi Howard, that's really interesting about the 19% change due to the filter glass thickness! Also, nice creative way to insert a note into your capture file, I use an ASCOM filter wheel so I don't have that option...hmmm! :) I posted another thread about inserting a notes section for the live stack, but perhaps this would be more apt for the program as a whole to be able to take any notes you might wanna add to your session.

Re: Record Focal Length with images

Posted: Mon Feb 26, 2018 7:35 pm
by turfpit
I think the general facility to have an option to add a note which is saved with the capture settings file would be useful.


Re: Record Focal Length with images

Posted: Wed Sep 23, 2020 4:53 am
by sebgod
Ideally this feature would read the focal length that a connected (ASCOM) mount provides (this is unfortunately not supported in the Python scripting interface SharpCap.Mounts.SelectedMount). Writing the focal length itself via SharpCap.SelectedCamera.AdditionalFitsHeaders['FOCALLEN'] = 500 works though and is currently written to a captured FITS file.

Re: Record Focal Length with images

Posted: Wed Sep 23, 2020 6:28 pm
by admin

I can't see any big problem with making the Ascom object available via the scripting interface – I will look to see if it is technically achievable.

Cheers, Robin

Re: Record Focal Length with images

Posted: Thu Sep 24, 2020 4:12 am
by sebgod
Hey thanks,

specifically I was referring to the property FocalLength in the interface ASCOM.DeviceInterface.ITelescopeV3.
If the IFilterWheelV2.FocusOffsets (array of int) property would also be made available then one could probably script something together.
Though I am not sure how the offset would work together with focal length

Re: Record Focal Length with images

Posted: Thu Sep 24, 2020 6:01 pm
by admin

as I understand it, the focal offsets on the filter wheel are completely different – they are measured in focuser steps rather than any physical measure of distance. SharpCap 3.3 can actually be configured to take account of these and adjust the focus automatically when the filter is changed.

What I was proposing was to make the whole ITelescope object reachable via scripting – you can then ask it for any of its properties or even call methods on it if you're feeling brave (on the other hand, using it in a way that conflicts with the way that SharpCap uses internally will probably blow up in your face!)

Cheers, Robin

Re: Record Focal Length with images

Posted: Sun Sep 27, 2020 5:14 am
by sebgod
Hi Robin,

Exposing ITelescopeV3 completly would be a nice addition.
For now (v3.2) I have hacked together a script that uses ASPS directly and thus allows me (or whoever wants to use it) to rely on ASPS focal length setting in case the build-in way fails to plate solve.
I have tested this with the "Deep Sky test camera (M42)" and the ASCOM telescope simulator: ... d_solve-py

Module:, Script for SharpCap 3.2
Author: Sebastian Godelet (GitHub: sebgod)
License: MIT (see
1. Download via Gist, right-click on Raw and store anywhere on your file system.
2. Add to SharpCap scripts (requires Pro) via: SharpCap Settings -> Startup Scripts -> Add
2. Install All Sky Plate Solver ( ... olver.html)
3. If you run the 64-bit edition of SharpCap, the script will advise you to apply a registry fix (one time only)
Supported custom buttons:
1. 🎯ASPS
- Normal click
Requires camera connected, will capture a frame and try to solve it using All Sky Plate Solver.
If the mount is connected will use a near-search given current mount position and search radius,
otherwise a blind-solve will be performed.
- Shift-Click
Syncs normally and on success retargets (if mount is connected).
- Ctrl-Click
Opens ASPS configuration menu (for focal length and pixel size).
- Alt-Click
Allows you to specify a custom search radius for ASPS near search (default 15 degrees).
2. 🔍NED
- Normal click
Searches NED ( for the object specified in the `Target Name` input field,
and slews to that target on success.

Best Seb

Re: Record Focal Length with images

Posted: Sun Sep 27, 2020 7:14 pm
by admin
Hi Seb,

thanks for sharing – I always enjoy seeing the variety of functionality people managed to put together when they really get involved with the SharpCap scripting :-)

Cheers, Robin