Testbed

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

Testbed

#1

Post by oopfan »

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

Re: Testbed

#2

Post by admin »

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

Re: Testbed

#3

Post by admin »

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
Jean-Francois
Posts: 360
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Testbed

#4

Post by Jean-Francois »

Hello Robin,

Do you plane to "add" the SER/AVI files in the "Test Camera 1 or 2" ?

It is useful for test of some other functions (like the Stacking).


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

Re: Testbed

#5

Post by admin »

Hi,

it's something I've been thinking about, but haven't done yet. You can get close to this by using the folder monitor camera to read in a sequence of still image files from a folder (you can even create those from an SER or AVI file using PIPP)

cheers,

Robin
Post Reply