Astrophotography processing tools
Table of Contents
Once I approached astrophotography several months ago, I searched for a tool grouping all my needs in term of image processing workflow. Much of those instruments are counterintuitive and/or platform/OS restricted (and not less important not free).
So I wrote this simple library including all I need at the moment for a flexible processing workflow.
Remember that the AstroPhotoPy library can only be used inside a Jupiter / IPython notebook.
I hope you'll enjoy it!
This library is based essentially on two image processing libraries and a front-end library:
- opencv
- skimage
- IPython
This is an example of how you can setting up your project locally. To get a local copy up and running, follow these simple steps:
To install the things you need first:
- numpy
pip install numpy
- matplotlib
pip install matplotlib
- pyfits
pip install pyfits
- opencv
pip install opencv-python
- skimage
pip install -U scikit-image
- IPython
pip install ipython
After installing dependencies, you can install the library with pip:
pip install astrophotopy- Open your Jupyter / IPython notebook and import the AstroPhotoPy library. You can create a setup (optics + sensor) and an observation site first, then you have to create your project:
import astrophotopy as ap
my_optics = ap.Optics(model="RC 8", diameter = 203, f_len = 1604, f_len_ep = 22)
my_sensor = ap.Sensor(model = "Sony IMX", px_dim = 2.9, sens_diag = 23)
my_site = ap.Observation_Site(location_name = "Tre cime di Lavaredo", altitude = 2320, latitude = 46.6, air_temp = -5.5, fwhm = 1)
crab = ap.Project(subject="M1", path="My_folder", optics = my_optics, sensor = my_sensor, observation_site = my_site)- After copying your images (rough, dark and flat frames) in their respective folders, you have to load them (only .jpg, .png, .bmp, .tiff and .fits can be imported), possibly debayer (in case of color camera acquisition software can't make it properly) and then perform set cleaning by means of master dark and flat frame subtraction:
crab.load()
crab.debayering()
crab.subtract_master_dark_and_flat()- Now perform an automatic selection of the best images (i.e. dropping those frames in which a damn Starlink passed) and then align the retained frames:
crab.show_select_and_drop()
crab.align_frames()- After prior calculation of total exposure and creation of integration sets, sets' integration can be performed:
crab.create_integration_sets()
crab.integrate_over_sets()For a better description of the above (and others) astrophotopy methods, please refer to the Documentation
- added multiprocessing support for speedup of cpu intensive tasks
- added Changelog
- Add Changelog
- Add multiprocessing
- Add monochromatic camera workflow
- Write exhaustive documentation
- Add .ser file import/export
- CUDA/OpenCL aligning code implementation
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Distributed under the MIT License. See LICENSE.txt for more information.
Davidia - d.costantini.stcerello@gmail.com