reda.exporters package

Exporters to different modeling and inversion codes

Submodules

reda.exporters.bert module

Exporter for BERT and pyGimli to unified data format. See:

https://gitlab.com/resistivity-net/bert#the-unified-data-format

reda.exporters.bert.export_bert(data, electrodes, filename)[source]

Export to unified data format used in pyGIMLi & BERT.

Multiple timesteps are exported to multiple filenames.

Parameters:
datapandas.DataFrame

DataFrame with at least a, b, m, n and r.

electrodespandas.DataFrame

DataFrame with electrode positions.

filenamestr

String of the output filename.

reda.exporters.crtomo module

Write CRMod/CRTomo (Kemna, 2000) compatible files

reda.exporters.crtomo.save_block_to_crt(filename, group, norrec='all', store_errors=False)[source]

Save a dataset to a CRTomo-compatible .crt file

Parameters:
filenamestring

Output filename

grouppandas.group

Data group

norrecstring

Which data to export Possible values: all|norrec|nor|rec

store_errorsbool

If true, store errors of the data in a separate column

reda.exporters.crtomo.write_files_to_directory(df, directory, **kwargs)[source]

Write sEIT data ta files. Data of each frequency is written in a separate file that conforms to the CRMod/CRTomo standard, and can directly be used for inversions using CRTomo.

Parameters:
dfpandas.DataFrame

Data

directorystring

Output directory. Will be created if not existant

Other Parameters:
store_errors: bool, optional

store the device generated errors in the output files (as additional columns). Default: False

norrec: string, optional

all|nor|rec which normal-reciprocal data set to use. Default: all

reda.exporters.syscal module

Exporter functions for IRIS Instruments Syscal Pro

reda.exporters.syscal.syscal_save_to_config_txt(filename, configs, spacing=1)[source]

Write configurations to a Syscal ascii file that can be read by the Electre Pro program.

Parameters:
filename: string

output filename

configs: numpy.ndarray

Nx4 array with measurement configurations A-B-M-N

reda.exporters.tsert_export module

class reda.exporters.tsert_export.tsert_base(filename)[source]

Bases: object

Functionality related to the tsert file format used for both import and export

Methods

check_format(filename)

Check if a given file is actually a tsert file with correct version number

get_index()

Return the index of the file

check_format(filename)[source]

Check if a given file is actually a tsert file with correct version number

get_index()[source]

Return the index of the file

version = 0.1
class reda.exporters.tsert_export.tsert_export(filename)[source]

Bases: tsert_base

The TSERT file format – export functions

TSERT: Time-series electrical resistivity tomography

Methods

add_data(data, version, **kwargs)

Add data to the tsert file.

check_format(filename)

Check if a given file is actually a tsert file with correct version number

get_empty_index()

Initialize an empty index

get_index()

Return the index of the file

set_electrode_positions(electrode_positions)

Write electrode positions into the file.

set_topography(topography)

Write topography into the file.

test_add_metadata()

Test function that investigates how metadata can be added to the hdf file

add_file_information

add_metadata

write_index

add_data(data, version, **kwargs)[source]

Add data to the tsert file.

Parameters:
datapandas.DataFrame
add_file_information()[source]
add_metadata(metadata)[source]
get_empty_index()[source]

Initialize an empty index

set_electrode_positions(electrode_positions)[source]

Write electrode positions into the file. Existing positions will be deleted.

Parameters:
electrode_positionspandas.DataFrame

Electrode positions, columns x,y,z required. Do nothing if None.

set_topography(topography)[source]

Write topography into the file. Existing positions will be deleted.

Parameters:
topographypandas.DataFrame|None

Topography positions, columns x,y,z required. Do nothing if None.

test_add_metadata()[source]

Test function that investigates how metadata can be added to the hdf file

write_index(data_index)[source]