Skip to main content
Ctrl+K
Logo image

Site Navigation

  • User Manual
  • Examples
  • API Reference
  • For Developers

Site Navigation

  • User Manual
  • Examples
  • API Reference
  • For Developers

Section Navigation

  • Module: configuration
  • Module: run_search
  • Module: search
  • Module: results
  • Module: trajectory_explorer
  • Module: trajectory_generator
  • Module: work_unit
  • Module: image_collection
  • Module: butler_standardizer
  • Module: fits_standardizer
  • Module: kbmodv1
  • Module: kbmodv05
  • Module: multi_extension_fits
  • Module: single_extension_fits
  • Module: standardizer
  • Module: reprojection
  • Module: basic_filters
  • Module: clustering_filters
  • Module: known_object_filters
  • Module: sigma_g_filter
  • Module: stamp_filters
  • Module: create_stamps
  • Module: plotting
  • Module: visualizer
  • Module: jointfit_functions
  • Module: fake_data_creator
  • Module: trajectory_utils
  • Module: wcs_utils
  • API Reference
  • Module: run_search

Module: run_search#

class kbmod.run_search.SearchRunner(config=None)[source]#

A class to run the KBMOD grid search.

Attributes:
phase_timesdict

A dictionary mapping the search phase to the timing information, a list of [starting time, ending time] in seconds.

phase_memorydict

A dictionary mapping the search phase the memory information, a list of [starting memory, ending memory] in bytes.

Methods

display_phase_stats()

Output the statistics for each phase.

do_core_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 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_search_from_work_unit(work)

Run a KBMOD search from a WorkUnit object.

display_phase_stats()[source]#

Output the statistics for each phase.

do_core_search(config, stack, trj_generator)[source]#

Performs search on the GPU.

Parameters:
configSearchConfiguration

The configuration parameters

stackImageStackPy

The stack of image data.

trj_generatorTrajectoryGenerator

The object to generate the candidate trajectories for each pixel.

Returns:
keepResults

The results.

load_and_filter_results(search, config, batch_size=100000)[source]#

This function loads results that are output by the grid search. It can then generate psi + phi curves and perform sigma-G filtering (depending on the parameter settings).

Parameters:
searchkbmod.search

The search function object.

configSearchConfiguration

The configuration parameters

batch_sizeint

The number of results to load at once. This is used to limit the memory usage when loading results. Default is 100000.

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

stackImageStackPy

The stack of image data.

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.

run_search_from_work_unit(work)[source]#

Run a KBMOD search from a WorkUnit object.

Parameters:
workWorkUnit

The input data and configuration.

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.

kbmod.run_search.check_gpu_memory(config, stack, trj_generator=None)[source]#

Check whether we can run this search on the GPU.

Parameters:
configSearchConfiguration

The configuration parameters

stackImageStackPy

The stack of image data.

trj_generatorTrajectoryGenerator, optional

The object to generate the candidate trajectories for each pixel.

Returns:
validbool

Returns True if the search will fit on GPU and False otherwise.

kbmod.run_search.configure_kb_search_stack(search, config)[source]#

Configure the kbmod SearchStack object from a search configuration.

Parameters:
searchkb.StackSearch

The SearchStack object.

configSearchConfiguration

The configuration parameters

previous

Module: configuration

next

Module: search

On this page
  • SearchRunner
    • SearchRunner.display_phase_stats()
    • SearchRunner.do_core_search()
    • SearchRunner.load_and_filter_results()
    • SearchRunner.run_search()
    • SearchRunner.run_search_from_work_unit()
  • append_positions_to_results()
  • check_gpu_memory()
  • configure_kb_search_stack()
Show Source

© Copyright 2023, KBMOD Developers.

Created using Sphinx 6.1.3.

Built with the PyData Sphinx Theme 0.13.0.