A3. Loading AP Sensing files

This example loads AP sensing files. Only single-ended files are currently supported. Just like with Silixa’s devices, the AP Sensing data is in .xml files

[1]:
import os
import glob

from dtscalibration import read_apsensing_files

The example data files are located in ./python-dts-calibration/tests/data.

[2]:
filepath = os.path.join("..", "..", "tests", "data", "ap_sensing")
print(filepath)
../../tests/data/ap_sensing
[3]:
filepathlist = sorted(glob.glob(os.path.join(filepath, "*.xml")))
filenamelist = [os.path.basename(path) for path in filepathlist]

for fn in filenamelist:
    print(fn)
_AP Sensing_N4386B_3_20180118201727.xml
_AP Sensing_N4386B_3_20180118202957.xml
_AP Sensing_N4386B_3_20180118205357.xml

We will simply load in the .xml files

[4]:
ds = read_apsensing_files(directory=filepath)
3 files were found, each representing a single timestep
4 recorded vars were found: LAF, TEMP, ST, AST
Recorded at 7101 points along the cable
The measurement is single ended
Reading the data from disk

The object tries to gather as much metadata from the measurement files as possible (temporal and spatial coordinates, filenames, temperature probes measurements). All other configuration settings are loaded from the first files and stored as attributes of the xarray.Dataset.

Calibration follows as usual (see the other notebooks).

[5]:
print(ds)
<xarray.Dataset> Size: 569kB
Dimensions:       (x: 7101, time: 3)
Coordinates:
  * x             (x) float64 57kB 0.0 0.5 1.0 ... 3.549e+03 3.55e+03 3.55e+03
    filename      (time) <U39 468B '_AP Sensing_N4386B_3_20180118201727.xml' ...
  * time          (time) datetime64[ns] 24B 2018-01-18T20:17:27 ... 2018-01-1...
Data variables:
    tmp           (x, time) float64 170kB 12.16 11.32 12.26 ... 15.08 17.83
    st            (x, time) float64 170kB 1.098 1.105 ... 3.39e-18 3.409e-18
    ast           (x, time) float64 170kB 0.1888 0.1891 ... 4.838e-19 4.945e-19
    creationDate  (time) datetime64[ns] 24B 2018-01-18T20:17:27 ... 2018-01-1...
Attributes: (12/51)
    wellbore:uid:                                                            ...
    wellbore:name:                                                           ...
    wellbore:dtsInstalledSystemSet:dtsInstalledSystem:uid:                   ...
    wellbore:dtsInstalledSystemSet:dtsInstalledSystem:name:                  ...
    wellbore:dtsInstalledSystemSet:dtsInstalledSystem:fiberInformation:fiber:...
    wellbore:dtsInstalledSystemSet:dtsInstalledSystem:fiberInformation:fiber:...
    ...                                                                             ...
    wellbore:wellLogSet:wellLog:blockInfo:blockCurveInfo_2:columnIndex:      ...
    wellbore:wellLogSet:wellLog:blockInfo:blockCurveInfo_3:curveId:          ...
    wellbore:wellLogSet:wellLog:blockInfo:blockCurveInfo_3:columnIndex:      ...
    isDoubleEnded:                                                           ...
    forwardMeasurementChannel:                                               ...
    backwardMeasurementChannel:                                              ...