guitastro_examples.rst 1.26 KB

Guitastro Device Flipro examples

To execute the simple tests, first open a Python console and import guitastro and guitastro_device_flipro:

For Linux:

cd ~/Documents/guitastro_device_flipro/src
python3
>>> import guitastro
>>> import guitastro_device_flipro

For Windows (using powershell):

cd C:\Users\xxx\Documents\guitastro_device_flipro\src
python
>>> import guitastro
>>> import guitastro_device_flipro

1. Open the connection and acquire an image

>>> dev = Device_Flipro("FLIPRO", name="Flipro")
>>> dev.open(True)
>>> dev.commandstring("camera SET exptime 0.1")
>>> dev.commandstring("camera DO ACQ START")
>>> while True:
>>>     timer = dev.commandstring(camera GET timer)
>>>     if timer == -1:
>>>         break
>>>     time.sleep(1)
>>> ima = dev.component('camera').ima
>>> ima.save("my_image.fit")

The command dev.open(True) makes the connection with the camera hardware. To make only simulation, replace True by False.