Blame view

docs/source/guitastro_simple_examples.rst 1.3 KB
527116ca   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
51
52
53
********************************************
Guitastro Device DeltaTau simple examples
********************************************


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

For Linux:

.. code-block:: bash

	cd ~/Documents/guitastro_device_deltatau/src
	python3

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

.. code-block:: bash

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

	>>> import guitastro
	>>> import guitastro_device_deltatau


1. List Components of a device
**************************************

.. code-block:: python

	>>> dev = guitastro_device_deltatau.Device_Deltatau("TCA")
    >>> print("Components are:")
    >>> for key, val in dev.components().items():
    >>>    print(f" * {key} of type {val[0]}")

2. Open the connection and send commands
******************************************

.. code-block:: python

	>>> dev = guitastro_device_deltatau.Device_Deltatau("TCA")
    >>> dev.open(False)
    >>> dev.commandstring("mount SET target 'RADEC 12h56m -10d23m'")
    >>> dev.commandstring("mount DO RADEC_GOTO")
    >>> res = dev.commandstring("mount GET motion")
    >>> res = dev.commandstring("focuser GET motion")