Skip to main content

pifcap - A GUI for fast RAW image capture on Raspberry Pi

This software allows you to capture RAW images on Raspberry Pi in a fast way. Typical application is Lucky Imaging in astro photography.

This software is still in development. It may not be functional. Please wait for the released version before you send issue reports.

Installation

The software is made for raspberry Pi with a recent OS (Bullseye or Bookworm).

Some packages need to be installed with sudo apt:

  • libcamera and libcamera-apps (if not already installed). You can test libcamera and the support for your camera with:
    libcamera-hello --list-cameras
    
    You must be able to make RAW pictures in all modes. For instance libcamera-hello shows for the HQ camera:
    0 : imx477 [4056x3040] (/base/soc/i2c0mux/i2c@1/imx477@1a)
      Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop]
             'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop]
                               2028x1520 [40.01 fps - (0, 0)/4056x3040 crop]
                               4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]
    
    and you must be able to run these commands without errors:
    libcamera-still -r --mode 1332:990 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg
    libcamera-still -r --mode 2028:1080 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg
    libcamera-still -r --mode 2028:1520 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg
    libcamera-still -r --mode 4056:3040 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg
    
    Something with your libcamera or kernel driver installation will be wrong if this does not work.
  • Some Python packages require matching versions of system libraries. They must be installed with sudo apt:
sudo apt install python3-pip libcamera-apps python3-picamera2 python3-pyqt5 python3-pyqtgraph python3-astropy python3-numpy python3-venv

The Raspberry Pi OS "Bullseye" still allowed to install system wide with sudo pip install pifcap. Since "Bookworm" a virtual environment is required to install non-system Python packages. Trying to install pifcap without a virtual environment will fail with error: externally-managed-environment.

Run the following on a command line to install pifcapin a virtual environment called venv_pifcap:

python3 -m venv --system-site-packages ~/venv_pifcap
source ~/venv_pifcap/bin/activate
pip install --upgrade pip
pip install pifcap

Some hints when you get trouble

The Python packages picamera2, numpy, and astropy MUST be installed with sudo apt install. You MUST NOT update them with pip. When you get errors related to these packages you can:

  1. Check directory ~/.local/lib/python3.9/site-packages if it contains one of these packages. If yes delete them!
  2. Check if pip list shows different version numbers than apt list for these packages:
    pip list | grep numpy
    apt list | grep numpy
    
    pip list | grep astropy
    apt list | grep astropy
    
    pip list | grep picamera2
    apt list | grep picamera2
    
    If you see different versions for a package remove it with pip uninstall and reinstall it with sudo apt reinstall.
  3. Remove and recreate the virtual environment.

Uninstall

To remove pifcap from your Pi just delete the virtual environment:

rm -rf ~/venv_pifcap

Running

Before using pifcap you need to activate the virtual environment in the command window:

source ~/venv_pifcap/bin/activate

You can start graphical user interface of the capture program with:

pifcap

Images are stored in a proprietary format to minimize CPU load during capture. Conversion of the collected images to FITS format can be done with the command line program pifcap2fits. Run pifcap2fits -h to get help for the command options. For instance to convert all pfc files in the current directory to FITS do

pifcap2fits "*.pfc"

Different to linux commands the file name specifier must be quoted!

1.0.6

  • compatibility with older pyqtgraph

1.0.5

  • fixed installation issues

1.0.4 initial release

MIT License

Copyright (c) 2024 scriptorron

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.

Metadata

Release files for pifcap 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pifcap 1.1.1
File Size Uploaded Provenance Actions
pifcap-1.1.1.tar.gz 23.5 kB Without provenance Details for pifcap-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pifcap 1.1.1
File Interpreter ABI Platform Actions
pifcap-1.1.1-py3-none-any.whl Python 3 none any Details for pifcap-1.1.1-py3-none-any.whl

Total release size: 47.8 kB

Release files / pifcap-1.1.1.tar.gz

Download URL pifcap-1.1.1.tar.gz
Size 23.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c4370d26905074728d6605c7bc7b9d9d7c5753aee6256fbfab641ee1b4ddc078
BLAKE2b-256 checksum
How to use checksums
e6b0813dd0a2104c5bc82205388c5bc358b48d4cf8aafd0cd501cad5b79c3e5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / pifcap-1.1.1-py3-none-any.whl

Download URL pifcap-1.1.1-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df818fff5e3d8f5701336390b0b4da511154e99854bd103cc7e760870cdc1d33
BLAKE2b-256 checksum
How to use checksums
132c455c9932b64d16e51b5ba3b7e4b45288482c63a9bc024c472cfefdc1873e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for pifcap 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page