geo.product_name

geo.product_name

Functions

Name Description
check Check if name satisfies regular expression
decompose Decompose a string according to the list of regexp,
get_fields Returns every field name that can be change in product name
get_level Returns the level of a product based on its name
get_pattern Get pattern that match product name
retrieve_product Function retrieve a product base on another one.

check

geo.product_name.check(name, regexp)

Check if name satisfies regular expression

decompose

geo.product_name.decompose(name, regexps, sep='_')

Decompose a string according to the list of regexp, assumming that every regexp block are splitted by sep

get_fields

geo.product_name.get_fields(name, out=[])

Returns every field name that can be change in product name

get_level

geo.product_name.get_level(name, pattern)

Returns the level of a product based on its name

get_pattern

geo.product_name.get_pattern(name)

Get pattern that match product name

Args: name (str): Product name or id

Returns: dict: Dictionary containing sensor name, pattern and regular expression

retrieve_product

geo.product_name.retrieve_product(product_id, fields, pattern=None)

Function retrieve a product base on another one. For example, retrieve Level-2 product based on Level-1

Args: product_id (str): Product considered as base fields (dict): Fields to change pattern (tuple[str], optional): Pattern of . Defaults to None.

Returns: str: New product id