OneStepPerturbImageFactory
- class nrtk.impls.perturb_image_factory.generic.one_step.OneStepPerturbImageFactory(perturber: type[PerturbImage], theta_key: str, theta_value: float)
Simple PerturbImageFactory implementation to return a factory with one perturber.
Methods
from_configInstantiates a PerturbImageFactory from a configuration dictionary.
Generates a configuration dictionary for the OneStepPerturbImageFactory instance.
get_default_configReturns the default configuration for the PerturbImageFactory.
get_implsDiscover and return a set of classes that implement the calling class.
is_usableCheck whether this class is available for use.
- __init__(perturber: type[PerturbImage], theta_key: str, theta_value: float) None
Initialize the factory to produce an instance of PerturbImage for the given type.
Initialize the factory to produce an instance of PerturbImage for the given type, given the
theta_keyand thetheta_valueparameters.- Parameters:
perturber – Python implementation type of the PerturbImage interface to produce.
theta_key – Perturber parameter to set for the instance.
theta_value – Initial and only value of
theta_key.
- Raises:
TypeError – Given a perturber instance instead of type.
- get_config() dict[str, Any]
Generates a configuration dictionary for the OneStepPerturbImageFactory instance.
- Returns:
dict[str, Any]: Configuration data representing the sensor and scenario.