Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
.. image:: https://readthedocs.org/projects/astroscrappy/badge/?version=latest :alt: Documentation Status :scale: 100% :target: https://astroscrappy.readthedocs.io/en/latest/?badge=latest .. image:: https://github.com/astropy/astroscrappy/workflows/Run%20unit%20tests/badge.svg :target: https://github.com/astropy/astroscrappy/actions :alt: CI Status .. image:: https://codecov.io/gh/astropy/astroscrappy/branch/main/graph/badge.svg :target: https://codecov.io/gh/astropy/astroscrappy :alt: AstroScrappy's Coverage Status .. image:: https://zenodo.org/badge/36837126.svg :target: https://zenodo.org/badge/latestdoi/36837126
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.
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.
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.
FAQs
Speedy Cosmic Ray Annihilation Package in Python
We found that astroscrappy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.