Blame view

docs/source/guitastro_examples.rst 1.2 KB
96482ab2   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 examples
********************************************


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

For Linux:

.. code-block:: bash

	cd ~/Documents/guitastro/src
	python3
	
	>>> import guitastro
	
For Windows (using powershell):

.. code-block:: bash

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

1. Dark correction of one image
*****************************************

Subtract a dark file dark.fit to a raw image messier63.fit and save the image m63.fits:

.. code-block:: python

	ima = guitastro.Ima()
	ima.load("messier63.fit")
	ima.sub("dark.fit")
	ima.save("m63.fits")
	
2. Dark correction of a series of images
*****************************************

Subtract a dark file dark.fit to a series of raw images messier63-1.fit to messier63-25.fit and save the images m63-1.fit to m63-25.fit:

.. code-block:: python

	imaseries = guitastro.ImaSeries()
	imaseries.path("obs/my_raw_images")
	imaseries.extension(".fit")
	imaseries.sub("messier63-1.fit", "m63-", "dark.fit")

Guitastro will collect all the file names corresponding to messier63-\*.fit before subtracting dark.fit to these files.