pysiral.core.flags ================== .. py:module:: pysiral.core.flags Attributes ---------- .. autoapisummary:: pysiral.core.flags.__author__ pysiral.core.flags.ESA_SURFACE_TYPE_DICT pysiral.core.flags.SURFACE_TYPE_DICT pysiral.core.flags.WAVEFORM_CLASSIFICATION_BIT_DICT Classes ------- .. autoapisummary:: pysiral.core.flags.Hemispheres pysiral.core.flags.DataRecordType pysiral.core.flags.PysiralProcessingLevels pysiral.core.flags.ProductProcessingLevels pysiral.core.flags.DurationType pysiral.core.flags.RadarModes pysiral.core.flags.SurfaceType pysiral.core.flags.IceType pysiral.core.flags.FlagContainer pysiral.core.flags.ANDCondition pysiral.core.flags.ORCondition Module Contents --------------- .. py:data:: __author__ :value: 'Stefan Hendricks' .. py:data:: ESA_SURFACE_TYPE_DICT .. py:data:: SURFACE_TYPE_DICT .. py:data:: WAVEFORM_CLASSIFICATION_BIT_DICT .. py:class:: Hemispheres Bases: :py:obj:`enum.StrEnum` Enum for hemispheres. .. py:attribute:: NORTH :value: 'nh' .. py:attribute:: SOUTH :value: 'sh' .. py:attribute:: GLOBAL :value: 'global' .. py:method:: get_choices() -> List[str] :classmethod: .. py:class:: DataRecordType Bases: :py:obj:`enum.StrEnum` Enum for processing levels with a corresponding pysiral processor .. py:attribute:: CLIMATE_DATA_RECORD :value: 'cdr' .. py:attribute:: INTERIM_CLIMATE_DATA_RECORD :value: 'icdr' .. py:attribute:: NON_TIME_CRITICAL :value: 'ntc' .. py:attribute:: NEAR_REAL_TIME :value: 'nrt' .. py:attribute:: REPROCESSED :value: 'rep' .. py:method:: get_choices() -> List[str] :classmethod: .. py:class:: PysiralProcessingLevels Bases: :py:obj:`enum.StrEnum` Enum for processing levels with a corresponding pysiral processor .. py:attribute:: LEVEL1 :value: 'l1' .. py:attribute:: LEVEL2 :value: 'l2' .. py:attribute:: LEVEL3 :value: 'l3' .. py:class:: ProductProcessingLevels Bases: :py:obj:`enum.StrEnum` Enum for processing levels. .. py:attribute:: LEVEL1_PREPROCESSED :value: 'l1p' .. py:attribute:: LEVEL2 :value: 'l2' .. py:attribute:: LEVEL2_INTERMEDIATE :value: 'l2i' .. py:attribute:: LEVEL2_PREPROCESSED :value: 'l2p' .. py:attribute:: LEVEL3_COLLATED :value: 'l3c' .. py:attribute:: LEVEL3_SUPERCOLLATED :value: 'l3s' .. py:method:: get_choices() -> List[str] :classmethod: Returns a list of all processing level choices. .. py:class:: DurationType Bases: :py:obj:`enum.StrEnum` Enum for duration names for dateperiod.DatePeriod objects. .. py:attribute:: P1D :value: 'day' .. py:attribute:: P7D :value: 'isoweek' .. py:attribute:: P1M :value: 'month' .. py:method:: get_choices() -> List[str] :classmethod: .. py:class:: RadarModes Bases: :py:obj:`object` .. py:attribute:: flag_dict .. py:method:: get_flag(mode_name: str) -> Union[int, None] :classmethod: .. py:method:: get_name(flag: int) -> Union[str, None] :classmethod: .. py:method:: name(index: int) -> str .. py:property:: num :type: int .. py:class:: SurfaceType Bases: :py:obj:`object` Container for surface type information. Possible classifications (Adapted from CryoSat-2 conventions) - unknown - ocean - closed sea/lakes - lead - large lead/polynya - sea ice (general sea ice class, not to be confused with ice type) - continental ice - land .. py:attribute:: surface_type_dict .. py:attribute:: _surface_type_flags :value: [] .. py:attribute:: _surface_type :value: None .. py:method:: name(flag_value: int) -> str Return the flag name for a give flag value :param flag_value: :return: .. py:method:: set_flag(flag: numpy.ndarray) -> None .. py:method:: add_flag(flag: numpy.ndarray, type_str: str) -> None Add a surface type flag (boolean array) :param flag: :param type_str: :return: .. py:method:: has_flag(type_str: str) -> bool .. py:method:: get_by_name(name: str) -> FlagContainer .. py:method:: append(annex: SurfaceType) -> None .. py:method:: set_subset(subset_list) .. py:method:: fill_gaps(corrected_n_records, indices_map) API gap filler method. Note: Gaps will be filled with the nodata=unkown (8) surface_type .. py:method:: invalid_n_records(n: int) -> bool Check if flag array has the correct length .. py:method:: _get_type_id(name: str) -> int .. py:property:: flag :type: numpy.ndarray .. py:property:: n_records :type: int .. py:property:: dimdict :type: collections.OrderedDict Returns dictionary with dimensions .. py:property:: parameter_list :type: List[str] .. py:property:: lead :type: FlagContainer .. py:property:: ocean :type: FlagContainer .. py:property:: sea_ice :type: FlagContainer .. py:property:: land :type: FlagContainer .. py:class:: IceType Bases: :py:obj:`object` Container for ice type information Possible classifications - young thin ice - first year ice - multi-year ice - wet ice .. py:attribute:: _ICE_TYPE_DICT .. py:attribute:: _ice_type_flag :value: None .. py:class:: FlagContainer(flag: numpy.ndarray = None) Bases: :py:obj:`object` .. py:attribute:: _flag :value: None .. py:method:: set_flag(flag: numpy.ndarray) -> None .. py:method:: add(flag: numpy.ndarray) -> None :abstractmethod: .. py:property:: indices :type: numpy.ndarray .. py:property:: flag :type: numpy.ndarray .. py:property:: num :type: int .. py:class:: ANDCondition(**kwargs) Bases: :py:obj:`FlagContainer` .. py:method:: add(flag: Union[numpy.ndarray, bool]) -> None .. py:class:: ORCondition(**kwargs) Bases: :py:obj:`FlagContainer` .. py:method:: add(flag: Union[numpy.ndarray, bool]) -> None