guitastro_examples.rst
1.2 KB
Guitastro examples
To execute the simple tests, first open a Python console and import guitastro:
For Linux:
cd ~/Documents/guitastro/src
python3
>>> import guitastro
For Windows (using powershell):
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:
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:
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.