Utilities to work with .fits files that were taken with CCDs and Skipper CCDs
Project description
CCDFits
This package provides utilities to work with .fits files that were taken with CCDs. It provides a FITS class to easily view and analyse images, along with useful functions to process them. It is particularly useful for Skipper CCD images, which can be calibrated by fitting gaussians to the zero- and one-electron peaks.
Installation
I strongly recommend using Miniconda to create a virtual environment and install ccdfits and pre-requisites there.
Pre-requisites
This library has been developed for Python 3. It will not build in Python 2.
ccdfits
requires the following packages to be installed:
- numpy
- scipy
- astropy
- matplotlib
In addition, if you intend to use ccdfits.processing
, you will also need to install:
- scikit-learn (for
cal2phys
) - scikit-image (for
generateMask
)
Installing in a conda environment
Create a new environment and install the prerequisites:
conda create --name ccdfits numpy scipy astropy matplotlib
Activate the newly created environment:
conda activate ccdfits
Install ccdfits via pip:
pip install ccdfits
Installing latest public version (may be different from that on pypi)
pip install git+https://gitlab.com/nicolaseavalos/ccdfits.git
Installing elsewhere
Although not recommended, the following command should work in any case as long as pip for python 3 is installed in the system:
pip3 install ccdfits
Usage
The following example shows how to load and view a .fits image. Replace 'ccd-image.fits'
with a string indicating the full or relative path to the image you are trying to load.
# imports
from ccdfits import Fits
import matplotlib.pyplot as plt
plt.ion()
# set the image path
fits_path = 'ccd-image.fits'
# load and view the image
img = Fits(fits_path)
img.view()
Complete documentation is in process.
Changelog
Version 1.0
- FITS class renamed to Fits
- Some documentation inside the code
- Various changes throughout the library
Hotfix 0.3.1
- Optimized for installation via pip
Version 0.3.0
- Added
skp2raw_lowmem
function toccdfits.processing
Hotfix 0.2.1
- Added
subtract_baseline
option toccdfits.processing.raw2proc
Version 0.2.0
- Added
skp2raw
function toccdfits.processing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ccdfits-1.0.0.tar.gz
.
File metadata
- Download URL: ccdfits-1.0.0.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1d1b1701eab0ed8f727a3097707d016a31465ad009dda7313584f0666cebe48 |
|
MD5 | 89d9b525b9a14c5c41040c9a376da39a |
|
BLAKE2b-256 | a70306c0657ceb5755da56d42d541f3323bb0e610748f53f0ecae5a385e0c303 |
File details
Details for the file ccdfits-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ccdfits-1.0.0-py3-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85fd19bf1bc5272f49ac1d52b414cc3bd7bbe318cea39e5df308e869079114e5 |
|
MD5 | cf190cf43e4678cc0779e49443bb89af |
|
BLAKE2b-256 | 1edf50f0276653233d47b9609e7a4a45964fabdb84e7cbf05b39669980d10f86 |