Skip to main content

Speedy Cosmic Ray Annihilation Package in Python

Project description

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.

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.3.0.tar.gz (562.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

astroscrappy-1.3.0-cp314-cp314-win_amd64.whl (742.6 kB view details)

Uploaded CPython 3.14Windows x86-64

astroscrappy-1.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

astroscrappy-1.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

astroscrappy-1.3.0-cp314-cp314-macosx_11_0_arm64.whl (759.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

astroscrappy-1.3.0-cp314-cp314-macosx_10_13_x86_64.whl (767.4 kB view details)

Uploaded CPython 3.14macOS 10.13+ x86-64

astroscrappy-1.3.0-cp313-cp313-win_amd64.whl (740.3 kB view details)

Uploaded CPython 3.13Windows x86-64

astroscrappy-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

astroscrappy-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

astroscrappy-1.3.0-cp313-cp313-macosx_11_0_arm64.whl (759.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

astroscrappy-1.3.0-cp313-cp313-macosx_10_13_x86_64.whl (768.0 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

astroscrappy-1.3.0-cp312-cp312-win_amd64.whl (740.6 kB view details)

Uploaded CPython 3.12Windows x86-64

astroscrappy-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

astroscrappy-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

astroscrappy-1.3.0-cp312-cp312-macosx_11_0_arm64.whl (760.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

astroscrappy-1.3.0-cp312-cp312-macosx_10_13_x86_64.whl (769.6 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

astroscrappy-1.3.0-cp311-cp311-win_amd64.whl (743.8 kB view details)

Uploaded CPython 3.11Windows x86-64

astroscrappy-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

astroscrappy-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

astroscrappy-1.3.0-cp311-cp311-macosx_11_0_arm64.whl (761.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

astroscrappy-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl (773.5 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

astroscrappy-1.3.0-cp310-cp310-win_amd64.whl (743.2 kB view details)

Uploaded CPython 3.10Windows x86-64

astroscrappy-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

astroscrappy-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

astroscrappy-1.3.0-cp310-cp310-macosx_11_0_arm64.whl (761.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

astroscrappy-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl (773.2 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: astroscrappy-1.3.0.tar.gz
  • Upload date:
  • Size: 562.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for astroscrappy-1.3.0.tar.gz
Algorithm Hash digest
SHA256 b868079d3e9a2a83f02e2a22a4074fdf2bf115ce3d3038575e6170235c3bf2ca
MD5 bd0c78bc649d54a01548d437031ead5e
BLAKE2b-256 4e7947728f40cdb7b75238a673db83825fedb4cd7db7f44106110c25df6e5420

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 eb016eb3934fc391f0eb17dc78d267562a0b0e9845a48888b41f3ced05d80b05
MD5 ffa4ecd4107cf609e916e5d0c9193859
BLAKE2b-256 b94b7d87ebbcc72f36cfa3307b464f9e62062ac8e390ddf1919648fb1b45e61f

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b512f6696509cd39939cfc40117f4fc3ce62492a3ca4ce6ee7bd080d02de4818
MD5 ab9bd73bd9eccbe6b9f57e2dcf665092
BLAKE2b-256 42d40f6ce8f24114f33461155e920a682261ea34761b9d748c791eac498f4365

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 488cf3590403448a0f0b05c7c03c14343a0ecf0a74c76ee3a7254d3aa0048208
MD5 b7dc09446d7ddca5f0c3769e14fc903e
BLAKE2b-256 293719b70c6e64c1ffc4984f460da240f0836170cf715affa325944af501ce99

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0735afe41af340efb389cee6ae87fad15ecd56509e43581f6c2d65160872c12f
MD5 f9e1c68b6181c573005440ad5b41fc13
BLAKE2b-256 b1c324ceba6570067f606af97cc82fd51b0ac0990a94087e591b4d90908b35f8

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp314-cp314-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp314-cp314-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 748e8153c818882cbb62e939443d872490f1bd4755a05b46437705f0759f8ebe
MD5 4e0c4785754ff3c5013789d61a6cd12d
BLAKE2b-256 e6972505737d5e70fc8bde449f037dce737abb90e6a2ef41860760451cdaf600

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3414c020500195e4e59b4d8be21b7e12603651930b3d3867590e346b8484b18e
MD5 c0b2e535002c8ee665018efefd0b723f
BLAKE2b-256 b6474144a88f16f6339bd016d49e9f21667cabf81fe99270303714cb020474c7

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 323923bf272c14e39bdb630e22e4ccf7da59379aecbd481225d2c205c35a2efb
MD5 c6e970a10f5c19d4bffb609eb3b9efba
BLAKE2b-256 86206a7d058b33b97ec0d9e217446a6ff4703f9386dab14be648a64f341deb41

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2065f67a011b55056c62470a09e44e7a65dde7b55534dee5a624f40c5a3b97de
MD5 8c7f55e7102de1c0717e0b8495c710a8
BLAKE2b-256 4823203f9741bdf69271b59811d000a34549b20390e88426a1784ca15607a561

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e2490eead204d084b32851a3701fffe79aa52ab3204345b04c2bb1c8e3bd29b
MD5 f419753f7fb74e4afaf38869dc9aa322
BLAKE2b-256 e548fad1f86c82653ce3e9aae2b056b87f29404d465c9190d87b5768070b5de5

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 bf65994fc8279d8316a2abff323b91f071e49192cb31a6a3550654450fd09881
MD5 813030eea782136bf19c3c32daa56e84
BLAKE2b-256 d6df3ac1164c29068689ed3994f2eecd2025a4bac63746ff42e54172bc08df8e

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 227f4055a502fef8d45d47a170dfe806c8789de4a00791b8caa6d8034920a7fc
MD5 84f7e72ba8e384aa0d76e5697996f52b
BLAKE2b-256 c5c88ced1984abeff00e74619799fafd34ed07c6024ac5620ba625f6c241c102

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 56e201bea182e44e50f4bf2447ca5617b7931f74f34919aed8b2035eb6a7ea17
MD5 7b03be688c460487d37494fc6080f78e
BLAKE2b-256 c46fd5fadb46454813e8246876fe0fa8ce2f623c106b3ba5588fe4a547d66970

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 af21f6310fa85d89e0d45222f0e5e0a246c0b9a10cd8489fe9ae3e1edc1619a7
MD5 11bc8979dcd9fdda5d1f57721defb377
BLAKE2b-256 27e27a3e17e7a183021dc0e435dc416cb4fecac1187144ee81dced59171be3f4

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a17a2634b2c912612caf588d3e24ea2a64d0d67cf0d121cf6f2d2bb8c3635d90
MD5 cb06ef8565ec7a944fde9e65f9ddfcc5
BLAKE2b-256 674444133ab3f0aa6bfaef36266a8e6ad8be254038ccdfecdc2aa4ee3ad5c54d

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4108b6b6c5c68842f3958e26af1e79d674c731a0775568799b3de1c877697dc5
MD5 fa49205071da5d91535e099a2300bae1
BLAKE2b-256 c86ef0c8d221f6ae300061ed06d66407a0430eb9c903c555c424ae801465620c

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 365470482740d45ab569b5dc1bd85813c6a6cd9bd902b7c205e36caa3a4f4ba9
MD5 1da54f33511a8afb078b7582818a5676
BLAKE2b-256 eea37a90f4550c7b2edcb69d94c9c2c1194130ce14453752a654d290bc8793c2

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 42060e0110b41a870a35b5f3dae1f51bd8fa41d8c34eff0f35d3d1f85cdfbc3c
MD5 60924c601d1c1b1a4f32c973c7c22600
BLAKE2b-256 1550eab8f8b89d2d862f58984c9f461dd6133089b244b8b8d493ad303b3ce663

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 34c14d200e9b376526381c96970544b3c01ac1c5a920e9519af9f67f5fdae8b2
MD5 c985bca6c05e794ec58d261fb0320a09
BLAKE2b-256 9dd14fc0c711bb832ee3460ab2f33ee9f0e6c3791919f2a9bf6883e1c55afa59

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 43f8a482b6ab9cd6e9caec8e5fb560f77df636f9969b2b1fb4f7632cebbf9ecf
MD5 a1c081723268e0d2c13543b63a757508
BLAKE2b-256 2204b4d3e66a6205e9929c86eca3c4f643f1976783a36c54ecb287c5dc97c2e6

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d422597c4f43d49d43a9caeef662c62fba4f0a26027a977edbdd5f280839be08
MD5 9d7ecfd0d2f17f8cd7b6aeb62215ffc3
BLAKE2b-256 aecd651bec2622e35565ccbd9e165841021975da3f92197881ae28ad00da2b30

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9a7002401a42580075537583616edfd701e31043f65f6802010931e1fe7cddb8
MD5 f43d34359f3d63b65d7783594c531bbd
BLAKE2b-256 83329ef1c817446e2d844a7a91c9fc7eea77746afd692ecd50adb074f10ae0f6

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0257ab665683dda3265caa9d2286481d3fde6b300e14fbc4ed8a5d198ef9751f
MD5 81f5d8a1196d6944b574a3809dff0688
BLAKE2b-256 9b294c2351cff9636079fb2f5355679967e4bbbdcf283c8afbb185543973dca8

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4087193f8b294847a1673ef6fd7629cff20cb1071c74d3040c69fb028a144800
MD5 f84cab55235ea0b6a348861180d65138
BLAKE2b-256 22acb87b84cb0a92a9f218e420dfe64c19deecacba68d00e07b85bc3cd4d7969

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c912bccbd47157397cb183d791692108ce902f98c8181ed91b0039497f3cb165
MD5 d38c7dc9dca2c4f630da98b0a8c75662
BLAKE2b-256 beb545d5c3e19ac0f8e848fde74cc2c169c820f9f64a6bb36a6df74da0d7d257

See more details on using hashes here.

File details

Details for the file astroscrappy-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for astroscrappy-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a286655ef8a487f88afc41712b1152823aa8a280fb72e30f9e1c8a62493d51f
MD5 ae9a9373c563ab5aab0e404caadaac94
BLAKE2b-256 964c33e52c829082a52b8065996cd4656673979cbad953b5f9343d058b004823

See more details on using hashes here.

Supported by

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