Cosmometer is an open-source cosmic event detection tool that uses digital camera sensors (CMOS or CCD) to detect muons, cosmic rays, and other high-energy particle interactions. By analyzing a time series of dark frames, it identifies transient bright pixel events that are likely caused by charged particles passing through the sensor. Use at least a few thounsand dark images (images captured in absolute darkness with shutter closed) captured over a reasonably long time duration. More # of images and longer acquisitions in general will improve results. A sureshot way to increase confidence would be to have many independent measurements from different camera devices from the same geo location. Sounds like a great activity for an astrophysics club? ;)
-
Most Likely Detections:
- Muons (from cosmic ray showers)
- High-energy protons and electrons
- Secondary cosmic rays from air showers
-
Possible Detections:
- Radioactive decay events (beta particles, X-rays) in specific environments
- High-energy gamma-ray interactions producing electron-positron pairs
- Neutron-induced ionization (rare, but possible)
-
What It Cannot Detect:
- Neutrinos
- Dark matter or exotic physics (unless they interact in an unknown way)
Cosmometer processes a sequence of dark frames (images taken in complete darkness) and:
- Identifies transient bright pixels that appear in a single frame but disappear in subsequent frames.
- It does it by dynamic thresholding based on the per-pixel statistics (mean and std) of your uploaded images. So, it should automatically adapt to dark images from any camera.
- Detects plausible cosmic events and streaks (possible cosmic ray tracks across multiple pixels).
- Filters out hot pixels and other electronic noise (sensor defects that remain bright across many frames or >0.5% of total frames).
- Logs detected cosmic events with their coordinates and timestamps.
- There are at least 3 hardcoded parameters - the rationale for them is as follows: a) remove the pixels passing the thresh in (2) over 1% of the total frames - this frequency is too high to be a cosmic event and will also eliminate a large chunck of noise including (but not limited to) hot pixel. b) threshold to isolate a streak is set to at least 3 connected pixels. well, is anything less than 3 even a streak? c) if the bright spot of interest lasts for >1 frame, it's eliminated. In the exposure time of imaging that people will use this for, the paricles of interest would have already travelled 100s or 1000s of kilometers.
- Python 3.x
- Required Libraries:
pip install numpy opencv-python matplotlib tifffile
- Use a digital camera (CMOS/CCD) with the lens covered.
- Capture a series of dark frames at a fixed exposure time.
- Save them in a folder (e.g.,
dark_frames/
).
The script outputs:
- Total detected cosmic particle events
- Streaks (tracks across multiple pixels)
- Cosmic event flux per pixel per second -> updtaed to per day
- If sensor dimensions are provided, flux per mm² per second -> updated to per day
A CSV file (cosmometer_events.csv
) logs:
- Frame Number
- X Coordinate
- Y Coordinate
For each detected cosmic event.
Graphical outputs include:
-
Event heatmaps
-
Scatter plot of detected cosmic events over time
-
Streak map visualization
- Fork the repo & submit pull requests to improve detection algorithms.
- Citizen Science: test in different environments (mountains, airplanes, underground labs) and share data. Use Discussions to share your data.
- Extend detection for specific particle types (e.g., neutron sensitivity, radiation source analysis).
Cosmometer is released under the MIT License, making it open for anyone to use, modify, and improve.
Developed by Gokul Rajan as an open-source cosmic event detection tool.