## Testbed

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

### Testbed

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

Posts: 1999
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: Testbed

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

Posts: 1999
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: Testbed

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

### Who is online

Users browsing this forum: No registered users and 1 guest