Testbed

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
User avatar
oopfan
Posts: 236
Joined: Sat Jul 08, 2017 2:37 pm
Location: New York
Contact:

Testbed

Post by oopfan » Tue Jul 11, 2017 7:17 pm

Hi Robin,

Is there a chapter in the docs that talks about setting up a testbed? I am new to the forum but I think I read a post that made reference to this topic directly or indirectly. I can't find it now.

What I'd like to do is this: Set up the scope one night, do a precise polar align, and record 20 minutes of 1-sec exposures of a half dozen bright stars. And then I'd like to copy those images to my desktop and start writing Python code. I would like to fool SharpCap/IronPython into thinking that these are realtime images.

If that is not possible then may I ask how do you test your code? It seems terribly inefficient to go through the effort of collecting and analyzing realtime imagery at your telescope just to find that you have a bug.

Cheers,
Brian

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

Re: Testbed

Post by admin » Wed Jul 12, 2017 6:06 am

Hi Brian,

the Test cameras come closest to what you need, in particular 'Test Camera 1' which allows you to select different images by browsing for a PNG/JPG/FITS frame. Unfortunately at the moment although you can find the 'image' control that lets you select a different frame using scripting, assigning a new filename to it doesn't work.

I don't suppose that will be much work to fix, it's just a use case I hadn't tried before. I also have playing back an AVI or SER file (or a series of frames) via the test cameras on my list of things to do, but that might take some time to get to the top.

cheers,

Robin

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

Re: Testbed

Post by admin » Wed Jul 12, 2017 6:17 am

Ah, actually it does already work, you just have to be careful with backslash characters in filenames to avoid getting '\r' or '\n' in the filename string!

Code: Select all

SharpCap.SelectedCamera.Controls.FindByName("Image").Value = 'C:\\Users\\robin\\Documents\\Source Code\\Sharpcap\\TestFiles\d1.jpg'
cheers,

Robin

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest