Cosmic ray removal

Cosmic ray removal

Postby Kevin Gurney » Fri May 28, 2021 1:17 pm

I have been experimenting (again) with Demetra and have been trying to incorporate a cosmic ray removal routine.
I have wrapped the 'industry standard' Laplacian edge detection-based algorithm (LAcosmic) in a way suitable for use with Demtra. It works on the preprocessed files named _Object_P.
I (hope!) I have successfully uploaded a zip file with python code, example .bat file, and pdf report.
Put the python somewhere in your file system, edit the the .bat file to point to your code, and put the .bat file in the current working directory containing the Demetra intermediat files

zip file containing python code, example .bat file, and pdf report
(82.02 KiB) Downloaded 27 times
Kevin Gurney
Posts: 15
Joined: Tue Nov 27, 2018 5:42 pm
Location: Sheffield, UK

Re: Cosmic ray removal

Postby Peter Velez » Fri Jun 04, 2021 6:34 am


thanks for this work. It is just what I have been looking for. I've been trying to work out why my spectra processed with Demetra have odd spikes even after cleaning up hot pixels with both Demetra and PI. Cosmic rays are the obvious culprit.

For the non-computer literate (ie me) - can you be more specific about how to actually run the Python code please. I assume I need to set up a Python workspace and then run the .bat file.


Peter Velez
Posts: 90
Joined: Tue May 12, 2020 7:36 am

Return to Software Demetra

Who is online

Users browsing this forum: No registered users and 1 guest