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.

CRegExp#

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

Bases: TraitType[re.Pattern[t.Any], re.Pattern[t.Any] | str]

A casting compiled regular expression trait.

Accepts both strings and compiled regular expressions. The resulting attribute will be a compiled regular expression.

Attributes Summary

info_text

Methods Summary

validate(obj, value)

Attributes Documentation

info_text: str = 'a regular expression'#

Methods Documentation

validate(obj: Any, value: Any) Pattern[Any] | None[source]#