An image processing library for moving object detection implemented with GPUs.
Based on a Maximum Likelihood detection algorithm for moving astronomical objects.
KBMOD is a set of Python tools to search astronomical images for moving objects based upon method of maximum likelihood detection.
The packages required to build the code are:
- python3 development headers
- Scipy (Numpy, Matplotlib)
- Cuda 8.0
- CMake 3
Open search/pybinds/CmakeLists.txt and verify in the "include_directories" section that the paths to the python headers and to the cuda installation are correct.
This will build the python library and run the tests.
If you log out, next time run
to reappend the library to the python path
A short example injecting a simulated object into a stack of images, and then recovering it.
from kbmodpy import kbmod as kb import numpy as np # Create a point spread function psf = kb.psf(1.5) # load images from list of file paths imgs = [ kb.layered_image(file) for file in example_files ] # Specify an artificial object flux = 175.0 position = (100.7, 150.3) velocity = (50, 35) # Inject object into images for im in imgs: im.add_object(position+im.get_time()*velocity, position+im.get_time()*velocity, flux, psf) # Recover the object by searching a wide region velocity_guess = (40, 40) radius = 20 min_lh = 9.0 min_obs = 10 stack = kb.image_stack(imgs) search = kb.stack_search(stack, psf) results = search.region_search(*velocity_guess, radius, min_lh, min_obs)
The software is open source and available under the BSD license.