Upload Flat Frame for Preprocessing with a script

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
amgandi
Posts: 2
Joined: Fri Nov 10, 2023 2:42 pm

Upload Flat Frame for Preprocessing with a script

#1

Post by amgandi »

Good afternoon all!

Is there a possibility of uploading a flat frame by running an IronPython script with the path to my flat frame instead of inserting it manually via the Camera Control Panel? If yes, does anyone know the command for that?

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

Re: Upload Flat Frame for Preprocessing with a script

#2

Post by admin »

Hi Ben,

yes, you can do that no problem

Code: Select all

SharpCap.SelectedCamera.Controls.ApplyFlat.Value = "c:\\path\\to\\flat.fits"
The only complex part is that you need to use double backslash characters in the string literal to avoid python thinking \t is a tab character, etc.

cheers,

Robin
amgandi
Posts: 2
Joined: Fri Nov 10, 2023 2:42 pm

Re: Upload Flat Frame for Preprocessing with a script

#3

Post by amgandi »

Hi Robin,

Ahh okay thank you very much for the help!!

Best wishes,

Ben
Post Reply