hydro.flags =========== .. py:module:: hydro.flags .. autoapi-nested-parse:: A Collection of Flag Schemes. Classes ------- .. autoapisummary:: hydro.flags.FlagDefProtocol hydro.flags.ExchangeFlag hydro.flags.ExchangeBottleFlag hydro.flags.ExchangeSampleFlag hydro.flags.ExchangeCTDFlag Module Contents --------------- .. py:class:: FlagDefProtocol Bases: :py:obj:`Protocol` Base class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing). For example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto[T](Protocol): def meth(self) -> T: ... .. py:attribute:: flag :type: int .. py:property:: _flag_definitions :type: dict[int, str] :abstractmethod: .. py:property:: _no_data_flags :type: tuple[int] :abstractmethod: .. py:class:: ExchangeFlag(flag) Bases: :py:obj:`enum.IntEnum` Enum where members are also (and must be) ints .. py:attribute:: flag .. py:property:: definition .. py:property:: cf_def .. py:property:: has_value .. py:class:: ExchangeBottleFlag(flag) Bases: :py:obj:`ExchangeFlag` Enum representing a WHP Bottle flag. This flag represents information about the sampling device itself (i.e. the niskin bottle). It should only be used for "BTLNBR_FLAG_W" values and should never be used with CTD files. .. py:attribute:: NOFLAG :value: 0 .. py:attribute:: NO_INFO :value: 1 .. py:attribute:: GOOD :value: 2 .. py:attribute:: LEAKING :value: 3 .. py:attribute:: BAD_TRIP :value: 4 .. py:attribute:: NOT_REPORTED :value: 5 .. py:attribute:: DISCREPANCY :value: 6 .. py:attribute:: UNKNOWN :value: 7 .. py:attribute:: PAIR :value: 8 .. py:attribute:: NOT_SAMPLED :value: 9 .. py:property:: _no_data_flags .. py:property:: _flag_definitions .. py:class:: ExchangeSampleFlag(flag) Bases: :py:obj:`ExchangeFlag` Enum where members are also (and must be) ints .. py:attribute:: NOFLAG :value: 0 .. py:attribute:: MISSING :value: 1 .. py:attribute:: GOOD :value: 2 .. py:attribute:: QUESTIONABLE :value: 3 .. py:attribute:: BAD :value: 4 .. py:attribute:: NOT_REPORTED :value: 5 .. py:attribute:: MEAN :value: 6 .. py:attribute:: CHROMA_MANUAL :value: 7 .. py:attribute:: CHROMA_IRREGULAR :value: 8 .. py:attribute:: NOT_SAMPLED :value: 9 .. py:property:: _no_data_flags .. py:property:: _flag_definitions .. py:class:: ExchangeCTDFlag(flag) Bases: :py:obj:`ExchangeFlag` Enum where members are also (and must be) ints .. py:attribute:: NOFLAG :value: 0 .. py:attribute:: UNCALIBRATED :value: 1 .. py:attribute:: GOOD :value: 2 .. py:attribute:: QUESTIONABLE :value: 3 .. py:attribute:: BAD :value: 4 .. py:attribute:: NOT_REPORTED :value: 5 .. py:attribute:: INTERPOLATED :value: 6 .. py:attribute:: DESPIKED :value: 7 .. py:attribute:: NOT_SAMPLED :value: 9 .. py:property:: _no_data_flags .. py:property:: _flag_definitions