Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/davidiacostant/astrophotopy

Astrophotography processing tools
https://github.com/davidiacostant/astrophotopy

astrophotography image-processing image-stacking ipython-notebook jupyter jupyter-notebook python

Last synced: 3 days ago
JSON representation

Astrophotography processing tools

Awesome Lists containing this project

README

        

# AstroPhotoPy
Astrophotography processing tools

[![LinkedIn][linkedin-shield]][linkedin-url]






Logo

AstroPhotoPy


Flexible image processing with the astrophotographer in mind




Table of Contents



  1. About The Project



  2. Getting Started


  3. Usage

  4. Changelog

  5. Roadmap

  6. Contributing

  7. License

  8. Contact

## About The Project

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!

(back to top)

### Built With

This library is based essentially on two image processing libraries and a front-end library:

* opencv
* skimage
* IPython

(back to top)

## Getting Started

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:

### Prerequisites

To install the things you need first:

* numpy
```sh
pip install numpy
```
* matplotlib
```sh
pip install matplotlib

* pyfits
```sh
pip install pyfits
```
* opencv
```sh
pip install opencv-python
```
* skimage
```sh
pip install -U scikit-image
```
* IPython
```sh
pip install ipython
```
### Installation

After installing dependencies, you can install the library with pip:

```sh
pip install astrophotopy
```

(back to top)

## Simple usage
1. 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:
```python
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)

```
2. 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:
```python
crab.load()
crab.debayering()
crab.subtract_master_dark_and_flat()

```
3. 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:
```python
crab.show_select_and_drop()
crab.align_frames()

```
4. After prior calculation of total exposure and creation of integration sets, sets' integration can be performed:
```python
crab.create_integration_sets()
crab.integrate_over_sets()

```

_For a better description of the above (and others) astrophotopy methods, please refer to the [Documentation](https://github.com/DavidiaCostant/astrophotopy/blob/main/DOCS.md)_

(back to top)

## Changelog
### 2022 feb 25 - v0.2.2

* added multiprocessing support for speedup of cpu intensive tasks
* added Changelog

(back to top)

## Roadmap

- [x] Add Changelog
- [x] Add multiprocessing
- [ ] Add monochromatic camera workflow
- [ ] Write exhaustive documentation
- [ ] Add .ser file import/export
- [ ] CUDA/OpenCL aligning code implementation

See the [open issues](https://github.com/DavidiaCostant/astrophotopy/issues) for a full list of proposed features (and known issues).

(back to top)

## Contributing

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!

(back to top)

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.

(back to top)

## Contact

Davidia - [email protected]

(back to top)

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/davide-costantini-299805113/