Scripting capturing darks?

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
RazvanUnderStars
Posts: 11
Joined: Sat Aug 25, 2018 11:11 pm

Scripting capturing darks?

Post by RazvanUnderStars » Wed Aug 14, 2019 2:15 am

I'd like to rebuild my darks library with more frames and was looking to automate the creation since it involves multiple combinations of gain and exposure time (with a fixed temp of -10C, I have a ZWO ASI294MC Pro).

I looked at the properties and methods of the camera objects and its controls (while being connected to it) but have not seen anything that would suggest support for dark frames, at least by name. To be precise, I'm interested in replicating what the Capture Dark dialog does (capturing, averaging and saving the dark in a folder following the naming conventions for darks). Ideally, there's a high level function to do this.

Is the above possible with 3.2.5986 Pro?

Thanks,
Razvan

User avatar
admin
Site Admin
Posts: 3254
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Scripting capturing darks?

Post by admin » Wed Aug 14, 2019 9:32 pm

Hi,

Sorry, but there is no way currently to script the capture of dark or flat frames.

The procedure of averaging the dark frames is quite similar to live stacking with no alignment. You could probably script that and then after a certain number of frames save the stack as a 32-bit stack. The problem is that you then need to divide every value in that saved file by the number of stacked frames and resave from a 32 bit fits file down to a 16 bit fits file. There's nothing in the SharpCap scripting that will help you with that, but it may be possible in other tools.

Cheers, Robin

User avatar
turfpit
Posts: 887
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: Scripting capturing darks?

Post by turfpit » Wed Aug 14, 2019 11:01 pm

it may be possible in other tools.
ImageJ ?? Google imagej convert 32 bit to 16 bit but expect to have to do some research.

Also https://imagej.net/Batch_Processing

Good luck.

Dave

RazvanUnderStars
Posts: 11
Joined: Sat Aug 25, 2018 11:11 pm

Re: Scripting capturing darks?

Post by RazvanUnderStars » Fri Aug 16, 2019 12:35 am

admin wrote:
Wed Aug 14, 2019 9:32 pm
Sorry, but there is no way currently to script the capture of dark or flat frames.

The procedure of averaging the dark frames is quite similar to live stacking with no alignment. You could probably script that and then after a certain number of frames save the stack as a 32-bit stack. The problem is that you then need to divide every value in that saved file by the number of stacked frames and resave from a 32 bit fits file down to a 16 bit fits file. There's nothing in the SharpCap scripting that will help you with that, but it may be possible in other tools.
It'd make a nice feature, if I may use this opportunity to suggest it. Or, to be more precise, not just capturing darks, but the ability to trigger through scripting the actions that are performed through the UI. For the darks there's no user interaction apart from setting the parameters and triggering the action. In other words, a higher level function that doesn't deal with the details of the operation, just invokes it on behalf of the user.

Alternatively, there could be a menu option called Create Dark Frame Library, taking {min gain, max gain, gain step}, {min exposure time, max exposure time, exposure time step} , {min temp, max temp, temp step} and so on and triggering the capture for all the combinations.

Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests