2. i-SAS_BasicSensorModeler

2.1. interface

class basic_sensor_modeler.interface.Interface(sensor_name, sensor_setting, structural_model_name=None, **kwargs)

Bases: object

interface class

package_name = 'basic_sensor_modeler'
__init__(sensor_name, sensor_setting, structural_model_name=None, **kwargs)

initialization of Interface class

Parameters
  • sensor_name (str) – sensor name.

  • sensor_setting (dict) – sensor setting data.

  • structural_model_name (str, optional) – structural model name. The default, None

  • **kwargs – Arbitrary keyword arguments.

set_project(project_name)

set project

Parameters

project_name (str) – project name.

set_model(sensors, structural_models)

set model

Parameters
  • sensors (dict) – sensors

  • structural_models (dict) – structural models.

__call__()

get sensor and sensor structural model connection

Returns

containing followings.

dict: information of the sensor, following.
sensor_name (dict):

’locational’ (bool): True if the sensor is locational. ‘directional’ (bool): True if the sensor is directional. ‘sensor’ (pandas.DataFrame): information of each sensor point.

dict: connection between sensor and structural model, following.
(sensor_name, structural model name) (pandas.DataFrame):

structural model connection for locational sensor. if the sensor is not locational, return None.

Return type

tuple

2.2. model

class basic_sensor_modeler.model.Model(sensor_setting, cfg)

Bases: object

model class

LOCATIONAL_COLUMN_NAMES = ('x', 'y', 'z')
DIRECTIONAL_COLUMN_NAMES = ('direction_x', 'direction_y', 'direction_z')
MODEL_COMPONENT_NAMES = {'fe': 'fe_node', 'graph': 'graph_node', 'point_id': 'point_cloud'}
MODEL_COMPONENT_KEYS = {'fe': 'fe_node_id', 'graph': 'graph_node_id', 'point': 'point_id'}
__init__(sensor_setting, cfg)

constructor

Parameters
  • sensor_setting (dict) –

    sensor setting data. if setting type is ‘discrete’, location (list[list[float]], optional): coordinates of point sensor. direction (list[list[float]], optional): direction vector of sensors.

    if setting type is ‘continuous’, lines (list[dict], optional): coordinates of line sensor position.

    location (list[list[float]]): coordinates of points constructing the line. resolution (float, optional): Resolution of lines. point_num (int, optional): The number of points in lines.

  • cfg (dict) – config.

set_model(sensor, structural_model)

set model

Parameters
  • sensor (dict) – sensor.

  • structural_model (dict) – structural model.

__call__()

get sensor structural model connection and sensor

Returns

sensor structural model connection and sensor.
sensor_structural_model_connection (pandas.DataFrame, optional):

sensor structural model connection for locational sensor.

sensor (pandas.DataFrame, optional): sensor. If you load existing sensor, this key does not exist. sensor_type (str, optional): type of he sensor. If you load existing sensor, this key does not exist.

Return type

dict