Page 1 of 1

Scripting capturing darks?

Posted: Wed Aug 14, 2019 2:15 am
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

Re: Scripting capturing darks?

Posted: Wed Aug 14, 2019 9:32 pm
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

Re: Scripting capturing darks?

Posted: Wed Aug 14, 2019 11:01 pm
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

Re: Scripting capturing darks?

Posted: Fri Aug 16, 2019 12:35 am
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.

Re: Scripting capturing darks?

Posted: Mon Jan 13, 2020 3:51 pm
by jsadoulet
Hi everybody
did someone write a script for darks library capture ?
Thanks
Jean-Paul