astropitography


Nameastropitography JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryAstrophotography + raspberry pi HQ camera = AstroPitography
upload_time2024-02-24 01:54:26
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2023 Adam Luke Baskerville Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords astrophotography raspberry pi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- PROJECT LOGO -->
<br />
<p align="center">
  <a href="https://github.com/adambaskerville/AstroPitography">
    <img src="https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/AstroPitographyLogoSmall.png" alt="Logo" width="80" height="80">
  </a>

  <h3 align="center">AstroPitography</h3>

  <p align="center">
    Astrophotography + Raspberry Pi HQ camera = AstroPitography
    <br />
    <a href="https://github.com/adambaskerville/AstroPitography/issues">Request Feature</a>
  </p>
</p>

**NOTICE 3-Jan-2024**:

I have been looking into upgrading this repository to use picamera2 in order to make it compatible with Raspberry OS Bullseye and later. This is proving to be a bit of a headache as the installation process is obtuse given the dependencies of picamera2 but more annoyingly is the incompatibility of picamera2 with virtual environments (even conda) which I am still trying to debug. 

I will put this upgrade on hold for now and continue with feature development & importantly documentation; but I will add instructions on how to get AstroPitography working with Bullseye or later OSs.

I will push some more changes soon which are going to improve the code structure and to adapt the repository to follow development best practices including linting, format checking, automated testing etc... I apologise for the lack of progress over the last few months; time has been a major issue for me but I have enforced time in my evenings to devote to this project.

<!-- TABLE OF CONTENTS -->
## Table of Contents

* [About AstroPitography](#about-astropitography)
  * [Dependencies](#dependencies)
  * [Necessary Hardware](#necessary-hardware)
* [Comprehensive Guide](#comprehensive-guide)
* [Getting Started](#getting-started)
* [Starting From Scratch](#starting-from-scratch)
* [Dependencies](#dependencies)
* [Roadmap](#roadmap)
* [Examples](#examples)

<!-- ABOUT THE PROJECT -->
## About AstroPitography

![AstroPitography](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/AstroPitography_GUI.png)

Astrophotography is typically costly due to equipment like scopes, mounts, cameras, and accessories. Despite this, I've always enjoyed pushing the limits of more modest hardware to explore its potential. With the release of the £50 Raspberry Pi High Quality camera, I aimed to test its capabilities in astrophotography. While it can't surpass top-tier DSLRs or expensive ZWO cameras in performance, I wanted to explore its potential. To facilitate this, I developed a straightforward Python program that serves as a basic GUI for my telescope outings.

Combining the Raspberry Pi 3B+ with the HQ camera, I used a 1.25-inch to C adapter to position them in the telescope's eyepiece slot. Setting up the Raspberry Pi as a wireless access point, I connect to its network via VNC on my phone, providing a convenient way to interact with the GUI. Alternatively, a small Raspberry Pi screen or a regular monitor can also be used.

Initially, I used stellarmate with kstars, but I sought a simpler method to interface with the HQ camera. This is an early implementation of the program which currently has the following features:

* Control important settings of the camera:
  * Brightness
  * Contrast
  * Saturation
  * Sharpness
  * Exposure (shutter speed in this instance)
  * Time delay between images
* Show a live preview of the camera view in the main window; useful for making sure something is in frame.
* Ability to enlarge and shrink the live preview using GUI buttons.
* Ability to overlay a crosshair on the live preview, useful for alignment.
* Automatic plate solving using ESAs lost in space [tetra3](https://github.com/esa/tetra3) algorithm.
* Ability to set Raspberry Pi time and data from within the GUI.
  * Very useful for headless setups where WiFi cannot be accessed.
* Toggle greyscale imaging (useful if using colour filters) and auto white balance correction.
* Allows for capturing of single images, multiple images with time delay and long exposure imaging.
* When a picture is taken it is visible from the top menu. 
  * If it is a poor image it can be deleted from within the program.
* The default save location can be selected from within the program window; handy for saving to USB stick etc... especially for large RAW files.
* Timed video capturing.
* The image save format is `RAW`, preferred over `png` which processes the image. `png` is used when showing the most recent image taken. 
  * An option is provided to extract the RAW image information from the .jpg file and saved as a dng file using PiDNG.

### Necessary Hardware
_These are not endorsements or sponsors, just where I purchased them from_
* [Raspberry Pi 3B+](https://thepihut.com/products/raspberry-pi-3-model-b-plus)
* [Raspberry Pi HQ Camera](https://thepihut.com/products/raspberry-pi-high-quality-camera-module)

In theory any Raspberry Pi should work, along with the other various Raspberry Pi cameras.

## Comprehensive Guide
If you are looking for a guide on how to setup your Raspberry Pi from scratch with everything explained then please visit the new [comprehensive guide](https://github.com/adambaskerville/AstroPitography/blob/main/docs/source/pages/installation/CompleteGuide.md)

<!-- GETTING STARTED -->
## Getting Started
Before installing the package, it is highly recommended that AstroPitography is used in a virtual environment due to the specific versions used for SciPy and numpy. We will use the `virtualenv` module instead of Python's built-in `venv` module, although both are completely viable options.

Start by installing the package and its wrapper using:
```
pip3 install virtualenv virtualenvwrapper
nano ~/.bashrc
```

Copy and paste the following into the `/.bashrc` file:
```
#Virtualenvwrapper settings:
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV=~/.local/bin/virtualenv
source ~/.local/bin/virtualenvwrapper.sh
export VIRTUALENVWRAPPER_ENV_BIN_DIR=bin
```

Reload the file:

```
source ~/.bashrc
```

Create your virtual environment:

```
mkvirtualenv [NAME OF VENV]
```

To work inside your virtual environment:

```
workon [NAME OF VENV]
```

Install the package:

```
pip install astropitography
```

You're now read to start taking pictures and videos with your Raspberry Pi! To run the program, type:

```
astropitography
```

into your terminal on your Raspberry Pi. Editing your `.bashrc` can allow for the program to begin on startup. You can specify the image save location from the menu button at the top of the window.

To exit/deactivate your virtual environment when you are done, use the following:
```
deactivate
```

**Note:**

My Raspberry Pi's resolution was set to 1600 x 900, 16:9 which you may want to replicate when using the program. I plan to generalize the code for any resolution in the future.


## Starting From Scratch

If you are new to using Raspberry Pi's, getting everything setup can seem a little daunting. See [this])() indepth guide on how to setup your Raspberry Pi for use with AstroPitography.

<!-- ROADMAP -->
## Roadmap

 * More testing (when the skies finally improve here in rainy UK!)
 * Allow for fractional variability in shutter speed (simple to implement)
 * Improve features of video implementation.
 * The ability to load camera presets for different objects (e.g. planetary, deep sky etc...) [**In progress**]
 * Automatic image stacking capability. [**In progress**]

<!-- CONTACT -->
## Contact

Adam Baskerville - [@AdamBask](https://twitter.com/AdamBask) - adamlukebaskerville@gmail.com

Daniel Opara - daniel.opara@tufts.edu

Project Link: [https://github.com/adambaskerville/AstroPitography](https://github.com/adambaskerville/AstroPitography)

## Examples

The following, lovely images were taken by Herbert Fu:

**M45 galaxy:**

![M45](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/M45.jpg)

**M31 galaxy:**

![M31](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/M31.jpg)

**M42 galaxy:**

![M42](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/M42.jpg)

**Jupiter:**

![Jupiter](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/Jupiter.jpg)


This is an image of the moon I captured:

![Moon](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/Moon_stitch.png)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "astropitography",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Adam Baskerville <adamlukebaskerville@gmail.com>, Daniel Opara <daniel.opara@tufts.edu>",
    "keywords": "astrophotography,raspberry pi",
    "author": "",
    "author_email": "Adam Baskerville <adamlukebaskerville@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/25/02/910d80ff6e4e92409185d1b572b413bee504b4237bba704284ca7431949f/astropitography-0.0.3.tar.gz",
    "platform": null,
    "description": "<!-- PROJECT LOGO -->\n<br />\n<p align=\"center\">\n  <a href=\"https://github.com/adambaskerville/AstroPitography\">\n    <img src=\"https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/AstroPitographyLogoSmall.png\" alt=\"Logo\" width=\"80\" height=\"80\">\n  </a>\n\n  <h3 align=\"center\">AstroPitography</h3>\n\n  <p align=\"center\">\n    Astrophotography + Raspberry Pi HQ camera = AstroPitography\n    <br />\n    <a href=\"https://github.com/adambaskerville/AstroPitography/issues\">Request Feature</a>\n  </p>\n</p>\n\n**NOTICE 3-Jan-2024**:\n\nI have been looking into upgrading this repository to use picamera2 in order to make it compatible with Raspberry OS Bullseye and later. This is proving to be a bit of a headache as the installation process is obtuse given the dependencies of picamera2 but more annoyingly is the incompatibility of picamera2 with virtual environments (even conda) which I am still trying to debug. \n\nI will put this upgrade on hold for now and continue with feature development & importantly documentation; but I will add instructions on how to get AstroPitography working with Bullseye or later OSs.\n\nI will push some more changes soon which are going to improve the code structure and to adapt the repository to follow development best practices including linting, format checking, automated testing etc... I apologise for the lack of progress over the last few months; time has been a major issue for me but I have enforced time in my evenings to devote to this project.\n\n<!-- TABLE OF CONTENTS -->\n## Table of Contents\n\n* [About AstroPitography](#about-astropitography)\n  * [Dependencies](#dependencies)\n  * [Necessary Hardware](#necessary-hardware)\n* [Comprehensive Guide](#comprehensive-guide)\n* [Getting Started](#getting-started)\n* [Starting From Scratch](#starting-from-scratch)\n* [Dependencies](#dependencies)\n* [Roadmap](#roadmap)\n* [Examples](#examples)\n\n<!-- ABOUT THE PROJECT -->\n## About AstroPitography\n\n![AstroPitography](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/AstroPitography_GUI.png)\n\nAstrophotography is typically costly due to equipment like scopes, mounts, cameras, and accessories. Despite this, I've always enjoyed pushing the limits of more modest hardware to explore its potential. With the release of the \u00a350 Raspberry Pi High Quality camera, I aimed to test its capabilities in astrophotography. While it can't surpass top-tier DSLRs or expensive ZWO cameras in performance, I wanted to explore its potential. To facilitate this, I developed a straightforward Python program that serves as a basic GUI for my telescope outings.\n\nCombining the Raspberry Pi 3B+ with the HQ camera, I used a 1.25-inch to C adapter to position them in the telescope's eyepiece slot. Setting up the Raspberry Pi as a wireless access point, I connect to its network via VNC on my phone, providing a convenient way to interact with the GUI. Alternatively, a small Raspberry Pi screen or a regular monitor can also be used.\n\nInitially, I used stellarmate with kstars, but I sought a simpler method to interface with the HQ camera. This is an early implementation of the program which currently has the following features:\n\n* Control important settings of the camera:\n  * Brightness\n  * Contrast\n  * Saturation\n  * Sharpness\n  * Exposure (shutter speed in this instance)\n  * Time delay between images\n* Show a live preview of the camera view in the main window; useful for making sure something is in frame.\n* Ability to enlarge and shrink the live preview using GUI buttons.\n* Ability to overlay a crosshair on the live preview, useful for alignment.\n* Automatic plate solving using ESAs lost in space [tetra3](https://github.com/esa/tetra3) algorithm.\n* Ability to set Raspberry Pi time and data from within the GUI.\n  * Very useful for headless setups where WiFi cannot be accessed.\n* Toggle greyscale imaging (useful if using colour filters) and auto white balance correction.\n* Allows for capturing of single images, multiple images with time delay and long exposure imaging.\n* When a picture is taken it is visible from the top menu. \n  * If it is a poor image it can be deleted from within the program.\n* The default save location can be selected from within the program window; handy for saving to USB stick etc... especially for large RAW files.\n* Timed video capturing.\n* The image save format is `RAW`, preferred over `png` which processes the image. `png` is used when showing the most recent image taken. \n  * An option is provided to extract the RAW image information from the .jpg file and saved as a dng file using PiDNG.\n\n### Necessary Hardware\n_These are not endorsements or sponsors, just where I purchased them from_\n* [Raspberry Pi 3B+](https://thepihut.com/products/raspberry-pi-3-model-b-plus)\n* [Raspberry Pi HQ Camera](https://thepihut.com/products/raspberry-pi-high-quality-camera-module)\n\nIn theory any Raspberry Pi should work, along with the other various Raspberry Pi cameras.\n\n## Comprehensive Guide\nIf you are looking for a guide on how to setup your Raspberry Pi from scratch with everything explained then please visit the new [comprehensive guide](https://github.com/adambaskerville/AstroPitography/blob/main/docs/source/pages/installation/CompleteGuide.md)\n\n<!-- GETTING STARTED -->\n## Getting Started\nBefore installing the package, it is highly recommended that AstroPitography is used in a virtual environment due to the specific versions used for SciPy and numpy. We will use the `virtualenv` module instead of Python's built-in `venv` module, although both are completely viable options.\n\nStart by installing the package and its wrapper using:\n```\npip3 install virtualenv virtualenvwrapper\nnano ~/.bashrc\n```\n\nCopy and paste the following into the `/.bashrc` file:\n```\n#Virtualenvwrapper settings:\nexport VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3\nexport WORKON_HOME=$HOME/.virtualenvs\nexport VIRTUALENVWRAPPER_VIRTUALENV=~/.local/bin/virtualenv\nsource ~/.local/bin/virtualenvwrapper.sh\nexport VIRTUALENVWRAPPER_ENV_BIN_DIR=bin\n```\n\nReload the file:\n\n```\nsource ~/.bashrc\n```\n\nCreate your virtual environment:\n\n```\nmkvirtualenv [NAME OF VENV]\n```\n\nTo work inside your virtual environment:\n\n```\nworkon [NAME OF VENV]\n```\n\nInstall the package:\n\n```\npip install astropitography\n```\n\nYou're now read to start taking pictures and videos with your Raspberry Pi! To run the program, type:\n\n```\nastropitography\n```\n\ninto your terminal on your Raspberry Pi. Editing your `.bashrc` can allow for the program to begin on startup. You can specify the image save location from the menu button at the top of the window.\n\nTo exit/deactivate your virtual environment when you are done, use the following:\n```\ndeactivate\n```\n\n**Note:**\n\nMy Raspberry Pi's resolution was set to 1600 x 900, 16:9 which you may want to replicate when using the program. I plan to generalize the code for any resolution in the future.\n\n\n## Starting From Scratch\n\nIf you are new to using Raspberry Pi's, getting everything setup can seem a little daunting. See [this])() indepth guide on how to setup your Raspberry Pi for use with AstroPitography.\n\n<!-- ROADMAP -->\n## Roadmap\n\n * More testing (when the skies finally improve here in rainy UK!)\n * Allow for fractional variability in shutter speed (simple to implement)\n * Improve features of video implementation.\n * The ability to load camera presets for different objects (e.g. planetary, deep sky etc...) [**In progress**]\n * Automatic image stacking capability. [**In progress**]\n\n<!-- CONTACT -->\n## Contact\n\nAdam Baskerville - [@AdamBask](https://twitter.com/AdamBask) - adamlukebaskerville@gmail.com\n\nDaniel Opara - daniel.opara@tufts.edu\n\nProject Link: [https://github.com/adambaskerville/AstroPitography](https://github.com/adambaskerville/AstroPitography)\n\n## Examples\n\nThe following, lovely images were taken by Herbert Fu:\n\n**M45 galaxy:**\n\n![M45](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/M45.jpg)\n\n**M31 galaxy:**\n\n![M31](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/M31.jpg)\n\n**M42 galaxy:**\n\n![M42](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/M42.jpg)\n\n**Jupiter:**\n\n![Jupiter](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/Jupiter.jpg)\n\n\nThis is an image of the moon I captured:\n\n![Moon](https://raw.githubusercontent.com/adambaskerville/AstroPitography/main/images/Moon_stitch.png)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Adam Luke Baskerville  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Astrophotography + raspberry pi HQ camera = AstroPitography",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://adambaskerville.github.io/tabs/astro/"
    },
    "split_keywords": [
        "astrophotography",
        "raspberry pi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41496a30ccabe2c46377c580ec1d5bed8dedd4a8d4b0977b4270fbd48a739e58",
                "md5": "3036c96bf17683a82aa2706fc3561681",
                "sha256": "f45e763bdf517fb1e4d28a70b84f1d0a91e22dfc59ce4f7b6a0cb47cf6714fae"
            },
            "downloads": -1,
            "filename": "astropitography-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3036c96bf17683a82aa2706fc3561681",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 32734165,
            "upload_time": "2024-02-24T01:54:21",
            "upload_time_iso_8601": "2024-02-24T01:54:21.414978Z",
            "url": "https://files.pythonhosted.org/packages/41/49/6a30ccabe2c46377c580ec1d5bed8dedd4a8d4b0977b4270fbd48a739e58/astropitography-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2502910d80ff6e4e92409185d1b572b413bee504b4237bba704284ca7431949f",
                "md5": "3e526612ca698ccb3ead107c81472adc",
                "sha256": "e7834ef2a1af24fb78f83b55e63666df7cf05e09e3806549ad529eed9449bc70"
            },
            "downloads": -1,
            "filename": "astropitography-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3e526612ca698ccb3ead107c81472adc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 47913561,
            "upload_time": "2024-02-24T01:54:26",
            "upload_time_iso_8601": "2024-02-24T01:54:26.886248Z",
            "url": "https://files.pythonhosted.org/packages/25/02/910d80ff6e4e92409185d1b572b413bee504b4237bba704284ca7431949f/astropitography-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-24 01:54:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "astropitography"
}
        
Elapsed time: 0.20936s