Skip to main content
Documentation Status CI Status AstroScrappy's Coverage Status https://zenodo.org/badge/36837126.svg

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.

Metadata

Release files for astroscrappy 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astroscrappy 1.2.0
File Size Uploaded
astroscrappy-1.2.0.tar.gz 556.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for astroscrappy 1.2.0
File
astroscrappy-1.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
astroscrappy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
astroscrappy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.9+ x86-64 Details
astroscrappy-1.2.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
astroscrappy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
astroscrappy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
astroscrappy-1.2.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
astroscrappy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
astroscrappy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details
astroscrappy-1.2.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details
astroscrappy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
astroscrappy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.9+ x86-64 Details

Total release size: 24.4 MB

Release files / astroscrappy-1.2.0.tar.gz

Download URL astroscrappy-1.2.0.tar.gz
Size 556.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cea1ae2199893b6c1cb2f9b646d8e215f1bf06f1266f2da70f40e41ad1a34a64
BLAKE2b-256 checksum
How to use checksums
e90089fe3306d131a8fa3fefef1429af500a1416a1f4ff65a4aafe883743ee59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp312-cp312-win_amd64.whl

Download URL astroscrappy-1.2.0-cp312-cp312-win_amd64.whl
Size 750.2 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
135ef4942079d10c31118c2eb437ee636074904c966d05f211eb83fa9ac84e24
BLAKE2b-256 checksum
How to use checksums
219a5ee9e9584b47821fce228e642b3fb605e675d837374c0feef618ce56110e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0f94dbc3669b0404a2c3dd42081609b194fcd4a04bb0eeb4bd9aa7bfe46af2a1
BLAKE2b-256 checksum
How to use checksums
d63c1a307141e561777e2e39ad31475ee974283712c12fde909065e54dd9b337
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astroscrappy-1.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
cf909790f251e3df7d3ae46e343885b3c89faa5fe2a1d18b6dbdaa7896a3ea2b
BLAKE2b-256 checksum
How to use checksums
56b898a7f30ffa63ad5c9aada0f88c5dd5f7dfe5502f4a00831a61e09c5029fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL astroscrappy-1.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 752.9 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6892748945b9bcb740b71de9e0847c39651c5b2ba127c2ecacde851dfe2f85e9
BLAKE2b-256 checksum
How to use checksums
a57c83b07c3c007f80e3bcc6c23e6aab58cc621bb2156c885b8565d65a934ab9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl

Download URL astroscrappy-1.2.0-cp312-cp312-macosx_10_9_x86_64.whl
Size 768.6 kB
Tags CPython 3.12 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9c90fd7c00c0c53412209c7ce8fd7343c0fb4bc18934db2589324018bbb08930
BLAKE2b-256 checksum
How to use checksums
621e604fdd6199fdbf9cf651ad079d2be236c80cc286ca6f1339e1000b05b8ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp311-cp311-win_amd64.whl

Download URL astroscrappy-1.2.0-cp311-cp311-win_amd64.whl
Size 752.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e74446e7c42ae768886cb2f735d6845f648e24d113131e4d8aa39dd59c882a9f
BLAKE2b-256 checksum
How to use checksums
2ac22ff6250899a96dbdd24d2a58e4e6f525e9af1a5ab59b7323d2aecf15457f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
c2b4f3f7e9281c6622a666f7c2ea0e9e5d770c9c5f312cd99ed6f59aa6fd3716
BLAKE2b-256 checksum
How to use checksums
b0df9544ca49584a12cb8d6f7e52bf633ea426417f8193d61efa34e9baa96756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astroscrappy-1.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
80c17ec208365e566205b85be94d967c4aae2f5be952e48a2f3af0a0bb0d98bf
BLAKE2b-256 checksum
How to use checksums
1990b56e93850a07afdd5ed32e33692d4c21f6552be4426783c6bf58d0d42297
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL astroscrappy-1.2.0-cp311-cp311-macosx_11_0_arm64.whl
Size 752.4 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1fb3cd3537c760e144b5b85c21fadfb7e533f3db5fe74a19f21042512b13c2a8
BLAKE2b-256 checksum
How to use checksums
61665171bee7e0c37968b21721dcf7d7fb06ee9fccb60978707b2a592d944052
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl

Download URL astroscrappy-1.2.0-cp311-cp311-macosx_10_9_x86_64.whl
Size 776.2 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
2400a9bfcbda69440521fb8b32c42616ef1dce069490fd2cc0d4b7bf64403cd9
BLAKE2b-256 checksum
How to use checksums
01244f2be6ea463e5fb46a79b68bd581b12fcc6b179056fc4e030edce2560d83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp310-cp310-win_amd64.whl

Download URL astroscrappy-1.2.0-cp310-cp310-win_amd64.whl
Size 751.6 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
9e3fd32b5397eeadc89f06d0d4eeff20f310ccb599d669a90a77b923686457fd
BLAKE2b-256 checksum
How to use checksums
a6847d1b83f1c109000e1f186a2e5d562092fb29557899ffc8a43353fada4cd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e27416cdf47bea578e16634d9eec807ca323671988d42d957cb25202464b4e20
BLAKE2b-256 checksum
How to use checksums
64745ae65a3802ec2276fac82fc57973a5a6e1cab66cef35949b3e05f7e5fc7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astroscrappy-1.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.8 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
db0cc312be5304155026754ebdf253203b028317418f22d7ae83083300da0027
BLAKE2b-256 checksum
How to use checksums
94c249c91ab53742120ebd9e68527f21af7f8b9227058f95a7e0679dab1626be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL astroscrappy-1.2.0-cp310-cp310-macosx_11_0_arm64.whl
Size 752.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5d5f209ee8e160402adb41d64fd25054a69bd38dee5871f271a578c6e8e853d3
BLAKE2b-256 checksum
How to use checksums
387dc707619ea7d905418f0b38e9d5aca3e6a758a69989ed3239ae5677570cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl

Download URL astroscrappy-1.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Size 775.8 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
575dc3ef51697e676877925f96b65bed97550b2745d29b824ced7e1032cc8420
BLAKE2b-256 checksum
How to use checksums
abb8444dbae43747efdf07b925eab0e380518722b696abf1f5dcdbc8976b96c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp39-cp39-win_amd64.whl

Download URL astroscrappy-1.2.0-cp39-cp39-win_amd64.whl
Size 752.1 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ce368f778ab36f3323006251987b3acdc579ff1a182278a70f27fb73cc945de2
BLAKE2b-256 checksum
How to use checksums
5172094a9daa15646ad48016f06c8853476986bdb1a4a5a3a2f0f533a185aff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.8 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cb064c99c11977e68bebfd661974e81a7cf6646ccf50a75a0dce507e26307e08
BLAKE2b-256 checksum
How to use checksums
b75e663cee7da7810fffa9add1fc3f8af66e306334a9a869a72885ac73133b79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astroscrappy-1.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.8 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
71c54b86a7d489a2d54b7240d4f491dfff1d8112652ef6ce04031317b6de5db5
BLAKE2b-256 checksum
How to use checksums
44e6586a7cf17f69d35e6df3f2495f4f63f32907a640a4b35ab1cd4136b4404b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL astroscrappy-1.2.0-cp39-cp39-macosx_11_0_arm64.whl
Size 753.0 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4fe7d9f3d591f02ac3e5ff4f537c55269da2c29ab5080943a371c2cc566407d1
BLAKE2b-256 checksum
How to use checksums
b089a6691574965a2a150d6f09ef43efc2070085548168e17023b7846dfaf354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / astroscrappy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl

Download URL astroscrappy-1.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Size 776.4 kB
Tags CPython 3.9 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
caf1d8d1bf65d0c6188b6e104b8fa1c6510578b73059e6264443696766492335
BLAKE2b-256 checksum
How to use checksums
249a6469b54e275b97f10d3ee1a1621191424d3884c323679b43fbb88dc064ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

1.3.0

26 release files

This release

1.2.0 This release

21 release files

1.1.0

14 release files

1.1.dev228

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page