Module: run_search#
- class kbmod.run_search.SearchRunner[source]#
A class to run the KBMOD grid search.
Methods
do_gpu_search
(config, stack, trj_generator)Performs search on the GPU.
load_and_filter_results
(search, config)This function loads results that are output by the gpu grid search.
run_search
(config, stack[, trj_generator, ...])This function serves as the highest-level python interface for starting a KBMOD search given an ImageStack and SearchConfiguration.
Run a KBMOD search from a WorkUnit object.
- do_gpu_search(config, stack, trj_generator)[source]#
Performs search on the GPU.
- Parameters:
- configSearchConfiguration
The configuration parameters
- stackImageStack
The stack before the masks have been applied. Modified in-place.
- trj_generatorTrajectoryGenerator
The object to generate the candidate trajectories for each pixel.
- Returns:
- keepResults
The results.
- load_and_filter_results(search, config)[source]#
This function loads results that are output by the gpu grid search. Results are loaded in chunks and evaluated to see if the minimum likelihood level has been reached. If not, another chunk of results is fetched. The results are filtered using a clipped-sigmaG filter as they are loaded and only the passing results are kept.
- Parameters:
- searchkbmod.search
The search function object.
- configSearchConfiguration
The configuration parameters
- chunk_sizeint
The number of results to load at a given time from search.
- Returns:
- keepResults
A Results object containing values from trajectories.
- run_search(config, stack, trj_generator=None, workunit=None, extra_meta=None)[source]#
This function serves as the highest-level python interface for starting a KBMOD search given an ImageStack and SearchConfiguration.
- Parameters:
- configSearchConfiguration
The configuration parameters
- stackImageStack
The stack before the masks have been applied. Modified in-place.
- trj_generatorTrajectoryGenerator, optional
The object to generate the candidate trajectories for each pixel. If None uses the default EclipticCenteredSearch
- workunitWorkUnit, optional
An optional WorkUnit with additional meta-data, including the per-image WCS.
- extra_metadict, optional
Any additional metadata to save as part of the results file.
- Returns:
- keepResults
The results.
- kbmod.run_search.append_positions_to_results(workunit, results)[source]#
Append predicted (x, y) and (RA, dec) positions in the original images. If the images were reprojected, also appends the (RA, dec) in the common frame.
- Parameters:
- workunitWorkUnit
The WorkUnit with all the WCS information.
- resultsResults
The current table of results including the per-pixel trajectories. This is modified in-place.