TimeFrame.register_flag_system¶
- TimeFrame.register_flag_system(name, flag_system=None, flag_type='bitwise')[source]¶
Register a named flag system with the internal flag manager.
- Parameters:
name (
str) – Short name for the flag system.flag_system (
Mapping[str,int|str] |list[str] |None) – The flag system definition. Accepted types areNone(default bitwise system with a singleFLAGGEDflag at value 1),dict[str, int](bitwise or categorical depending onflag_type- bitwise values must be powers of two),dict[str, str](always categorical;flag_typeis ignored), orlist[str](flag names are sorted; bitwise assigns powers of two, categorical uses each name as both key and value - an empty list produces the defaultFLAGGEDflag).flag_type (
Literal['bitwise','categorical','categorical_list']) – Whether to create a"bitwise"or"categorical"flag system. Only relevant whenflag_systemis adict[str, int]orlist[str].
- Return type:
None