micropolarizer array data utilities
Project description
micropolarray
Python module for loading and using micropolarizer array and polarcam images.
Installation
Run the following command inside a terminal. If an error message about wheels appear, launch it again.
pip install git+https://github.com/Hevil33/micropolarray_master
You can run the test.py
script to verify the correct installation of the micopolarray package.
Usage
import micropolarray
import numpy as np
# Can initialize images from np arrays or fitsfilenames.
# If multiple filenames are used then the average is taken
micropolimage_from_file = micropolarray.MicroPolarizerArrayImage("test_data/image.fits.fits")
micropolimage_from_nparray = micropolarray.MicroPolarizerArrayImage(np.ones(shape=(30,30)))
image = micropolarray.MicroPolarizerArrayImage(image)
Multiple useful members can be used to get polarization parameters
angle_of_linear_polarization = image.AoLP.data # Get the angle of linear polarization
Stokes_I, Stokes_Q, Stokes_U = self.Stokes_vec # Get the stokes vector components as np.ndarray
pol_0_image = image.single_pol_subimages[image.angle_dic[0]]
demosaiced_image = image.demosaic()
binned_image = image.rebin(binning=4) # binned 4x4 image
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
micropolarray-1.0.0.tar.gz
(38.1 kB
view hashes)
Built Distribution
Close
Hashes for micropolarray-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97a8c99f9672c8dad57c1cd1149767c5019dfbd244ecc40ec9f93b0226869e30 |
|
MD5 | 05f78df017284b87ca0fb7bd97ef9523 |
|
BLAKE2b-256 | 430f78ae483870a24ab3e8204173d756e7bd250a913933ede9e3578a9bc7cc0c |