es_sfgtools.modeling.garpos_tools.data_prep module
This module contains the GarposDataPreparer class, which is responsible for preparing GARPOS input data.
- es_sfgtools.modeling.garpos_tools.data_prep.GP_Transponders_from_benchmarks(coord_transformer: CoordTransformer, survey: Survey, site: Site) List[GPTransponder]
Get GP transponders from the benchmarks in the survey.
- Parameters:
coord_transformer (CoordTransformer) – The coordinate transformer.
survey (Survey) – The survey object.
site (Site) – The site metadata.
- Returns:
List of GPTransponder objects for the survey.
- Return type:
List[GPTransponder]
- Raises:
NoGPTranspondersError – If no transponders are found for the survey.
- exception es_sfgtools.modeling.garpos_tools.data_prep.NoGPTranspondersError(message: str)
Bases:
ExceptionCustom exception raised when no GP transponders are found for a given survey. This exception is used to indicate that the GP transponders for a specific survey are empty or not available.
- exception es_sfgtools.modeling.garpos_tools.data_prep.NoShotDataError(message: str)
Bases:
ExceptionCustom exception raised when no shot data is found for a given survey. This exception is used to indicate that the shot data for a specific survey is empty or not available.
- es_sfgtools.modeling.garpos_tools.data_prep.apply_survey_config(config: GarposSiteConfig, garpos_input: GarposInput) GarposInput
Apply the site configuration to the GarposInput object.
- Parameters:
config (GarposSiteConfig) – The site configuration.
garpos_input (GarposInput) – The GarposInput object to be modified.
- Returns:
The modified GarposInput object with the site configuration applied.
- Return type:
- es_sfgtools.modeling.garpos_tools.data_prep.avg_transponder_position(transponders: List[GPTransponder]) Tuple[GPPositionENU, GPPositionLLH]
Calculate the average position of the transponders.
- Parameters:
transponders (List[GPTransponder]) – List of transponders.
- Returns:
Average position in ENU and LLH.
- Return type:
Tuple[GPPositionENU, GPPositionLLH]
- es_sfgtools.modeling.garpos_tools.data_prep.create_GPTransponder(coord_transformer: CoordTransformer, benchmark: Benchmark, transponder: Transponder) GPTransponder
Create a GPTransponder object from a benchmark and transponder.
- Parameters:
coord_transformer (CoordTransformer) – The coordinate transformer.
benchmark (Benchmark) – The benchmark object.
transponder (Transponder) – The transponder object.
- Returns:
The created GPTransponder object.
- Return type:
- es_sfgtools.modeling.garpos_tools.data_prep.get_array_dpos_center(coord_transformer: CoordTransformer, transponders: List[GPTransponder])
Get the average transponder position in ENU coordinates.
- Parameters:
coord_transformer (CoordTransformer) – The coordinate transformer.
transponders (List[GPTransponder]) – List of GPTransponder objects.
- Returns:
Average transponder position in ENU and LLH coordinates.
- Return type:
Tuple[GPPositionENU, GPPositionLLH]
- es_sfgtools.modeling.garpos_tools.data_prep.prepare_garpos_input_from_survey(shot_data_path: Path, survey: Survey, site: Site, campaign: Campaign, ss_path: str, array_dpos_center: Tuple[float, float, float], num_of_shots: int, GPtransponders: List[GPTransponder]) GarposInput
Prepare the GarposInput object from the survey and shot data.
- Parameters:
shot_data_path (Path) – The path to the shot data CSV file.
survey (Survey) – The survey object.
site (Site) – The site metadata.
campaign (Campaign) – The campaign metadata.
ss_path (str) – The relative path to the sound speed profile file.
array_dpos_center (Tuple[float, float, float]) – The average position of the transponders in ENU coordinates.
num_of_shots (int) – The number of shots in the shot data.
GPtransponders (List[GPTransponder]) – List of GPTransponder objects for the survey.
- Returns:
The prepared GarposInput object.
- Return type:
- es_sfgtools.modeling.garpos_tools.data_prep.prepare_shotdata_for_garpos(coord_transformer: CoordTransformer, shodata_out_path: Path, shot_data: DataFrame, GPtransponders: List[GPTransponder])
Prepare the shot data for GARPOS.
This is done by rectifying it and saving it to a CSV file.
- Parameters:
coord_transformer (CoordTransformer) – The coordinate transformer.
shodata_out_path (Path) – The path to save the shot data CSV file.
shot_data (pd.DataFrame) – The shot data DataFrame to be prepared.
GPtransponders (List[GPTransponder]) – List of GPTransponder objects for the survey.
- Returns:
The rectified shot data DataFrame.
- Return type:
pd.DataFrame
- Raises:
ValueError – If the shot data fails validation.