Spherical implementation of the Rolling Hough Transform
Project description
sphericalrht
is a fast, efficient implementation of the
Rolling Hough Transform
that runs directly on the sphere, using spherical harmonic convolutions.
The documentation can be found at readthedocs
and the package is distributed over PyPI.
Installation
Run the following in a terminal to install:
pip install sphericalrht
If installing on a computing cluster, you may want to run the following instead:
pip install sphericalrht --user
Note that the sphericalrht
package requires at least Python 3.7.
Usage
The code runs in parallel on as many CPUs as available, so feel free to
request many CPUs when submitting a job. The only input parameters that
affect the runtime and memory are nside
and norients
. Here's an
example of how to run the algorithm and read in the results:
from sphericalrht import CubeAndStokes
cube_and_stokes = CubeAndStokes(
in_map="/path/to/input_map.fits", # Input .fits map
nside=1024, # NSIDE of output maps
out_dir="/path/to/output_directory", # Directory to save results in
wlen=75, # window diameter [arcmins]
fwhm=30, # high-pass filter scale [arcmins]
thresh=0.7, # threshold fraction (0-1)
norients=100) # number of orientation angles
cube_and_stokes.build_and_save()
# Load the output maps
import healpy as hp
I, Q, U = hp.read_map("/path/to/output_maps.fits", field=(0,1,2))
# Optionally, load the output of all orientation angles for each pixel
import h5py
with h5py.File("/path/to/output_cube.h5") as cube_file:
spherical_rht_out = cube_file["spherical_rht_cube"][:, PIXEL_INDEX]
References & Attribution
The paper introducing this package is in preparation. If you make use of this code in your research, please contact halalgeorge@gmail.com for discussing proper citations.
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
Hashes for sphericalrht-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 087de8937e3fab1e1af6de269b763c26cece7d3f89a5297ba8a9fe7459d21982 |
|
MD5 | e05e0479570388e65a2aaf788cd1c29a |
|
BLAKE2b-256 | 22561c596dde20983cf4448fb5ee080769dcf2c32dea58643419b7ff26100def |