UFO

giant.ufo.ufo_class:

class giant.ufo.ufo_class.UFO(camera, scene, dynamics, state_initializer, search_distance_function, detector_kwargs=None, tracker_kwargs=None, initial_image_processing_kwargs=None, initial_star_id_kwargs=None, tracking_quality_code_minimum=3, identify_hot_pixels_and_unmatched_stars=True, clear_detector_before_tracking=True, visual_inspection_quality_code_minimum=4)[source]

This class provides a simple user interface for doing the combined steps of detecting and tracking UFOs in images.

The primary benefit to using this class is that it packages the data from the Detector class to the Tracker class without you having to interact with it directly. Beyond that it is primarily just calls to the methods of the Detector and Tracker classes, letting them do all of the hard work behind the scenes.

The typical way to use this class it to initialize it with all of the settings needed for the Detector and Tracker and then to call the following methods in order:

  1. detect()

  2. track()

  3. save_results()

  4. visualize_detection_results()

If your settings were right, this should result in 2 csv files (1 with possible detections and one with possible tracks) and a visualization of the detections for each image displayed either interactively or saved to files.

For more details about the processes working in this class or for successfully tuning things for identifying tracks, see the :mod:.detector`, tracker, and ufo documentation.

Parameters:
  • camera (Camera) – The Camera containing the images to be processed

  • scene (Scene) – The Scene specifying the central body as the first target and any extra extended bodies that should be ignored as other targets.

  • dynamics (Dynamics) – The dynamics model to use in the EKF for propagating the state from one time to another

  • state_initializer (Callable[[Measurement, Type[State]], State]) – A callable which takes in a Measurement instance and Dynamics.State class object and returns an initialized state.

  • search_distance_function (Callable[[ExtendedKalmanFilter], Real]) – A callable which takes in an ExtendedKalmanFilter and returns what the Euclidean search distance should be for that EKF in pixels. This is only applied after the first pair has been made

  • detector_kwargs (Dict[str, Any] | None) – The key word arguments to pass to the Detector class

  • tracker_kwargs (Dict[str, Any] | None) – The key word arguments to pass to the Tracker class

  • initial_image_processing_kwargs (Dict[str, Any] | None) – The key word arguments to use to initialize the ImageProcessing instance before it is passed to the Detector

  • initial_star_id_kwargs (Dict[str, Any] | None) – The key word arguments to use to initialize the StarId class before it is passed to the Detector

  • tracking_quality_code_minimum (int) – The minimum quality code to pass a possible detection to the tracking algorithm

  • identify_hot_pixels_and_unmatched_stars (bool) – A flag specifying whether to attempt to filter out hot pixels and unmatched stars from the UFO detections

  • clear_detector_before_tracking (bool) – A flag specifying whether to clear out the intermediate lists created in the Detector before moving on to the Tracker. This can be necessary for memory management purposes

  • visual_inspection_quality_code_minimum (int) – The minimum quality code to pass a possible detection to the detection visualizations

Summary of Methods

detect

This method detects potential UFOs in all images that have been added to the camera and have not been processed yet.

save_results

This method saves both the detection and tracker results to a file (as long as they have been run).

track

This method packages the possible UFO detections for the Tracker, passes them to the tracker, and then attempts to track the UFOs from image to image.

visualize_detection_results

This method visualizes detection results, overlaying them on the images themselves.