Module: clustering_filters#
- class kbmod.filters.clustering_filters.ClusterGridFilter(cluster_eps, pred_times)[source]#
Use a discrete grid to cluster the points. Each trajectory is fit into a bin and only the best trajectory per bin is retained.
- Attributes:
- bin_widthint
The width of the grid bins (in pixels).
- cluster_gridTrajectoryClusterGrid
The grid of best result trajectories seen.
- max_dtfloat
The maximum different between times in pred_times.
Methods
Get the name of the filter.
keep_indices
(result_data)Determine which of the results's indices to keep.
- class kbmod.filters.clustering_filters.ClusterPosVelFilter(cluster_eps, cluster_v_scale=1.0, **kwargs)[source]#
Cluster the candidates using their starting position and velocities.
Methods
get_filter_name
()Get the name of the filter.
keep_indices
(result_data)Determine which of the results's indices to keep.
- class kbmod.filters.clustering_filters.ClusterPredictionFilter(cluster_eps, pred_times=[0.0], **kwargs)[source]#
Cluster the candidates using their positions at specific times.
- Attributes:
- timeslist-like
The times at which to evaluate the trajectories (in days).
Methods
get_filter_name
()Get the name of the filter.
keep_indices
(result_data)Determine which of the results's indices to keep.
- class kbmod.filters.clustering_filters.DBSCANFilter(cluster_eps, **kwargs)[source]#
Cluster the candidates using DBSCAN and only keep a single representative trajectory from each cluster.
- Attributes:
- cluster_epsfloat
The clustering threshold (in pixels).
- cluster_typestr
The type of clustering.
- cluster_argsdict
Additional arguments to pass to the clustering algorithm.
Methods
Get the name of the filter.
keep_indices
(result_data)Determine which of the results's indices to keep.
- class kbmod.filters.clustering_filters.NNSweepFilter(cluster_eps, pred_times)[source]#
Filter any points that have neighboring trajectory with a higher likleihood within the threshold.
- Parameters:
- threshfloat
The filtering threshold to use (in pixels).
- timeslist-like
The times at which to evaluate the trajectories (in days).
Methods
Get the name of the filter.
keep_indices
(result_data)Determine which of the results's indices to keep.
- kbmod.filters.clustering_filters.apply_clustering(result_data, cluster_params)[source]#
This function clusters results that have similar trajectories.
- Parameters:
- result_data: `Results`
The set of results to filter. This data gets modified directly by the filtering.
- cluster_paramsdict
Contains values concerning the image and search settings including: cluster_type, cluster_eps, times, and cluster_v_scale (optional).
- Raises:
- Raises a ValueError if the parameters are not valid.
- Raises a TypeError if
result_data
is of an unsupported type.