es_sfgtools.data_models.metadata.site module
- class es_sfgtools.data_models.metadata.site.ReferenceFrame(*, name: str, start: Annotated[datetime | None, Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))] = None, end: Annotated[datetime | None, Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))] = None)
Bases:
AttributeUpdater,BaseModel- end: datetime | None
- model_computed_fields = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields = {'end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end date of the reference frame used for the site', metadata=[Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))]), 'name': FieldInfo(annotation=str, required=True, description='The name of the reference frame'), 'start': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The start date of the reference frame used for the site', metadata=[Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))])}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str
- start: datetime | None
- class es_sfgtools.data_models.metadata.site.Site(*, names: List[str], networks: List[str], timeOrigin: Annotated[datetime, Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))], localGeoidHeight: float | None = 0, arrayCenter: Location | None = None, campaigns: List[Campaign] = None, benchmarks: List[Benchmark] = None, referenceFrames: List[ReferenceFrame] = None)
Bases:
BaseModel- class Config
Bases:
object- json_encoders = {<class 'datetime.datetime'>: <function Site.Config.<lambda>>}
- validate_assignment = True
- export_site(filepath: str)
- localGeoidHeight: float | None
- model_computed_fields = {}
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config = {'json_encoders': {<class 'datetime.datetime'>: <function Site.Config.<lambda>>}, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields = {'arrayCenter': FieldInfo(annotation=Union[Location, NoneType], required=False, default=None, description='The array center of the site'), 'benchmarks': FieldInfo(annotation=List[Benchmark], required=False, default_factory=list, description='The benchmarks associated with the site'), 'campaigns': FieldInfo(annotation=List[Campaign], required=False, default_factory=list, description='The campaigns associated with the site'), 'localGeoidHeight': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, description='The local geoid height of the site'), 'names': FieldInfo(annotation=List[str], required=True, description='The names of the site, including the 4 character ID'), 'networks': FieldInfo(annotation=List[str], required=True, description='A list networks the site is part of'), 'referenceFrames': FieldInfo(annotation=List[ReferenceFrame], required=False, default_factory=list, description='The reference frames used for the site'), 'timeOrigin': FieldInfo(annotation=datetime, required=True, description='The time origin of the site', metadata=[Ge(ge=datetime.datetime(1901, 1, 1, 0, 0))])}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- names: List[str]
- networks: List[str]
- print_json()
- referenceFrames: List[ReferenceFrame]
- return_tats_for_campaign(campaign_name: str) List[Dict[str, Any]] | None
Return all TATs for a given campaign
- Parameters:
campaign_name (str) – The name of the campaign
- Returns:
A list of dictionaries containing Benchmark name, Transponder address, and TAT
- Return type:
List[Dict[str, Any]]
- run_component(component_type: TopLevelSiteGroups, component_metadata: dict, add_new: bool = False, update: bool = False, delete: bool = False)
Generic add, update or delete equipment for the site
- run_sub_component(component_type: TopLevelSiteGroups, component_name: str, sub_component_type: SubLevelSiteGroups, sub_component_metadata: dict, add_new: bool = False, update: bool = False, delete: bool = False)
Generic add, update or delete sub-components (e.g Transponder attached to Benchmark, Survey to campaign) for the site.
- timeOrigin: datetime
- top_level_map_components: ClassVar[Dict[str, Any]] = {TopLevelSiteGroups.BENCHMARKS: (<function Site.<lambda>>, <class 'es_sfgtools.data_models.metadata.benchmark.Benchmark'>), TopLevelSiteGroups.CAMPAIGNS: (<function Site.<lambda>>, <class 'es_sfgtools.data_models.metadata.campaign.Campaign'>), TopLevelSiteGroups.REFERENCE_FRAMES: (<function Site.<lambda>>, <class 'es_sfgtools.data_models.metadata.site.ReferenceFrame'>)}
- validate_components()
If there are no benchmarks, transponders, campaigns, or surveys, print a warning.
- class es_sfgtools.data_models.metadata.site.SubLevelSiteGroups(value)
Bases:
str,Enum- SURVEYS = 'surveys'
- TRANSPONDERS = 'transponders'
- class es_sfgtools.data_models.metadata.site.TopLevelSiteGroups(value)
Bases:
str,Enum- BENCHMARKS = 'benchmarks'
- CAMPAIGNS = 'campaigns'
- REFERENCE_FRAMES = 'referenceFrames'
- es_sfgtools.data_models.metadata.site.import_site(filepath: str)
Import site data from a JSON file.