Blame view

docs/source/guitastro_examples.rst 1.26 KB
4e3b6f1e   Alain Klotz   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
********************************************
Guitastro Device Flipro examples
********************************************


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

For Linux:

.. code-block:: bash

    cd ~/Documents/guitastro_device_flipro/src
    python3

.. code-block:: python
    
    >>> import guitastro
    >>> import guitastro_device_flipro
    
For Windows (using powershell):

.. code-block:: bash

    cd C:\Users\xxx\Documents\guitastro_device_flipro\src
    python
    
.. code-block:: python

    >>> import guitastro
    >>> import guitastro_device_flipro

1. Open the connection and acquire an image
*************************************************

.. code-block:: python

    >>> 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*.