该函数用于设置所有方向(测向)数据的值,将测向数据存储在Orientations数据对象中。
set_orientations(self, orientations: Union[DataFrame, str],
                 reference: str = None,
                 **kwargs)
orientations:测向数据。可以是一个Pandas DataFrame或一个.csv或.tsv或.csv.gz或.tsv.gz文件的路径。DataFrame应该包括以下几列,列名区分大小写:
X:位置数据的x坐标Y:位置数据的y坐标Z:位置数据的z坐标
    - azimuth:相对于正北方向的测向角,以度为单位
    - dip:沿xyz坐标系中的垂直方向的角度,以度为单位reference:坐标系识别字符串,可以是以下值之一:
    - “坐标系1”:使用默认方向,即相对于正北方向的角度和xyz坐标系中的垂直方向的角度。
    - “坐标系2”:使用相对于磁北方向的角度(而不是正北方向)和相对于经磁线垂线方向的夹角(以及xyz坐标系中的垂直方向的角度)。
    - 坐标系3”:使用自定义方向,即通过输入kwargs参数来定义方向。必须包含以下关键字参数:
        - azimuth_col:数据DataFrame中包含方位角数据的列名。
        - dip_col:数据DataFrame中包含倾角数据的列名。
        - reference_azimuth:方向的基准方向角(相对于正北方向)。必须以度为单位给出。可以是任何值(例如,如果需要使用自定义参考框架)。
        - reference_dip:方向的基准倾角(相对于xyz坐标系中的垂直方向)。该值必须以度为单位给出。可以是任何值(例如,如果需要使用自定义参考框架)。
该函数没有返回值。将更新Orientations数据对象。
orientations_df = pd.DataFrame({'X': [0, 1, 2], 'Y': [0, 0, 0], 'Z': [0, 1, 2],
                                'azimuth': [90, 180, 270], 'dip': [30, 45, 60]})
geo_data = gp.create_data(geo_model_extent=[0, 10, 0, 10, 0, 10],
                          resolution=[1, 1, 1],
                          orientations_df=orientations_df)
# 使用默认参考系
geo_data.set_orientations(orientations=orientations_df)
# 使用坐标系2
geo_data.set_orientations(orientations=orientations_df, reference='坐标系2')
# 使用自定义参考框架
orientation_cols = {'azimuth_col': 'azimuth', 'dip_col': 'dip', 
                    'reference_azimuth': 20, 'reference_dip': 50}
geo_data.set_orientations(orientations=orientations_df, reference='坐标系3', **orientation_cols)
以上示例将分别使用默认参考系,坐标系2和自定义参考框架来设置方向数据。