Multi Reticule show/adjust/lock behavior problem

A place to report problems and bugs in SharpCap
Forum rules
‍

If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Jean-Francois
Posts: 853
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Multi Reticule show/adjust/lock behavior problem

#11

Post by Jean-Francois »

Hello Robin,
There is currently no way to set the angle via scripting, but that would be possible to add if useful.
Yes, yes ! :-)

With "Get" and "Set" the angle of the reticule.

Concerning the reticules script functions ... thank for the information.
I already know it ... here a small script that shows all possible reticules from the list (with 2 surprises).

Code: Select all

import time
clr.AddReference("System.Drawing")
from System.Drawing import PointF

delay = 1

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[1]
print("1: ",SharpCap.Reticules.SelectedReticule.Name)
SharpCap.Reticules.SelectedReticule.FractionalPosition = PointF(0.1,0.1)
time.sleep(delay)

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[2]
print("2: ",SharpCap.Reticules.SelectedReticule.Name)
SharpCap.Reticules.SelectedReticule.FractionalPosition = PointF(0.2,0.2)
time.sleep(delay)

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[3]
print("3: ",SharpCap.Reticules.SelectedReticule.Name)
SharpCap.Reticules.SelectedReticule.FractionalPosition = PointF(0.3,0.3)
time.sleep(delay)

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[4]
print("4: ",SharpCap.Reticules.SelectedReticule.Name)
SharpCap.Reticules.SelectedReticule.FractionalPosition = PointF(0.4,0.4)
time.sleep(delay)

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[5]
print("5: ",SharpCap.Reticules.SelectedReticule.Name)
SharpCap.Reticules.SelectedReticule.FractionalPosition = PointF(0.5,0.5)
time.sleep(delay)

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[6]
print("6: ",SharpCap.Reticules.SelectedReticule.Name)
SharpCap.Reticules.SelectedReticule.FractionalPosition = PointF(0.6,0.6)
time.sleep(delay)

SharpCap.Reticules.SelectedReticule = SharpCap.Reticules[0]
print("0: ",SharpCap.Reticules.SelectedReticule.Name)

A script with the possibility to "save" and "set back" the position and the angle of the Single Crosshair would be easy.
The Circle reticule has more parameters, but should be possible too.
In detail, it will be necessary to think about the change of the binning or the ROI size/position.
Shall the reticule stay relative to the image or not ?

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

Re: Multi Reticule show/adjust/lock behavior problem

#12

Post by admin »

Hi Jean-Francois,

OK, I will add angle, radius, etc to make them available to scripting. You will have to be careful as (for instance) the cross reticule will not have a Radius property.

All of the positions are handled in a fractional co-ordinate space where 0,0 is top left of the image and 1,1 is bottom right. Binning will therefore leave the reticule in the same place by default, but ROI changes will make it move.

cheers,

Robin
Jean-Francois
Posts: 853
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Multi Reticule show/adjust/lock behavior problem

#13

Post by Jean-Francois »

Hello,

If somebody will test it.
I'm still waiting for the angle/radius script functions ... but you can already test my script.

Save the ZIP file somewhere on your computer, then open the script console in SharpCap and start the script.
Reticules_test.zip
(2.79 KiB) Downloaded 38 times
You can select between 3 cameras ... finder, guider and science.
The idea is to use SharpCap for the observation with a spectrometer (but you can use it on any imaging setup).
The "normal" setup has an electronic finder for the recognition of the field.
A guiding camera looking the spectrometer slit with a small sky region.
And the science camera for the recording of the spectrum.
The target star will be not centred on the 3 cameras ... so the script saves the reticules coordinates for 3 cameras.

In addition, you can show a rectangle that simulate the slit (or a portion of the slit).
The rectangle can be moved and the size can be modified.

Start SharpCap 3 times (if you have 3 cameras), start the Reticules_test.py script in each SharpCap program.
Then you can adjust the reticules:

Click on "Show the Slit", move the reticule at the position you want, then move the slit at the same position.
Click on the "Save" button.
Reticules_1.jpg
Reticules_1.jpg (75.78 KiB) Viewed 1345 times
Reticules_2.jpg
Reticules_2.jpg (75.22 KiB) Viewed 1345 times
Reticules_3.jpg
Reticules_3.jpg (75.28 KiB) Viewed 1345 times

Send me your comments,

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

Re: Multi Reticule show/adjust/lock behavior problem

#14

Post by admin »

Hi,

just to say - new version now uploaded that allows the Angle and Radius of reticules to be set via scripting (some will ignore one or the other of these properties for obvious reasons!)

cheers,

Robin
Jean-Francois
Posts: 853
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Multi Reticule show/adjust/lock behavior problem

#15

Post by Jean-Francois »

Hello Robin,

Thanks.
I update my script and it seems that it works.
I will have a test this evening ... that is the second night with possible observation !

Regards,
Jean-Francois
lowenthalm
Posts: 224
Joined: Mon May 07, 2018 12:27 am

Re: Multi Reticule show/adjust/lock behavior problem

#16

Post by lowenthalm »

Robin,

The updates you made to the code for multi-reticule seem to be working great. I haven't managed to break them once, despite my best efforts. Its also really nice that unlocking automatically turns on adjust. Its a small detail, but now I don't have to remind myself not to hit adjust anymore, which I forgot to do more than once until I got myself fingers trained up to remember to do it.
Jean-Francois
Posts: 853
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Multi Reticule show/adjust/lock behavior problem

#17

Post by Jean-Francois »

Hello,

If somebody will use my script for the reticules ... please use the download from this topic:
viewtopic.php?p=44149#p44149

The "Test" version from this topic does not have the saving of the rotation of the reticules.

Regards,
Jean-Francois
Post Reply