# 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:
```commandline
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:
```commandline
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`:
```commandline
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 `pifcap`in a virtual environment called `venv_pifcap`:
```commandline
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:
```commandline
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:
```commandline
rm -rf ~/venv_pifcap
```
## Running
Before using `pifcap` you need to activate the virtual environment in the command window:
```commandline
source ~/venv_pifcap/bin/activate
```
You can start graphical user interface of the capture program with:
```commandline
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
```commandline
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/scriptorron/pifcap",
"name": "pifcap",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Ronald Schreiber",
"author_email": "ronald.schreiber01@gmx.de",
"download_url": "https://files.pythonhosted.org/packages/23/d9/1b0543998a9d0dca88e9cadbbbb5ee2648a4ddad29edb86995dab87c3a4c/pifcap-1.0.6.tar.gz",
"platform": null,
"description": "# pifcap - A GUI for fast RAW image capture on Raspberry Pi\nThis software allows you to capture RAW images on Raspberry Pi in a fast way. Typical application is Lucky Imaging in astro photography.\n\n***This software is still in development. It may not be functional. Please wait for the released version before you send issue reports.***\n\n## Installation\nThe software is made for raspberry Pi with a recent OS (Bullseye or Bookworm). \n\nSome packages need to be installed with `sudo apt`:\n- `libcamera` and `libcamera-apps` (if not already installed). You can test libcamera and the support\nfor your camera with: \n ```commandline\n libcamera-hello --list-cameras\n ```\n You must be able to make RAW pictures in all modes. For instance `libcamera-hello` shows for the HQ camera:\n ```\n 0 : imx477 [4056x3040] (/base/soc/i2c0mux/i2c@1/imx477@1a)\n Modes: 'SRGGB10_CSI2P' : 1332x990 [120.05 fps - (696, 528)/2664x1980 crop]\n 'SRGGB12_CSI2P' : 2028x1080 [50.03 fps - (0, 440)/4056x2160 crop]\n 2028x1520 [40.01 fps - (0, 0)/4056x3040 crop]\n 4056x3040 [10.00 fps - (0, 0)/4056x3040 crop]\n ```\n and you must be able to run these commands without errors:\n ```commandline\n libcamera-still -r --mode 1332:990 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg\n libcamera-still -r --mode 2028:1080 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg\n libcamera-still -r --mode 2028:1520 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg\n libcamera-still -r --mode 4056:3040 --shutter 100000 --gain 1 --awbgains 1,1 --immediate -o test.jpg\n ```\n Something with your libcamera or kernel driver installation will be wrong if this does not work.\n- Some Python packages require matching versions of system libraries. They must be installed with `sudo apt`:\n```commandline\nsudo apt install python3-pip libcamera-apps python3-picamera2 python3-pyqt5 python3-pyqtgraph python3-astropy python3-numpy python3-venv\n```\n\nThe Raspberry Pi OS \"Bullseye\" still allowed to install system wide with `sudo pip install pifcap`.\nSince \"Bookworm\" a virtual environment is required to install non-system Python packages. Trying to install\n`pifcap` without a virtual environment will fail with `error: externally-managed-environment`.\n\nRun the following on a command line to install `pifcap`in a virtual environment called `venv_pifcap`:\n```commandline\npython3 -m venv --system-site-packages ~/venv_pifcap\nsource ~/venv_pifcap/bin/activate\npip install --upgrade pip\npip install pifcap\n```\n\n\n## Some hints when you get trouble\nThe Python packages `picamera2`, `numpy`, and ` astropy` MUST be installed with `sudo apt install`.\nYou MUST NOT update them with `pip`. When you get errors related to these packages you can:\n 1. Check directory `~/.local/lib/python3.9/site-packages` if it contains one of these packages. If yes delete them!\n 2. Check if `pip list` shows different version numbers than `apt list` for these packages:\n ```commandline\n pip list | grep numpy\n apt list | grep numpy\n\n pip list | grep astropy\n apt list | grep astropy\n\n pip list | grep picamera2\n apt list | grep picamera2\n ```\n If you see different versions for a package remove it with `pip uninstall` and reinstall it with\n `sudo apt reinstall`.\n 3. Remove and recreate the virtual environment.\n\n\n## Uninstall\nTo remove `pifcap` from your Pi just delete the virtual environment:\n```commandline\nrm -rf ~/venv_pifcap\n```\n\n## Running\n\nBefore using `pifcap` you need to activate the virtual environment in the command window:\n```commandline\nsource ~/venv_pifcap/bin/activate\n```\n\nYou can start graphical user interface of the capture program with:\n```commandline\npifcap\n```\n\n\nImages 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\n```commandline\npifcap2fits \"*.pfc\"\n```\nDifferent to linux commands the file name specifier must be quoted!\n\n\n\n\n1.0.6\n- compatibility with older pyqtgraph\n\n1.0.5\n- fixed installation issues\n\n1.0.4\ninitial release\n\n\nMIT License\n\nCopyright (c) 2024 scriptorron\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
"bugtrack_url": null,
"license": null,
"summary": "A GUI for fast RAW image capture on Raspberry Pi",
"version": "1.0.6",
"project_urls": {
"Homepage": "https://github.com/scriptorron/pifcap"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "effa0a92141c0c761f140af1946fe2a0a0219302de372f76dd8a085411341c4d",
"md5": "6475092c1f655d6752506893be7b9b89",
"sha256": "d644f4fe43114052ef12f9ada9378c10d61a30709d2c7ff1006f011ee41deb7a"
},
"downloads": -1,
"filename": "pifcap-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6475092c1f655d6752506893be7b9b89",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 24235,
"upload_time": "2024-05-08T10:53:27",
"upload_time_iso_8601": "2024-05-08T10:53:27.912738Z",
"url": "https://files.pythonhosted.org/packages/ef/fa/0a92141c0c761f140af1946fe2a0a0219302de372f76dd8a085411341c4d/pifcap-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "23d91b0543998a9d0dca88e9cadbbbb5ee2648a4ddad29edb86995dab87c3a4c",
"md5": "8939997c66fdc4655fa05301182dd99d",
"sha256": "361f060209d453303419750de9b62e0f8323496febc5ab259ba860eee77dcb99"
},
"downloads": -1,
"filename": "pifcap-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "8939997c66fdc4655fa05301182dd99d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 23264,
"upload_time": "2024-05-08T10:53:29",
"upload_time_iso_8601": "2024-05-08T10:53:29.805271Z",
"url": "https://files.pythonhosted.org/packages/23/d9/1b0543998a9d0dca88e9cadbbbb5ee2648a4ddad29edb86995dab87c3a4c/pifcap-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-08 10:53:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "scriptorron",
"github_project": "pifcap",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pifcap"
}