Skip to main content

Speedy Cosmic Ray Annihilation Package in Python

Project description

Name : Astro-SCRAPPY Author : Curtis McCully Date : October 2014

Optimized Cosmic Ray Detector:

Astro-SCRAPPY is designed to detect cosmic rays in images (numpy arrays), originally based on Pieter van Dokkum’s L.A.Cosmic algorithm.

Much of this was originally adapted from cosmics.py written by Malte Tewes. I have ported all of the slow functions to Cython/C, and optimized where I can. This is designed to be as fast as possible so some of the readability has been sacrificed, specifically in the C code.

L.A.Cosmic = LAplacian Cosmic ray detection

If you use this code, please consider adding this repository address in a footnote: https://github.com/astropy/astroscrappy.

Please cite the original paper which can be found at: http://www.astro.yale.edu/dokkum/lacosmic/

van Dokkum 2001, PASP, 113, 789, 1420 (article : http://adsabs.harvard.edu/abs/2001PASP..113.1420V)

This code requires Cython, preferably version >= 0.21.

Parallelization is achieved using OpenMP. This code should compile (although the Cython files may have issues) using a compiler that does not support OMP, e.g. clang.

Notes

There are some differences from original LACosmic:

  • Automatic recognition of saturated stars. This avoids treating such stars as large cosmic rays.

  • I have tried to optimize all of the code as much as possible while maintaining the integrity of the algorithm. One of the key speedups is to use a separable median filter instead of the true median filter. While these are not identical, they produce comparable results and the separable version is much faster.

  • This implementation is much faster than the Python by as much as a factor of 28 depending on the given parameters. This implementation is much faster than the original IRAF version, by a factor of ~90.

Note that arrays always must be C-contiguous, thus all loops are y outer, x inner. This follows the Pyfits convention.

scipy is required for certain tests to pass, but the code itself does not depend on scipy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astroscrappy-1.0.3.tar.gz (422.2 kB view details)

Uploaded Source

File details

Details for the file astroscrappy-1.0.3.tar.gz.

File metadata

File hashes

Hashes for astroscrappy-1.0.3.tar.gz
Algorithm Hash digest
SHA256 843af0ec1fb7439a886f05690a52d96342c3bd505dfdef42e922a66b67a89776
MD5 024bfdc798edcd0f13d66bd161db61c0
BLAKE2b-256 3bd659c140bda11eac5e6c8e090031b2b6a3626ed5329712e46bd9e99738a0d5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page