Scripting capturing darks?

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

Scripting capturing darks?

#1

Post by RazvanUnderStars »

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: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Scripting capturing darks?

#2

Post by admin »

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: 1779
Joined: Mon Feb 13, 2017 8:13 pm
Location: UK
Contact:

Re: Scripting capturing darks?

#3

Post by turfpit »

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: 18
Joined: Sat Aug 25, 2018 11:11 pm

Re: Scripting capturing darks?

#4

Post by RazvanUnderStars »

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.
jsadoulet
Posts: 12
Joined: Fri Jul 26, 2019 12:34 pm
Location: LYON FRANCE

Re: Scripting capturing darks?

#5

Post by jsadoulet »

Hi everybody
did someone write a script for darks library capture ?
Thanks
Jean-Paul
Post Reply