ctapipe is not stable yet, so expect large and rapid changes to structure and functionality as we explore various design choices before the 1.0 release.

Float#

class ctapipe.core.traits.Float(default_value: float | Sentinel | None = traitlets.Undefined, allow_none: bool = False, read_only: bool | None = False, help: str | None = None, config: Any | None = None, **kwargs: Any)#

Bases: TraitType[G, S]

A float trait.

Attributes Summary

default_value

info_text

Methods Summary

from_string(s)

Get a value from a config string

subclass_init(cls)

validate(obj, value)

Attributes Documentation

default_value: t.Any = 0.0#
info_text: str = 'a float'#

Methods Documentation

from_string(s: str) G[source]#

Get a value from a config string

such as an environment variable or CLI arguments.

Traits can override this method to define their own parsing of config strings.

See also

item_from_string

Added in version 5.0.

subclass_init(cls: type[Any]) None[source]#
validate(obj: Any, value: Any) G[source]#