Traitlet Implementations for ctapipe


Custom Traitlets implemented for ctapipe.


ctapipe.core.traits Module

Traitlet implementations for ctapipe



Returns a list of the base class plus its non-abstract children if they have traits

create_class_enum_trait(base_class, …[, …])

create a configurable CaselessStrEnum traitlet from baseclass

has_traits(cls[, ignore])

True if cls has any traits apart from the usual ones

flag(name, configurable[, set_help, unset_help])

Helper for building basic –trait, –no-trait flags.

observe(*names[, type])

A decorator which can be used to observe Traits on a class.


AstroTime([default_value, allow_none, …])

A trait representing a point in Time, as understood by astropy.time


a TelescopeParameter with Bool trait type


a TelescopeParameter with Int trait type


a TelescopeParameter with Float trait type

TelescopeParameter(trait[, default_value])

Allow a parameter value to be specified as a simple value (of type dtype), or as a list of patterns that match different telescopes.

Path([default_value, exists, directory_ok, …])

A path Trait for input/output files.

Bool([default_value, allow_none, read_only, …])

A boolean (True, False) trait.

CRegExp([default_value, allow_none, …])

A casting compiled regular expression trait.

CaselessStrEnum(values[, default_value])

An enum of strings where the case should be ignored.

CInt([default_value, allow_none])

A casting version of the int trait.

Dict([value_trait, per_key_traits, …])

An instance of a Python dict.

Enum(values[, default_value])

An enum whose value must be in a given sequence.

Float([default_value, allow_none])

A float trait.


alias of ctapipe.core.traits.Int


alias of ctapipe.core.traits.Int

List([trait, default_value, minlen, maxlen])

An instance of a Python list.

Long([default_value, allow_none])

An int trait.

Set([trait, default_value, minlen, maxlen])

An instance of a Python set.


Tuple(*traits, **kwargs)

An instance of a Python tuple.

Unicode([default_value, allow_none, …])

A trait for unicode strings.