Module: trajectory_generator#
- class kbmod.trajectory_generator.EclipticCenteredSearch(velocities=[0.0, 0.0, 0], angles=[0.0, 0.0, 0], angle_units='radian', velocity_units='pix / d', given_ecliptic=None, work_unit=None, **kwargs)[source]#
Search a grid defined by velocities and angles relative to the ecliptic.
- Attributes:
- ecliptic_anglefloat
The angle to use for the ecliptic in the image (in the units defined in
angle_units
).- velocitieslist
A triplet of the minimum velocity to use (in pixels per day), and the maximum velocity magnitude (in pixels per day), and the number of velocity steps to try.
- angleslist
A triplet of the minimum angle offset (in radians), and the maximum angle offset (in radians), and the number of angles to try.
- min_angfloat
The minimum search angle in the image (ecliptic_angle + min_ang_offset) in radians.
- max_angfloat
The maximum search angle in the image (ecliptic_angle + max_ang_offset) in radians.
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.KBMODV1Search(vel_steps, min_vel, max_vel, ang_steps, min_ang, max_ang, **kwargs)[source]#
Search a grid defined by velocities and angles.
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.KBMODV1SearchConfig(v_arr, ang_arr, average_angle=None, work_unit=None, **kwargs)[source]#
Search a grid defined by velocities and angles in the format of the legacy configuration file.
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.PencilSearch(vx, vy, max_ang_offset=0.2618, ang_step=0.035, max_vel_offset=10.0, vel_step=0.5, **kwargs)[source]#
A search in a small cone around a given velocity.
The search varies the given velocity’s angle and magnitude. The angle includes the range: original angle +/- max_ang_offset. The velocity magnitude includes the range: original magnitude +/- max_vel_offset
- Parameters:
- vxfloat
The center velocity in the x dimension (in pixels per day)
- vyfloat
The center velocity in the y dimension (in pixels per day)
- max_ang_offsetfloat
The maximum offset of a candidate trajectory from the original (in radians)
- ang_stepfloat
The step size to explore for each angle (in radians)
- max_vel_offsetfloat
The maximum offset of the velocity’s magnitude from the original (in pixels per day)
- vel_stepfloat
The step size to explore for each velocity magnitude (in pixels per day)
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.RandomVelocitySearch(min_vx, max_vx, min_vy, max_vy, max_samples=1000000, **kwargs)[source]#
Search a grid defined by min/max bounds on pixel velocities.
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
reset_sample_count
(max_samples)Reset the counter of samples left.
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.SingleVelocitySearch(vx, vy, **kwargs)[source]#
Search a single velocity from each pixel.
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.TrajectoryGenerator(work_unit=None, **kwargs)[source]#
A base class for defining search strategies by generating candidate trajectories for each pixel.
Implementations of TrajectoryGenerator must: 1) override generate() to provide new samples, 2) cannot be infinite
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- class kbmod.trajectory_generator.VelocityGridSearch(vx_steps, min_vx, max_vx, vy_steps, min_vy, max_vy, **kwargs)[source]#
Search a grid defined by steps in velocity space.
Methods
close
(*args, **kwargs)Performs any cleanup needed for this generator
generate
(*args, **kwargs)Produces a single candidate trajectory to test.
initialize
(*args, **kwargs)Performs any setup needed for this generator
to_table
()Generate the trajectories and put them into an astropy table for analysis.
- kbmod.trajectory_generator.create_trajectory_generator(config, work_unit=None, **kwargs)[source]#
Create a TrajectoryGenerator object given a dictionary of configuration options. The generator class is specified by the ‘name’ entry, which must exist and match the class name of one of the subclasses of
TrajectoryGenerator
.- Parameters:
- configdict or SearchConfiguration
The dictionary of generator parameters.
- work_unitWorkUnit, optional
A WorkUnit to provide additional information about the data that can be used to derive parameters that depend on the input.
- Returns:
- genTrajectoryGenerator
A TrajectoryGenerator object.
- Raises:
- Raises a
KeyError
if the name entry is missing or the correct parameters - do not exist.
- Raises a