Speedy Cosmic Ray Annihilation Package in Python
Project description
An optimized cosmic ray detector.
- Author:
Curtis McCully
Astro-SCRAPPY is designed to detect cosmic rays in images (numpy arrays), 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.
If you use this code, please cite the Zendo DOI: https://zenodo.org/record/1482019
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 LA Cosmic:
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 ~17 depending on the given parameters, even without running multiple threads. With multiple threads, this can be increased easily by another factor of 2. This implementation is much faster than the original IRAF version, improvment by a factor of ~90.
The arrays always must be C-contiguous, thus all loops are y outer, x inner. This follows the astropy.io.fits (pyfits) convention.
scipy is required for certain tests to pass, but the code itself does not depend on scipy.
License
This project is Copyright (c) Astropy Developers and licensed under the terms of the BSD 3-Clause license. See the licenses folder for more information.
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 Distributions
File details
Details for the file astroscrappy-1.2.0.tar.gz
.
File metadata
- Download URL: astroscrappy-1.2.0.tar.gz
- Upload date:
- Size: 556.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cea1ae2199893b6c1cb2f9b646d8e215f1bf06f1266f2da70f40e41ad1a34a64 |
|
MD5 | 1242aa6f352cb23a9a94cc494ab02447 |
|
BLAKE2b-256 | e90089fe3306d131a8fa3fefef1429af500a1416a1f4ff65a4aafe883743ee59 |
File details
Details for the file astroscrappy-1.2.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 750.2 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 135ef4942079d10c31118c2eb437ee636074904c966d05f211eb83fa9ac84e24 |
|
MD5 | 741562a5f5c56603d49043c4a78c128a |
|
BLAKE2b-256 | 219a5ee9e9584b47821fce228e642b3fb605e675d837374c0feef618ce56110e |
File details
Details for the file astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f94dbc3669b0404a2c3dd42081609b194fcd4a04bb0eeb4bd9aa7bfe46af2a1 |
|
MD5 | 4d32e28ccc1f69e8233c7c1c90e929fe |
|
BLAKE2b-256 | d63c1a307141e561777e2e39ad31475ee974283712c12fde909065e54dd9b337 |
File details
Details for the file astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf909790f251e3df7d3ae46e343885b3c89faa5fe2a1d18b6dbdaa7896a3ea2b |
|
MD5 | 8debff75c586afbaff5c19694b455847 |
|
BLAKE2b-256 | 56b898a7f30ffa63ad5c9aada0f88c5dd5f7dfe5502f4a00831a61e09c5029fa |
File details
Details for the file astroscrappy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 752.9 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6892748945b9bcb740b71de9e0847c39651c5b2ba127c2ecacde851dfe2f85e9 |
|
MD5 | e6abac6c46adbce1677cbe06fbc8809e |
|
BLAKE2b-256 | a57c83b07c3c007f80e3bcc6c23e6aab58cc621bb2156c885b8565d65a934ab9 |
File details
Details for the file astroscrappy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 768.6 kB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c90fd7c00c0c53412209c7ce8fd7343c0fb4bc18934db2589324018bbb08930 |
|
MD5 | aa66b54e8020a200930dc805e6a91750 |
|
BLAKE2b-256 | 621e604fdd6199fdbf9cf651ad079d2be236c80cc286ca6f1339e1000b05b8ab |
File details
Details for the file astroscrappy-1.2.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 752.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e74446e7c42ae768886cb2f735d6845f648e24d113131e4d8aa39dd59c882a9f |
|
MD5 | c3e98f90b2f4891bf62383b60f2648de |
|
BLAKE2b-256 | 2ac22ff6250899a96dbdd24d2a58e4e6f525e9af1a5ab59b7323d2aecf15457f |
File details
Details for the file astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2b4f3f7e9281c6622a666f7c2ea0e9e5d770c9c5f312cd99ed6f59aa6fd3716 |
|
MD5 | fe8b9ed7d80d5d34a069b7bb744ba628 |
|
BLAKE2b-256 | b0df9544ca49584a12cb8d6f7e52bf633ea426417f8193d61efa34e9baa96756 |
File details
Details for the file astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80c17ec208365e566205b85be94d967c4aae2f5be952e48a2f3af0a0bb0d98bf |
|
MD5 | 0d552ad9ff3adc300366df2c41c50ea5 |
|
BLAKE2b-256 | 1990b56e93850a07afdd5ed32e33692d4c21f6552be4426783c6bf58d0d42297 |
File details
Details for the file astroscrappy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 752.4 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb3cd3537c760e144b5b85c21fadfb7e533f3db5fe74a19f21042512b13c2a8 |
|
MD5 | 0812f492c3acad038167f4d80a7d890f |
|
BLAKE2b-256 | 61665171bee7e0c37968b21721dcf7d7fb06ee9fccb60978707b2a592d944052 |
File details
Details for the file astroscrappy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 776.2 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2400a9bfcbda69440521fb8b32c42616ef1dce069490fd2cc0d4b7bf64403cd9 |
|
MD5 | dc0bc465ca2ef4f7c3b12c1fef782d82 |
|
BLAKE2b-256 | 01244f2be6ea463e5fb46a79b68bd581b12fcc6b179056fc4e030edce2560d83 |
File details
Details for the file astroscrappy-1.2.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 751.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e3fd32b5397eeadc89f06d0d4eeff20f310ccb599d669a90a77b923686457fd |
|
MD5 | 134b8f805146bba1404fd9a7cee38a10 |
|
BLAKE2b-256 | a6847d1b83f1c109000e1f186a2e5d562092fb29557899ffc8a43353fada4cd6 |
File details
Details for the file astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e27416cdf47bea578e16634d9eec807ca323671988d42d957cb25202464b4e20 |
|
MD5 | 400e211d06aa0474f93bbe5ec15385b2 |
|
BLAKE2b-256 | 64745ae65a3802ec2276fac82fc57973a5a6e1cab66cef35949b3e05f7e5fc7a |
File details
Details for the file astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db0cc312be5304155026754ebdf253203b028317418f22d7ae83083300da0027 |
|
MD5 | 9560502b1709ec5839897df656e1d7f3 |
|
BLAKE2b-256 | 94c249c91ab53742120ebd9e68527f21af7f8b9227058f95a7e0679dab1626be |
File details
Details for the file astroscrappy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 752.4 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d5f209ee8e160402adb41d64fd25054a69bd38dee5871f271a578c6e8e853d3 |
|
MD5 | b8bc26447cc27591eff5e7c2e8266f6a |
|
BLAKE2b-256 | 387dc707619ea7d905418f0b38e9d5aca3e6a758a69989ed3239ae5677570cd7 |
File details
Details for the file astroscrappy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 775.8 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575dc3ef51697e676877925f96b65bed97550b2745d29b824ced7e1032cc8420 |
|
MD5 | 735e79083d39f9ec24829ddfe72a9b06 |
|
BLAKE2b-256 | abb8444dbae43747efdf07b925eab0e380518722b696abf1f5dcdbc8976b96c6 |
File details
Details for the file astroscrappy-1.2.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 752.1 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce368f778ab36f3323006251987b3acdc579ff1a182278a70f27fb73cc945de2 |
|
MD5 | 944c1dac473e3769a570bd9f654a170e |
|
BLAKE2b-256 | 5172094a9daa15646ad48016f06c8853476986bdb1a4a5a3a2f0f533a185aff7 |
File details
Details for the file astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb064c99c11977e68bebfd661974e81a7cf6646ccf50a75a0dce507e26307e08 |
|
MD5 | d7df6f2ce29b488a88929774eb522a20 |
|
BLAKE2b-256 | b75e663cee7da7810fffa9add1fc3f8af66e306334a9a869a72885ac73133b79 |
File details
Details for the file astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c54b86a7d489a2d54b7240d4f491dfff1d8112652ef6ce04031317b6de5db5 |
|
MD5 | 757b7bab1670e98b2fcfe37d40946647 |
|
BLAKE2b-256 | 44e6586a7cf17f69d35e6df3f2495f4f63f32907a640a4b35ab1cd4136b4404b |
File details
Details for the file astroscrappy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 753.0 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe7d9f3d591f02ac3e5ff4f537c55269da2c29ab5080943a371c2cc566407d1 |
|
MD5 | fc60d45034de8888b302610e5287a6ba |
|
BLAKE2b-256 | b089a6691574965a2a150d6f09ef43efc2070085548168e17023b7846dfaf354 |
File details
Details for the file astroscrappy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: astroscrappy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 776.4 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf1d8d1bf65d0c6188b6e104b8fa1c6510578b73059e6264443696766492335 |
|
MD5 | 80634f967af790ee85e9e1875591de5e |
|
BLAKE2b-256 | 249a6469b54e275b97f10d3ee1a1621191424d3884c323679b43fbb88dc064ba |