Commit 70d9b0ad authored by acpaquette's avatar acpaquette Committed by jlaura
Browse files

Ipf Writer (#37)

* Added to ipf from dataframe. Also updated both gpf and ipf writer tests

* Added test output file.

* Added asserts to gpf and ipf tests

* Reverted save_gpf testing to numpy array almost equals
parent 1bf9a376
Loading
Loading
Loading
Loading
+91 −74
Original line number Diff line number Diff line
%% Cell type:code id: tags:

``` python
import os
import sys
from functools import singledispatch
import warnings

import pandas as pd
import numpy as np

from plio.examples import get_path
from plio.io.io_bae import read_gpf
from plio.io.io_bae import read_gpf, read_ipf
```

%% Cell type:code id: tags:

``` python
# Reads a .atf file and outputs all of the
# .ipf, .gpf, .sup, .prj, and path to locate the
# .apf file (should be the same as all others)
def read_atf(atf_file):
    with open(atf_file) as f:

        files = []
        ipf = []
        sup = []
        files_dict = []

        # Grabs every PRJ, GPF, SUP, and IPF image from the ATF file
        for line in f:
            if line[-4:-1] == 'prj' or line[-4:-1] == 'gpf' or line[-4:-1] == 'sup' or line[-4:-1] == 'ipf' or line[-4:-1] == 'atf':
                files.append(line)

        files = np.array(files)

        # Creates appropriate arrays for certain files in the right format
        for file in files:
            file = file.strip()
            file = file.split(' ')

            # Grabs all the IPF files
            if file[1].endswith('.ipf'):
                ipf.append(file[1])

            # Grabs all the SUP files
            if file[1].endswith('.sup'):
                sup.append(file[1])

            files_dict.append(file)

        # Creates a dict out of file lists for GPF, PRJ, IPF, and ATF
        files_dict = (dict(files_dict))

        # Sets the value of IMAGE_IPF to all IPF images
        files_dict['IMAGE_IPF'] = ipf

        # Sets the value of IMAGE_SUP to all SUP images
        files_dict['IMAGE_SUP'] = sup

        # Sets the value of PATH to the path of the ATF file
        files_dict['PATH'] = os.path.dirname(os.path.abspath(atf_file))

        return files_dict

@singledispatch
def read_ipf(arg):
    return str(arg)

@read_ipf.register(str)
def read_ipf_str(input_data):
    """
    Read a socet ipf file into a pandas data frame

    Parameters
    ----------
    input_data : str
                 path to the an input data file

    Returns
    -------
    df : pd.DataFrame
         containing the ipf data with appropriate column names and indices
    """

    # Check that the number of rows is matching the expected number
    with open(input_data, 'r') as f:
        for i, l in enumerate(f):
            if i == 1:
                cnt = int(l)
            elif i == 2:
                col = l
                break

    columns = np.genfromtxt(input_data, skip_header=2, dtype='unicode',
                            max_rows = 1, delimiter = ',')

    # TODO: Add unicode conversion
    d = [line.split() for line in open(input_data, 'r')]
    d = np.hstack(np.array(d[3:]))

    d = d.reshape(-1, 12)

    df = pd.DataFrame(d, columns=columns)
    file = os.path.split(os.path.splitext(input_data)[0])[1]
    df['ipf_file'] = pd.Series(np.full((len(df['pt_id'])), file), index = df.index)

    assert int(cnt) == len(df), 'Dataframe length {} does not match point length {}.'.format(int(cnt), len(df))

    # Soft conversion of numeric types to numerics, allows str in first col for point_id
    df = df.apply(pd.to_numeric, errors='ignore')

    return df

@read_ipf.register(list)
def read_ipf_list(input_data_list):
    """
    Read a socet ipf file into a pandas data frame

    Parameters
    ----------
    input_data_list : list
                      list of paths to the a set of input data files

    Returns
    -------
    df : pd.DataFrame
         containing the ipf data with appropriate column names and indices
    """
    frames = []

    for input_file in input_data_list:
        frames.append(read_ipf(input_file))

    df = pd.concat(frames)

    return df
```

%% Cell type:code id: tags:

``` python
atf_dict = read_atf(get_path('CTX_Athabasca_Middle_step0.atf'))

gpf_file = os.path.join(atf_dict['PATH'], atf_dict['GP_FILE']);
ipf_list = [os.path.join(atf_dict['PATH'], i) for i in atf_dict['IMAGE_IPF']]

gpf_df = read_gpf(gpf_file).set_index('point_id')
ipf_df = read_ipf(ipf_list).set_index('pt_id')

point_diff = ipf_df.index.difference(gpf_df.index)

if len(point_diff) != 0:
    warnings.warn("The following points found in ipf files missing from gpf file: \n\n{}. \
                  \n\nContinuing, but these points will be missing from the control network".format(list(point_diff)))

new_df = ipf_df.merge(gpf_df, left_index=True, right_index=True)
new_df
```

%% Output

    /Users/adampaquette/anaconda/envs/pysat/lib/python3.6/site-packages/ipykernel_launcher.py:12: UserWarning: The following points found in ipf files missing from gpf file:
    
    ['P03_002226_1895_XI_09N203W_15', 'P03_002226_1895_XI_09N203W_16', 'P03_002226_1895_XI_09N203W_17', 'P03_002226_1895_XI_09N203W_18', 'P03_002226_1895_XI_09N203W_19', 'P03_002226_1895_XI_09N203W_20', 'P03_002226_1895_XI_09N203W_21', 'P03_002226_1895_XI_09N203W_22', 'P03_002226_1895_XI_09N203W_24', 'P03_002226_1895_XI_09N203W_26', 'P03_002226_1895_XI_09N203W_30', 'P03_002226_1895_XI_09N203W_31', 'P03_002226_1895_XI_09N203W_32', 'P03_002226_1895_XI_09N203W_34', 'P03_002226_1895_XI_09N203W_36', 'P03_002226_1895_XI_09N203W_37', 'P03_002226_1895_XI_09N203W_44', 'P03_002226_1895_XI_09N203W_48', 'P03_002226_1895_XI_09N203W_49', 'P03_002226_1895_XI_09N203W_56', 'P03_002226_1895_XI_09N203W_57', 'P03_002226_1895_XI_09N203W_61', 'P03_002226_1895_XI_09N203W_62', 'P03_002226_1895_XI_09N203W_63', 'P03_002226_1895_XI_09N203W_65', 'P19_008344_1894_XN_09N203W_4', 'P20_008845_1894_XN_09N203W_15'].
    
    Continuing, but these points will be missing from the control network
      if sys.path[0] == '':

                                   val  fid_val  no_obs           l.           s.  \
    10_8344_8845_4r                  1        0       0 -2919.380615  1052.729004
    10_8344_8845_4r                  1        0       0 -4044.697510  1008.950928
    10_8344_8845_4r                  1        0       0  1700.584473 -2390.001709
    10_8344_8845_4r                  1        0       0  2006.141113 -2234.915283
    11_8344_8845_4r                  1        0       0   370.151917  2340.653076
    11_8344_8845_4r                  1        0       0  -761.216064  2303.787109
    11_8344_8845_4r                  1        0       0  4985.437988 -1070.364990
    11_8344_8845_4r                  1        0       0  5293.700195  -993.390625
    12_8344_8845_4r                  1        0       0   236.395218   984.833252
    12_8344_8845_4r                  1        0       0  -889.364441   966.533997
    12_8344_8845_4r                  1        0       0  4856.525391 -2439.154785
    12_8344_8845_4r                  1        0       0  5158.205566 -2295.737549
    13_8344_8845_4r                  1        0       0 -1431.023804  1817.888672
    13_8344_8845_4r                  1        0       0 -2559.871338  1777.522827
    13_8344_8845_4r                  1        0       0  3186.063232 -1598.743530
    13_8344_8845_4r                  1        0       0  3493.876221 -1493.029175
    14_8344_8845_4r                  1        0       0  3518.268066  2495.108643
    14_8344_8845_4r                  1        0       0  2385.278320  2476.032227
    14_8344_8845_4r                  1        0       0  8131.361816  -902.645325
    14_8344_8845_4r                  1        0       0  8437.115234  -842.309326
    15_8344_8845_4r_mt_z             1        0       0  3522.998535  1049.406982
    15_8344_8845_4r_mt_z             1        0       0  2395.869385  1038.165405
    15_8344_8845_4r_mt_z             1        0       0  8142.054688 -2364.445557
    15_8344_8845_4r_mt_z             1        0       0  8440.085938 -2219.049805
    16_8344_8845_4r                  1        0       0  1885.346313  1807.367065
    16_8344_8845_4r                  1        0       0   756.099792  1785.494751
    16_8344_8845_4r                  1        0       0  6502.070313 -1593.964233
    16_8344_8845_4r                  1        0       0  6805.896973 -1493.774048
    17_8344_8845_2r_mt_z             1        0       0 -2015.364380   465.268188
    17_8344_8845_2r_mt_z             1        0       0 -3138.269531   442.515503
    ...                            ...      ...     ...          ...          ...
    P20_008845_1894_XN_09N203W_18    1        0       1  8918.806641 -1701.755249
    P20_008845_1894_XN_09N203W_2     1        0       1 -2277.691406 -2240.823486
    P20_008845_1894_XN_09N203W_2     1        0       0 -3389.000000 -2155.000000
    P20_008845_1894_XN_09N203W_2     1        0       1 -5474.326660   842.207031
    P20_008845_1894_XN_09N203W_2     1        0       0 -4613.785645   643.217224
    P20_008845_1894_XN_09N203W_3     1        0       1 -1801.096436 -2078.479004
    P20_008845_1894_XN_09N203W_3     1        0       0 -2913.000000 -2000.000000
    P20_008845_1894_XN_09N203W_3     1        0       1 -4997.791504  1000.375854
    P20_008845_1894_XN_09N203W_3     1        0       0 -4137.536133   774.480347
    P20_008845_1894_XN_09N203W_4     1        0       1 -2103.971680   184.334869
    P20_008845_1894_XN_09N203W_4     1        0       1 -3226.000000   167.000000
    P20_008845_1894_XN_09N203W_5     1        0       1 -1813.285278     3.928788
    P20_008845_1894_XN_09N203W_5     1        0       1 -2934.000000    -6.000000
    P20_008845_1894_XN_09N203W_5     1        0       0 -4165.228516  2507.076660
    P20_008845_1894_XN_09N203W_6     1        0       1 -2250.549072  1572.788086
    P20_008845_1894_XN_09N203W_6     1        0       3 -3378.000000  1532.000000
    P20_008845_1894_XN_09N203W_6     1        0       1  2367.587646 -1849.272095
    P20_008845_1894_XN_09N203W_6     1        0       1  2675.137207 -1730.558105
    P20_008845_1894_XN_09N203W_7     1        0       1 -2249.931396  1712.971436
    P20_008845_1894_XN_09N203W_7     1        0       3 -3378.000000  1672.000000
    P20_008845_1894_XN_09N203W_7     1        0       1  2367.507813 -1706.241821
    P20_008845_1894_XN_09N203W_7     1        0       1  2675.892578 -1596.527100
    P20_008845_1894_XN_09N203W_8     1        0       1 -1664.131104  1875.622437
    P20_008845_1894_XN_09N203W_8     1        0       3 -2793.000000  1837.000000
    P20_008845_1894_XN_09N203W_8     1        0       1  2953.094727 -1538.956543
    P20_008845_1894_XN_09N203W_8     1        0       1  3261.290039 -1439.873169
    P20_008845_1894_XN_09N203W_9     1        0       1   332.072113 -2045.152222
    P20_008845_1894_XN_09N203W_9     1        0       0  -780.000000 -1953.000000
    P20_008845_1894_XN_09N203W_9     1        0       0 -2866.689453  1031.006104
    P20_008845_1894_XN_09N203W_9     1        0       0 -2002.366211   824.604126
    
                                      sig_l     sig_s     res_l     res_s  fid_x  \
    10_8344_8845_4r                0.000000  0.000000  0.059914  0.930311    0.0
    10_8344_8845_4r                0.000000  0.000000  0.063678  0.661294    0.0
    10_8344_8845_4r                0.000000  0.000000 -0.063695 -1.055619    0.0
    10_8344_8845_4r                0.000000  0.000000  0.318779 -0.585138    0.0
    11_8344_8845_4r                0.000000  0.000000 -0.239226 -1.113693    0.0
    11_8344_8845_4r                0.000000  0.000000 -0.247307 -0.587299    0.0
    11_8344_8845_4r                0.000000  0.000000  0.239207  1.080801    0.0
    11_8344_8845_4r                0.000000  0.000000  0.672877  0.626316    0.0
    12_8344_8845_4r                0.000000  0.000000  0.073683 -0.237114    0.0
    12_8344_8845_4r                0.000000  0.000000 -0.251753  0.008170    0.0
    12_8344_8845_4r                0.000000  0.000000  0.133406  0.068024    0.0
    12_8344_8845_4r                0.000000  0.000000  0.487209  0.036399    0.0
    13_8344_8845_4r                0.000000  0.000000 -0.056901 -0.383259    0.0
    13_8344_8845_4r                0.000000  0.000000 -0.131265 -0.305102    0.0
    13_8344_8845_4r                0.000000  0.000000  0.019201  0.485372    0.0
    13_8344_8845_4r                0.000000  0.000000  0.568393  0.146750    0.0
    14_8344_8845_4r                0.000000  0.000000  0.268449  1.000455    0.0
    14_8344_8845_4r                0.000000  0.000000  0.389532 -0.299258    0.0
    14_8344_8845_4r                0.000000  0.000000 -0.469784  0.023018    0.0
    14_8344_8845_4r                0.000000  0.000000  0.289877 -0.829150    0.0
    15_8344_8845_4r_mt_z           0.000000  0.000000  0.466921  1.168062    0.0
    15_8344_8845_4r_mt_z           0.000000  0.000000 -0.170850  0.372485    0.0
    15_8344_8845_4r_mt_z           0.000000  0.000000 -0.072035 -0.832436    0.0
    15_8344_8845_4r_mt_z           0.000000  0.000000  0.274030 -0.850105    0.0
    16_8344_8845_4r                0.000000  0.000000 -0.028473 -0.238015    0.0
    16_8344_8845_4r                0.000000  0.000000  0.165338 -0.327408    0.0
    16_8344_8845_4r                0.000000  0.000000 -0.007916  0.463232    0.0
    16_8344_8845_4r                0.000000  0.000000  0.328896  0.019526    0.0
    17_8344_8845_2r_mt_z           0.000000  0.000000  0.010045  0.244017    0.0
    17_8344_8845_2r_mt_z           0.000000  0.000000 -0.023370 -0.248643    0.0
    ...                                 ...       ...       ...       ...    ...
    P20_008845_1894_XN_09N203W_18  0.022017  0.022017  0.734173 -0.074947    0.0
    P20_008845_1894_XN_09N203W_2   0.144273  0.144273 -0.061422 -0.263554    0.0
    P20_008845_1894_XN_09N203W_2   0.000000  0.000000 -0.073150 -0.271173    0.0
    P20_008845_1894_XN_09N203W_2   0.275627  0.275627  0.164525  0.349547    0.0
    P20_008845_1894_XN_09N203W_2   0.091086  0.091086  0.132736  0.239899    0.0
    P20_008845_1894_XN_09N203W_3   0.062058  0.062058 -0.198696 -0.105860    0.0
    P20_008845_1894_XN_09N203W_3   0.000000  0.000000 -0.088180 -0.049593    0.0
    P20_008845_1894_XN_09N203W_3   0.132941  0.132941  0.257260  0.117777    0.0
    P20_008845_1894_XN_09N203W_3   0.185544  0.185544  0.199301  0.065777    0.0
    P20_008845_1894_XN_09N203W_4   0.146920  0.146920  0.182557 -0.000683    0.0
    P20_008845_1894_XN_09N203W_4   0.000000  0.000000 -0.195774 -0.000066    0.0
    P20_008845_1894_XN_09N203W_5   0.019047  0.019047 -0.235171 -0.174079    0.0
    P20_008845_1894_XN_09N203W_5   0.000000  0.000000 -0.049005  0.437424    0.0
    P20_008845_1894_XN_09N203W_5   0.000000  0.000000  0.447100 -0.219764    0.0
    P20_008845_1894_XN_09N203W_6   0.025015  0.025015 -0.146990  0.192274    0.0
    P20_008845_1894_XN_09N203W_6   0.000000  0.000000  0.026541  0.063346    0.0
    P20_008845_1894_XN_09N203W_6   0.025110  0.025110 -0.040890 -0.136247    0.0
    P20_008845_1894_XN_09N203W_6   0.064276  0.064276  0.546035 -0.185103    0.0
    P20_008845_1894_XN_09N203W_7   0.010596  0.010596 -0.102909  0.079389    0.0
    P20_008845_1894_XN_09N203W_7   0.000000  0.000000  0.055623  0.013456    0.0
    P20_008845_1894_XN_09N203W_7   0.047435  0.047435 -0.157931 -0.042074    0.0
    P20_008845_1894_XN_09N203W_7   0.058218  0.058218  0.589561 -0.111421    0.0
    P20_008845_1894_XN_09N203W_8   0.017266  0.017266 -0.239689 -0.402891    0.0
    P20_008845_1894_XN_09N203W_8   0.000000  0.000000 -0.117483 -0.229337    0.0
    P20_008845_1894_XN_09N203W_8   0.023364  0.023364  0.177406  0.403161    0.0
    P20_008845_1894_XN_09N203W_8   0.023538  0.023538  0.575510  0.180705    0.0
    P20_008845_1894_XN_09N203W_9   0.232865  0.232865  0.095817 -0.483899    0.0
    P20_008845_1894_XN_09N203W_9   0.000000  0.000000  0.298743 -0.045963    0.0
    P20_008845_1894_XN_09N203W_9   0.000000  0.000000 -0.038437  0.471309    0.0
    P20_008845_1894_XN_09N203W_9   0.397616  0.397616 -0.141172  0.105223    0.0
    
                                      ...      known lat_Y_North  long_X_East  \
    10_8344_8845_4r                   ...          0    0.159378     2.724649
    10_8344_8845_4r                   ...          0    0.159378     2.724649
    10_8344_8845_4r                   ...          0    0.159378     2.724649
    10_8344_8845_4r                   ...          0    0.159378     2.724649
    11_8344_8845_4r                   ...          0    0.164905     2.721815
    11_8344_8845_4r                   ...          0    0.164905     2.721815
    11_8344_8845_4r                   ...          0    0.164905     2.721815
    11_8344_8845_4r                   ...          0    0.164905     2.721815
    12_8344_8845_4r                   ...          0    0.164949     2.724076
    12_8344_8845_4r                   ...          0    0.164949     2.724076
    12_8344_8845_4r                   ...          0    0.164949     2.724076
    12_8344_8845_4r                   ...          0    0.164949     2.724076
    13_8344_8845_4r                   ...          0    0.161840     2.723059
    13_8344_8845_4r                   ...          0    0.161840     2.723059
    13_8344_8845_4r                   ...          0    0.161840     2.723059
    13_8344_8845_4r                   ...          0    0.161840     2.723059
    14_8344_8845_4r                   ...          0    0.170415     2.720880
    14_8344_8845_4r                   ...          0    0.170415     2.720880
    14_8344_8845_4r                   ...          0    0.170415     2.720880
    14_8344_8845_4r                   ...          0    0.170415     2.720880
    15_8344_8845_4r_mt_z              ...          1    0.170723     2.723266
    15_8344_8845_4r_mt_z              ...          1    0.170723     2.723266
    15_8344_8845_4r_mt_z              ...          1    0.170723     2.723266
    15_8344_8845_4r_mt_z              ...          1    0.170723     2.723266
    16_8344_8845_4r                   ...          0    0.167682     2.722359
    16_8344_8845_4r                   ...          0    0.167682     2.722359
    16_8344_8845_4r                   ...          0    0.167682     2.722359
    16_8344_8845_4r                   ...          0    0.167682     2.722359
    17_8344_8845_2r_mt_z              ...          1    0.161092     2.725426
    17_8344_8845_2r_mt_z              ...          1    0.161092     2.725426
    ...                               ...        ...         ...          ...
    P20_008845_1894_XN_09N203W_18     ...          0    0.171455     2.722281
    P20_008845_1894_XN_09N203W_2      ...          0    0.161184     2.729925
    P20_008845_1894_XN_09N203W_2      ...          0    0.161184     2.729925
    P20_008845_1894_XN_09N203W_2      ...          0    0.161184     2.729925
    P20_008845_1894_XN_09N203W_2      ...          0    0.161184     2.729925
    P20_008845_1894_XN_09N203W_3      ...          0    0.161992     2.729563
    P20_008845_1894_XN_09N203W_3      ...          0    0.161992     2.729563
    P20_008845_1894_XN_09N203W_3      ...          0    0.161992     2.729563
    P20_008845_1894_XN_09N203W_3      ...          0    0.161992     2.729563
    P20_008845_1894_XN_09N203W_4      ...          0    0.160994     2.725912
    P20_008845_1894_XN_09N203W_4      ...          0    0.160994     2.725912
    P20_008845_1894_XN_09N203W_5      ...          0    0.161544     2.726149
    P20_008845_1894_XN_09N203W_5      ...          0    0.161544     2.726149
    P20_008845_1894_XN_09N203W_5      ...          0    0.161544     2.726149
    P20_008845_1894_XN_09N203W_6      ...          0    0.160447     2.723639
    P20_008845_1894_XN_09N203W_6      ...          0    0.160447     2.723639
    P20_008845_1894_XN_09N203W_6      ...          0    0.160447     2.723639
    P20_008845_1894_XN_09N203W_6      ...          0    0.160447     2.723639
    P20_008845_1894_XN_09N203W_7      ...          0    0.160419     2.723407
    P20_008845_1894_XN_09N203W_7      ...          0    0.160419     2.723407
    P20_008845_1894_XN_09N203W_7      ...          0    0.160419     2.723407
    P20_008845_1894_XN_09N203W_7      ...          0    0.160419     2.723407
    P20_008845_1894_XN_09N203W_8      ...          0    0.161417     2.723012
    P20_008845_1894_XN_09N203W_8      ...          0    0.161417     2.723012
    P20_008845_1894_XN_09N203W_8      ...          0    0.161417     2.723012
    P20_008845_1894_XN_09N203W_8      ...          0    0.161417     2.723012
    P20_008845_1894_XN_09N203W_9      ...          0    0.165741     2.729053
    P20_008845_1894_XN_09N203W_9      ...          0    0.165741     2.729053
    P20_008845_1894_XN_09N203W_9      ...          0    0.165741     2.729053
    P20_008845_1894_XN_09N203W_9      ...          0    0.165741     2.729053
    
                                            ht  sig0  sig1        sig2       res0  \
    10_8344_8845_4r               -2523.828227   0.0   0.0   25.000000  18.301328
    10_8344_8845_4r               -2523.828227   0.0   0.0   25.000000  18.301328
    10_8344_8845_4r               -2523.828227   0.0   0.0   25.000000  18.301328
    10_8344_8845_4r               -2523.828227   0.0   0.0   25.000000  18.301328
    11_8344_8845_4r               -2445.237027   0.0   0.0   30.000000 -22.046575
    11_8344_8845_4r               -2445.237027   0.0   0.0   30.000000 -22.046575
    11_8344_8845_4r               -2445.237027   0.0   0.0   30.000000 -22.046575
    11_8344_8845_4r               -2445.237027   0.0   0.0   30.000000 -22.046575
    12_8344_8845_4r               -2606.935163   0.0   0.0  100.000000  -7.549561
    12_8344_8845_4r               -2606.935163   0.0   0.0  100.000000  -7.549561
    12_8344_8845_4r               -2606.935163   0.0   0.0  100.000000  -7.549561
    12_8344_8845_4r               -2606.935163   0.0   0.0  100.000000  -7.549561
    13_8344_8845_4r               -2551.901554   0.0   0.0    4.536068  -1.643694
    13_8344_8845_4r               -2551.901554   0.0   0.0    4.536068  -1.643694
    13_8344_8845_4r               -2551.901554   0.0   0.0    4.536068  -1.643694
    13_8344_8845_4r               -2551.901554   0.0   0.0    4.536068  -1.643694
    14_8344_8845_4r               -2505.953426   0.0   0.0    5.000000 -50.069808
    14_8344_8845_4r               -2505.953426   0.0   0.0    5.000000 -50.069808
    14_8344_8845_4r               -2505.953426   0.0   0.0    5.000000 -50.069808
    14_8344_8845_4r               -2505.953426   0.0   0.0    5.000000 -50.069808
    15_8344_8845_4r_mt_z          -2502.470000   0.0   0.0    5.000000 -34.817656
    15_8344_8845_4r_mt_z          -2502.470000   0.0   0.0    5.000000 -34.817656
    15_8344_8845_4r_mt_z          -2502.470000   0.0   0.0    5.000000 -34.817656
    15_8344_8845_4r_mt_z          -2502.470000   0.0   0.0    5.000000 -34.817656
    16_8344_8845_4r               -2558.312931   0.0   0.0    1.707214 -29.465246
    16_8344_8845_4r               -2558.312931   0.0   0.0    1.707214 -29.465246
    16_8344_8845_4r               -2558.312931   0.0   0.0    1.707214 -29.465246
    16_8344_8845_4r               -2558.312931   0.0   0.0    1.707214 -29.465246
    17_8344_8845_2r_mt_z          -2590.130000   0.0   0.0    2.000000 -10.779830
    17_8344_8845_2r_mt_z          -2590.130000   0.0   0.0    2.000000 -10.779830
    ...                                    ...   ...   ...         ...        ...
    P20_008845_1894_XN_09N203W_18 -2514.431453   0.0   0.0    0.000000 -38.388316
    P20_008845_1894_XN_09N203W_2  -2535.712262   0.0   0.0    0.000000  42.067289
    P20_008845_1894_XN_09N203W_2  -2535.712262   0.0   0.0    0.000000  42.067289
    P20_008845_1894_XN_09N203W_2  -2535.712262   0.0   0.0    0.000000  42.067289
    P20_008845_1894_XN_09N203W_2  -2535.712262   0.0   0.0    0.000000  42.067289
    P20_008845_1894_XN_09N203W_3  -2525.215515   0.0   0.0    0.000000  36.033823
    P20_008845_1894_XN_09N203W_3  -2525.215515   0.0   0.0    0.000000  36.033823
    P20_008845_1894_XN_09N203W_3  -2525.215515   0.0   0.0    0.000000  36.033823
    P20_008845_1894_XN_09N203W_3  -2525.215515   0.0   0.0    0.000000  36.033823
    P20_008845_1894_XN_09N203W_4  -2562.446851   0.0   0.0    0.000000  -7.233876
    P20_008845_1894_XN_09N203W_4  -2562.446851   0.0   0.0    0.000000  -7.233876
    P20_008845_1894_XN_09N203W_5  -2560.812028   0.0   0.0    0.000000   7.498790
    P20_008845_1894_XN_09N203W_5  -2560.812028   0.0   0.0    0.000000   7.498790
    P20_008845_1894_XN_09N203W_5  -2560.812028   0.0   0.0    0.000000   7.498790
    P20_008845_1894_XN_09N203W_6  -2605.266130   0.0   0.0    0.000000   7.687475
    P20_008845_1894_XN_09N203W_6  -2605.266130   0.0   0.0    0.000000   7.687475
    P20_008845_1894_XN_09N203W_6  -2605.266130   0.0   0.0    0.000000   7.687475
    P20_008845_1894_XN_09N203W_6  -2605.266130   0.0   0.0    0.000000   7.687475
    P20_008845_1894_XN_09N203W_7  -2619.498291   0.0   0.0    0.000000   6.358447
    P20_008845_1894_XN_09N203W_7  -2619.498291   0.0   0.0    0.000000   6.358447
    P20_008845_1894_XN_09N203W_7  -2619.498291   0.0   0.0    0.000000   6.358447
    P20_008845_1894_XN_09N203W_7  -2619.498291   0.0   0.0    0.000000   6.358447
    P20_008845_1894_XN_09N203W_8  -2608.028730   0.0   0.0    0.000000  -0.219662
    P20_008845_1894_XN_09N203W_8  -2608.028730   0.0   0.0    0.000000  -0.219662
    P20_008845_1894_XN_09N203W_8  -2608.028730   0.0   0.0    0.000000  -0.219662
    P20_008845_1894_XN_09N203W_8  -2608.028730   0.0   0.0    0.000000  -0.219662
    P20_008845_1894_XN_09N203W_9  -2586.686862   0.0   0.0    0.000000  15.191825
    P20_008845_1894_XN_09N203W_9  -2586.686862   0.0   0.0    0.000000  15.191825
    P20_008845_1894_XN_09N203W_9  -2586.686862   0.0   0.0    0.000000  15.191825
    P20_008845_1894_XN_09N203W_9  -2586.686862   0.0   0.0    0.000000  15.191825
    
                                         res1        res2
    10_8344_8845_4r                 44.206259  416.201741
    10_8344_8845_4r                 44.206259  416.201741
    10_8344_8845_4r                 44.206259  416.201741
    10_8344_8845_4r                 44.206259  416.201741
    11_8344_8845_4r                103.403228  173.210013
    11_8344_8845_4r                103.403228  173.210013
    11_8344_8845_4r                103.403228  173.210013
    11_8344_8845_4r                103.403228  173.210013
    12_8344_8845_4r                 93.170584  180.058858
    12_8344_8845_4r                 93.170584  180.058858
    12_8344_8845_4r                 93.170584  180.058858
    12_8344_8845_4r                 93.170584  180.058858
    13_8344_8845_4r                 74.244153  319.554535
    13_8344_8845_4r                 74.244153  319.554535
    13_8344_8845_4r                 74.244153  319.554535
    13_8344_8845_4r                 74.244153  319.554535
    14_8344_8845_4r                144.316524 -164.540707
    14_8344_8845_4r                144.316524 -164.540707
    14_8344_8845_4r                144.316524 -164.540707
    14_8344_8845_4r                144.316524 -164.540707
    15_8344_8845_4r_mt_z           145.864550    0.214023
    15_8344_8845_4r_mt_z           145.864550    0.214023
    15_8344_8845_4r_mt_z           145.864550    0.214023
    15_8344_8845_4r_mt_z           145.864550    0.214023
    16_8344_8845_4r                121.908506   19.874949
    16_8344_8845_4r                121.908506   19.874949
    16_8344_8845_4r                121.908506   19.874949
    16_8344_8845_4r                121.908506   19.874949
    17_8344_8845_2r_mt_z            38.761214    0.236077
    17_8344_8845_2r_mt_z            38.761214    0.236077
    ...                                   ...         ...
    P20_008845_1894_XN_09N203W_18  195.050373 -391.289238
    P20_008845_1894_XN_09N203W_2   -12.658160  627.742625
    P20_008845_1894_XN_09N203W_2   -12.658160  627.742625
    P20_008845_1894_XN_09N203W_2   -12.658160  627.742625
    P20_008845_1894_XN_09N203W_2   -12.658160  627.742625
    P20_008845_1894_XN_09N203W_3    -4.170818  616.480181
    P20_008845_1894_XN_09N203W_3    -4.170818  616.480181
    P20_008845_1894_XN_09N203W_3    -4.170818  616.480181
    P20_008845_1894_XN_09N203W_3    -4.170818  616.480181
    P20_008845_1894_XN_09N203W_4    33.324946  574.887719
    P20_008845_1894_XN_09N203W_4    33.324946  574.887719
    P20_008845_1894_XN_09N203W_5    33.109007  581.149470
    P20_008845_1894_XN_09N203W_5    33.109007  581.149470
    P20_008845_1894_XN_09N203W_5    33.109007  581.149470
    P20_008845_1894_XN_09N203W_6    59.859663  375.680663
    P20_008845_1894_XN_09N203W_6    59.859663  375.680663
    P20_008845_1894_XN_09N203W_6    59.859663  375.680663
    P20_008845_1894_XN_09N203W_6    59.859663  375.680663
    P20_008845_1894_XN_09N203W_7    61.278242  375.840988
    P20_008845_1894_XN_09N203W_7    61.278242  375.840988
    P20_008845_1894_XN_09N203W_7    61.278242  375.840988
    P20_008845_1894_XN_09N203W_7    61.278242  375.840988
    P20_008845_1894_XN_09N203W_8    71.414267  336.409684
    P20_008845_1894_XN_09N203W_8    71.414267  336.409684
    P20_008845_1894_XN_09N203W_8    71.414267  336.409684
    P20_008845_1894_XN_09N203W_8    71.414267  336.409684
    P20_008845_1894_XN_09N203W_9    22.094037  544.874936
    P20_008845_1894_XN_09N203W_9    22.094037  544.874936
    P20_008845_1894_XN_09N203W_9    22.094037  544.874936
    P20_008845_1894_XN_09N203W_9    22.094037  544.874936
    
    [919 rows x 23 columns]

%% Cell type:code id: tags:

``` python
@singledispatch
def read_ipf(arg):
    return str(arg)

@read_ipf.register(str)
def read_ipf_str(input_data):
    """
    Read a socet ipf file into a pandas data frame

    Parameters
    ----------
    input_data : str
                 path to the an input data file

    Returns
    -------
    df : pd.DataFrame
         containing the ipf data with appropriate column names and indices
    """

    # Check that the number of rows is matching the expected number
    with open(input_data, 'r') as f:
        for i, l in enumerate(f):
            if i == 1:
                cnt = int(l)
            elif i == 2:
                col = l
                break

    columns = np.genfromtxt(input_data, skip_header=2, dtype='unicode',
                            max_rows = 1, delimiter = ',')

    # TODO: Add unicode conversion
    d = [line.split() for line in open(input_data, 'r')]
    d = np.hstack(np.array(d[3:]))

    d = d.reshape(-1, 12)

    df = pd.DataFrame(d, columns=columns)
    file = os.path.split(os.path.splitext(input_data)[0])[1]
    df['ipf_file'] = pd.Series(np.full((len(df['pt_id'])), file), index = df.index)

    assert int(cnt) == len(df), 'Dataframe length {} does not match point length {}.'.format(int(cnt), len(df))

    # Soft conversion of numeric types to numerics, allows str in first col for point_id
    df = df.apply(pd.to_numeric, errors='ignore')

    return df

@read_ipf.register(list)
def read_ipf_list(input_data_list):
    """
    Read a socet ipf file into a pandas data frame

    Parameters
    ----------
    input_data_list : list
                      list of paths to the a set of input data files

    Returns
    -------
    df : pd.DataFrame
         containing the ipf data with appropriate column names and indices
    """
    frames = []

    for input_file in input_data_list:
        frames.append(read_ipf(input_file))

    df = pd.concat(frames)

    return df
```

%% Cell type:code id: tags:

``` python
x = np.array(['1', '2', '3'])
y = np.array(['1', '2', '3'])

print((x == y).all())
```

%% Output

    True

%% Cell type:code id: tags:

``` python
```
+49 −2
Original line number Diff line number Diff line
@@ -85,11 +85,10 @@ def read_ipf_str(input_data):
    columns = np.genfromtxt(input_data, skip_header=2, dtype='unicode',
                            max_rows = 1, delimiter = ',')

    # TODO: Add unicode conversion
    d = [line.split() for line in open(input_data, 'r')]
    d = np.hstack(np.array(d[3:]))

    d = d.reshape(-1, 12)
    d = d.reshape(-1, 12).astype('unicode')

    df = pd.DataFrame(d, columns=columns)
    file = os.path.split(os.path.splitext(input_data)[0])[1]
@@ -126,6 +125,54 @@ def read_ipf_list(input_data_list):

    return df

def save_ipf(df, output_path):
    """
    Write a socet gpf file from a gpf-defined pandas dataframe

    Parameters
    ----------
    df          : pd.DataFrame
                  Pandas DataFrame

    output_file : str
                  path to the output data file

    Returns
    -------
    int         : success value
                  0 = success, 1 = errors
    """

    for ipf_file, ipf_df in df.groupby('ipf_file'):

        output_file = os.path.join(output_path, ipf_file + '.ipf')

        # Check that file can be opened
        try:
            outIPF = open(output_file, 'w', newline='\r\n')
        except:
            print('Unable to open output ipf file: {0}'.format(output_file))
            return 1

        #grab number of rows in pandas dataframe ipf group
        numpts = len(ipf_df)

        #Output ipf header
        outIPF.write('IMAGE POINT FILE\n')
        outIPF.write('{0}\n'.format(numpts))
        outIPF.write('pt_id,val,fid_val,no_obs,l.,s.,sig_l,sig_s,res_l,res_s,fid_x,fid_y\n')

        for index, row in ipf_df.iterrows():
            #Output coordinates to ipf file
            outIPF.write('{0} {1} {2} {3}\n'.format(row['pt_id'], row['val'], row['fid_val'], row['no_obs']))
            outIPF.write('{:0.6f}  {:0.6f}\n'.format(row['l.'], row['s.']))
            outIPF.write('{:0.6f}  {:0.6f}\n'.format(row['sig_l'], row['sig_s']))
            outIPF.write('{:0.6f}  {:0.6f}\n'.format(row['res_l'], row['res_s']))
            outIPF.write('{:0.6f}  {:0.6f}\n\n'.format(row['fid_x'], row['fid_y']))

        outIPF.close()
    return

def read_gpf(input_data):
    """
    Read a socet gpf file into a pandas data frame
+729 −0
Original line number Diff line number Diff line
IMAGE POINT FILE
121
pt_id,val,fid_val,no_obs,l.,s.,sig_l,sig_s,res_l,res_s,fid_x,fid_y
1_8344_8845_4r 1 0 0
-4058.982422  -2318.010742
0.000000  0.000000
-0.062556  -0.214713
0.000000  0.000000

2_8344_8845_4r 1 0 0
-3969.065186  -606.849243
0.000000  0.000000
0.228660  0.105249
0.000000  0.000000

3_8344_8845_4r_mt_z 1 0 0
-1019.739014  -2300.877197
0.000000  0.000000
-0.025129  -0.002447
0.000000  0.000000

4_8344_8845_4r_mt_z 1 0 0
-1037.099121  -548.180237
0.000000  0.000000
-0.000756  0.227752
0.000000  0.000000

5_8344_8845_4r 1 0 0
2438.984131  -2304.843506
0.000000  0.000000
0.062022  -0.109977
0.000000  0.000000

6_8344_8845_4r 1 0 0
2397.826904  -562.432861
0.000000  0.000000
-0.072678  -0.056104
0.000000  0.000000

7_8344_8845_4r_mt_z 1 0 0
-2510.927734  -1267.364868
0.000000  0.000000
0.215250  -0.040427
0.000000  0.000000

8_8344-8845_4r_mt_z 1 0 0
840.825317  -1028.345337
0.000000  0.000000
-0.241922  0.382924
0.000000  0.000000

9_8344_8845_4r 1 0 0
-4070.962158  2465.817139
0.000000  0.000000
-0.140837  0.005980
0.000000  0.000000

10_8344_8845_4r 1 0 0
-4044.697510  1008.950928
0.000000  0.000000
0.063678  0.661294
0.000000  0.000000

11_8344_8845_4r 1 0 0
-761.216064  2303.787109
0.000000  0.000000
-0.247307  -0.587299
0.000000  0.000000

12_8344_8845_4r 1 0 0
-889.364441  966.533997
0.000000  0.000000
-0.251753  0.008170
0.000000  0.000000

13_8344_8845_4r 1 0 0
-2559.871338  1777.522827
0.000000  0.000000
-0.131265  -0.305102
0.000000  0.000000

14_8344_8845_4r 1 0 0
2385.278320  2476.032227
0.000000  0.000000
0.389532  -0.299258
0.000000  0.000000

15_8344_8845_4r_mt_z 1 0 0
2395.869385  1038.165405
0.000000  0.000000
-0.170850  0.372485
0.000000  0.000000

16_8344_8845_4r 1 0 0
756.099792  1785.494751
0.000000  0.000000
0.165338  -0.327408
0.000000  0.000000

17_8344_8845_2r_mt_z 1 0 0
-3138.269531  442.515503
0.000000  0.000000
-0.023370  -0.248643
0.000000  0.000000

18_8344_8845_2r 1 0 0
-1773.864990  354.084259
0.000000  0.000000
-0.002223  -0.000684
0.000000  0.000000

19_8344_8845_2r_mt_z 1 0 0
-92.482826  723.305237
0.000000  0.000000
-0.214498  0.145192
0.000000  0.000000

20_8344_8845_2r_mt_z 1 0 0
1434.079712  742.064026
0.000000  0.000000
-0.058132  -0.171782
0.000000  0.000000

21_8344_8845_4r_xyz 1 0 0
-838.991028  -614.524109
0.000000  0.000000
-0.131313  0.997120
0.000000  0.000000

22_8344_8845_4r_mt_z 1 0 0
-3994.073975  -2160.606445
0.000000  0.000000
0.217774  -0.141372
0.000000  0.000000

23_8344_8845_4r_mt_z 1 0 0
-3851.864990  2088.046875
0.000000  0.000000
-0.078440  -0.221650
0.000000  0.000000

24_8344_8845_4r_mt_z 1 0 0
2343.634033  -2073.817871
0.000000  0.000000
-0.274344  0.067791
0.000000  0.000000

25_8344_8845_4r_mt_z 1 0 0
2350.053711  2168.792236
0.000000  0.000000
-0.311081  -0.152226
0.000000  0.000000

26_8344_8845_4r_mt_z 1 0 0
-1844.550781  -996.016479
0.000000  0.000000
-0.108472  0.122981
0.000000  0.000000

27_8344_8845_2r_mt_z 1 0 0
-1618.005371  700.699158
0.000000  0.000000
-0.020846  0.073456
0.000000  0.000000

28_8344_8845_4r_mt_z 1 0 0
521.921509  -1602.441406
0.000000  0.000000
-0.009861  0.363227
0.000000  0.000000

29_8344_8845_4r_mt_z 1 0 0
820.691284  1469.345459
0.000000  0.000000
-0.664959  -0.066244
0.000000  0.000000

30_8344_8845_3r_mt_z 1 0 0
-326.405365  -283.346985
0.000000  0.000000
-0.206811  0.180573
0.000000  0.000000

61_8344_8845_4r_mt_z 1 0 0
-4067.466064  -2193.302002
0.000000  0.000000
-0.017458  -0.229608
0.000000  0.000000

62_8344_8845_4r_mt_z 1 0 0
2040.637939  2052.019043
0.000000  0.000000
0.187054  -0.199539
0.000000  0.000000

63_8344_8845_4r_mt_z 1 0 0
2267.361328  -1402.644897
0.000000  0.000000
-0.259674  -0.350489
0.000000  0.000000

65_8344_8845_4r_mt_z 1 0 0
-675.820618  1659.593628
0.000000  0.000000
0.285702  -0.673177
0.000000  0.000000

P19_008344_1894_XN_09N203W_3 1 0 1
-3543.180176  -2052.497559
0.099990  0.099990
-0.271723  0.046268
0.000000  0.000000

P19_008344_1894_XN_09N203W_5 1 0 1
-3693.414551  118.131378
0.191225  0.191225
-0.007535  0.000003
0.000000  0.000000

P19_008344_1894_XN_09N203W_8 1 0 1
-3529.115479  1634.993530
0.010654  0.010654
-0.112990  0.190108
0.000000  0.000000

P19_008344_1894_XN_09N203W_9 1 0 1
-1530.085083  -2021.120728
0.025998  0.025998
-0.287801  -0.050820
0.000000  0.000000

P19_008344_1894_XN_09N203W_10 1 0 1
-1163.659546  -2110.948730
0.054246  0.054246
-0.209774  -0.028915
0.000000  0.000000

P19_008344_1894_XN_09N203W_11 1 0 1
-649.603027  -291.606293
0.144968  0.144968
0.179422  0.480350
0.000000  0.000000

P19_008344_1894_XN_09N203W_12 1 0 1
-1879.115479  1650.314575
0.044342  0.044342
0.194544  -0.551285
0.000000  0.000000

P19_008344_1894_XN_09N203W_13 1 0 1
1195.076782  -2043.631714
0.081316  0.081316
-0.184309  0.153021
0.000000  0.000000

P19_008344_1894_XN_09N203W_14 1 0 1
1826.979736  -2180.584961
0.185789  0.185789
0.208304  -0.026378
0.000000  0.000000

P19_008344_1894_XN_09N203W_15 1 0 1
1833.592407  -1740.516968
0.238122  0.238122
0.652892  -0.509659
0.000000  0.000000

P19_008344_1894_XN_09N203W_16 1 0 1
1370.180664  -273.589996
0.113241  0.113241
0.296132  -0.060485
0.000000  0.000000

P19_008344_1894_XN_09N203W_17 1 0 1
1198.482544  -429.786133
0.055307  0.055307
-0.091967  0.108114
0.000000  0.000000

P19_008344_1894_XN_09N203W_18 1 0 1
1516.067993  1830.024048
0.009269  0.009269
-0.002093  -0.264173
0.000000  0.000000

P19_008344_1894_XN_09N203W_19 1 0 1
1338.967651  1679.986084
0.004901  0.004901
-0.030115  -0.306342
0.000000  0.000000

P19_008344_1894_XN_09N203W_20 1 0 1
1350.758423  1952.026978
0.019970  0.019970
-0.011408  -0.409686
0.000000  0.000000

P20_008845_1894_XN_09N203W_1 1 0 0
-3224.000000  -2003.000000
0.000000  0.000000
0.055124  0.018517
0.000000  0.000000

P20_008845_1894_XN_09N203W_2 1 0 0
-3389.000000  -2155.000000
0.000000  0.000000
-0.073150  -0.271173
0.000000  0.000000

P20_008845_1894_XN_09N203W_3 1 0 0
-2913.000000  -2000.000000
0.000000  0.000000
-0.088180  -0.049593
0.000000  0.000000

P20_008845_1894_XN_09N203W_4 1 0 1
-3226.000000  167.000000
0.000000  0.000000
-0.195774  -0.000066
0.000000  0.000000

P20_008845_1894_XN_09N203W_5 1 0 1
-2934.000000  -6.000000
0.000000  0.000000
-0.049005  0.437424
0.000000  0.000000

P20_008845_1894_XN_09N203W_6 1 0 3
-3378.000000  1532.000000
0.000000  0.000000
0.026541  0.063346
0.000000  0.000000

P20_008845_1894_XN_09N203W_7 1 0 3
-3378.000000  1672.000000
0.000000  0.000000
0.055623  0.013456
0.000000  0.000000

P20_008845_1894_XN_09N203W_8 1 0 3
-2793.000000  1837.000000
0.000000  0.000000
-0.117483  -0.229337
0.000000  0.000000

P20_008845_1894_XN_09N203W_9 1 0 0
-780.000000  -1953.000000
0.000000  0.000000
0.298743  -0.045963
0.000000  0.000000

P20_008845_1894_XN_09N203W_10 1 0 2
423.000000  -1995.000000
0.000000  0.000000
0.067585  0.401377
0.000000  0.000000

P20_008845_1894_XN_09N203W_11 1 0 1
-21.000000  196.000000
0.000000  0.000000
0.069550  -0.000458
0.000000  0.000000

P20_008845_1894_XN_09N203W_12 1 0 1
2885.000000  -2124.000000
0.000000  0.000000
0.254136  -0.273798
0.000000  0.000000

P20_008845_1894_XN_09N203W_13 1 0 1
2746.000000  -2253.000000
0.000000  0.000000
-0.407167  -0.176964
0.000000  0.000000

P20_008845_1894_XN_09N203W_14 1 0 0
2728.000000  -1980.000000
0.000000  0.000000
-0.885848  0.137668
0.000000  0.000000

P20_008845_1894_XN_09N203W_15 0 0 0
2942.000000  58.000000
0.000000  0.000000
0.000000  0.000000
0.000000  0.000000

P20_008845_1894_XN_09N203W_16 1 0 2
2865.000000  2024.000000
0.000000  0.000000
-0.053859  0.035981
0.000000  0.000000

P20_008845_1894_XN_09N203W_17 1 0 2
3175.000000  1974.000000
0.000000  0.000000
-0.064058  0.044374
0.000000  0.000000

P20_008845_1894_XN_09N203W_18 1 0 2
2872.000000  1565.000000
0.000000  0.000000
0.256228  0.218860
0.000000  0.000000

P03_002371_1888_XI_08N204W_49 1 0 1
-2629.182861  1085.034424
0.012761  0.012761
0.208403  -0.004282
0.000000  0.000000

P03_002371_1888_XI_08N204W_54 1 0 1
-1095.406738  1127.088013
0.274421  0.274421
0.019106  -0.331897
0.000000  0.000000

P03_002371_1888_XI_08N204W_55 1 0 1
-941.496277  1247.825806
0.055631  0.055631
0.152919  -0.306029
0.000000  0.000000

P03_002371_1888_XI_08N204W_56 1 0 1
-1098.958984  1441.816895
0.114842  0.114842
-0.297223  -0.308728
0.000000  0.000000

P03_002371_1888_XI_08N204W_63 1 0 1
119.944458  1116.177612
0.023727  0.023727
-0.104057  -0.034587
0.000000  0.000000

P03_002371_1888_XI_08N204W_64 1 0 1
-19.255381  1270.651611
0.007022  0.007022
-0.294970  -0.136646
0.000000  0.000000

P03_002371_1888_XI_08N204W_65 1 0 1
-271.636139  1030.269287
0.141314  0.141314
-0.007378  0.127183
0.000000  0.000000

P03_002371_1888_XI_08N204W_71 1 0 1
1793.756836  1419.468140
0.070811  0.070811
0.008127  -0.059651
0.000000  0.000000

P03_002371_1888_XI_08N204W_77 1 0 1
3770.185547  1056.433594
0.051015  0.051015
-0.344149  0.791881
0.000000  0.000000

P01_001540_1889_XI_08N204W_3 1 0 0
-819.994568  -476.940125
0.000000  0.000000
-0.010086  0.238933
0.000000  0.000000

P01_001540_1889_XI_08N204W_4 1 0 0
-1038.745972  -225.617737
0.000000  0.000000
-0.102515  0.293944
0.000000  0.000000

P01_001540_1889_XI_08N204W_5 1 0 0
-1043.086548  -229.290588
0.000000  0.000000
-0.103618  0.222174
0.000000  0.000000

P01_001540_1889_XI_08N204W_6 1 0 0
-1016.667114  -212.669418
0.000000  0.000000
0.098336  0.182504
0.000000  0.000000

P01_001540_1889_XI_08N204W_7 1 0 0
-1089.852539  -179.613083
0.000000  0.000000
-0.099015  0.247487
0.000000  0.000000

P01_001540_1889_XI_08N204W_43 1 0 1
231.430023  1286.035034
0.179721  0.179721
0.043216  0.007602
0.000000  0.000000

P01_001540_1889_XI_08N204W_44 1 0 1
53.370300  1130.200195
0.035373  0.035373
-0.239021  0.051970
0.000000  0.000000

P01_001606_1897_XI_09N203W_20 1 0 1
-3490.634277  -1071.889893
0.074986  0.074986
-0.109513  0.027899
0.000000  0.000000

P01_001606_1897_XI_09N203W_21 1 0 1
-3489.029297  -1344.598267
0.117221  0.117221
0.119840  -0.073966
0.000000  0.000000

P01_001606_1897_XI_09N203W_26 1 0 1
-2843.921875  -1365.052490
0.066368  0.066368
0.053526  -0.129321
0.000000  0.000000

P01_001606_1897_XI_09N203W_27 1 0 1
-2872.278076  -1055.845581
0.044944  0.044944
0.014887  -0.175307
0.000000  0.000000

P01_001606_1897_XI_09N203W_32 1 0 1
-702.726318  -1309.760742
0.097152  0.097152
-0.121270  0.083388
0.000000  0.000000

P01_001606_1897_XI_09N203W_33 1 0 1
-425.879700  -1332.264404
0.141272  0.141272
0.278120  0.018378
0.000000  0.000000

P01_001606_1897_XI_09N203W_39 1 0 1
957.507324  -1314.205933
0.214219  0.214219
-0.088346  0.135983
0.000000  0.000000

P01_001606_1897_XI_09N203W_40 1 0 1
1286.863525  -1325.946045
0.022701  0.022701
0.025672  -0.015907
0.000000  0.000000

P01_001606_1897_XI_09N203W_41 1 0 1
1415.343628  -1585.812134
0.062944  0.062944
0.178247  0.100219
0.000000  0.000000

P01_001606_1897_XI_09N203W_42 1 0 1
-713.122681  -1899.271973
0.109711  0.109711
-0.247557  0.240463
0.000000  0.000000

P01_001606_1897_XI_09N203W_48 1 0 1
2357.769287  -1605.211670
0.142259  0.142259
-0.046652  -0.341859
0.000000  0.000000

P01_001606_1897_XI_09N203W_49 1 0 1
2368.677490  -1310.253662
0.084816  0.084816
0.168448  -0.178884
0.000000  0.000000

P01_001606_1897_XI_09N203W_50 1 0 1
2938.904541  -1286.650635
0.268181  0.268181
0.222150  -0.289282
0.000000  0.000000

P03_002226_1895_XI_09N203W_41 1 0 1
-2964.822021  -752.729980
0.130511  0.130511
0.199895  0.181932
0.000000  0.000000

P03_002226_1895_XI_09N203W_42 1 0 1
-2676.941162  -549.997925
0.015523  0.015523
-0.189075  0.282047
0.000000  0.000000

P03_002226_1895_XI_09N203W_43 1 0 1
-2503.684570  -1243.333618
0.091619  0.091619
-0.183131  -0.034143
0.000000  0.000000

P03_002226_1895_XI_09N203W_46 1 0 1
-984.080139  -1301.115845
0.028430  0.028430
-0.103870  -0.014166
0.000000  0.000000

P03_002226_1895_XI_09N203W_47 1 0 1
-1119.626953  -926.132080
0.195907  0.195907
-0.217611  0.087415
0.000000  0.000000

P03_002226_1895_XI_09N203W_53 1 0 1
3304.798340  -528.821411
0.090225  0.090225
-0.127036  -0.243320
0.000000  0.000000

P03_002226_1895_XI_09N203W_54 1 0 1
3597.587646  -608.987488
0.187463  0.187463
0.132150  -0.402642
0.000000  0.000000

P03_002226_1895_XI_09N203W_55 1 0 1
3277.619873  -1106.364136
0.141123  0.141123
-0.258301  -0.487463
0.000000  0.000000

P03_002226_1895_XI_09N203W_64 1 0 1
-1488.927979  306.370270
0.141123  0.141123
0.113540  0.000408
0.000000  0.000000

P03_002226_1895_XI_09N203W_67 1 0 1
-1501.843384  294.863434
0.141123  0.141123
-0.038216  -0.001066
0.000000  0.000000

P03_002226_1895_XI_09N203W_68 1 0 1
-1487.291992  301.690338
0.141123  0.141123
-0.161360  0.000601
0.000000  0.000000

P03_002226_1895_XI_09N203W_71 1 0 1
-1476.824463  421.302856
0.141123  0.141123
0.045458  0.000436
0.000000  0.000000

P03_002226_1895_XI_09N203W_66 1 0 1
-1473.926636  445.164948
0.141123  0.141123
-0.039173  -0.000061
0.000000  0.000000

P03_002226_1895_XI_09N203W_72 1 0 1
-1478.191040  398.059052
0.141123  0.141123
0.039510  -0.000569
0.000000  0.000000

P03_002226_1895_XI_09N203W_74 1 0 1
-1463.276489  270.004364
0.141123  0.141123
0.097608  0.000572
0.000000  0.000000

P03_002226_1895_XI_09N203W_76 1 0 1
-1399.385376  210.815338
0.141123  0.141123
-0.021339  -0.000335
0.000000  0.000000

P03_002226_1895_XI_09N203W_82 1 0 1
-1110.612061  -112.804382
0.141123  0.141123
-0.179249  0.431591
0.000000  0.000000

P19_008344_1894_XN_09N203W_2 1 0 1
-3987.065674  -1756.185791
0.141123  0.141123
0.018394  -0.141215
0.000000  0.000000

P19_008344_1894_XN_09N203W_7 1 0 1
-3991.173340  1967.117554
0.141123  0.141123
0.242488  -0.046890
0.000000  0.000000

P03_002371_1888_XI_08N204W_76 1 0 1
4066.573730  1038.447998
0.141123  0.141123
-0.272976  0.967351
0.000000  0.000000

P03_002371_1888_XI_08N204W_78 1 0 1
4083.873291  1277.689209
0.141123  0.141123
-0.328486  0.836286
0.000000  0.000000

P01_001606_1897_XI_09N203W_19 1 0 1
-3917.203125  -1175.195679
0.141123  0.141123
-0.022263  -0.151156
0.000000  0.000000

P01_001606_1897_XI_09N203W_65 1 0 1
4070.485840  -2315.992188
0.141123  0.141123
-0.121370  -0.479070
0.000000  0.000000

P03_002226_1895_XI_09N203W_1 1 0 0
-1197.647949  -569.925598
0.000000  0.000000
-0.070627  0.194853
0.000000  0.000000

P03_002226_1895_XI_09N203W_2 1 0 0
-1241.685791  -499.006836
0.000000  0.000000
-0.066482  0.270447
0.000000  0.000000
+35 −4

File changed.

Preview size limit exceeded, changes collapsed.