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:
- data
pandas.DataFrame
DataFrame with at least a, b, m, n and r.
- electrodes
pandas.DataFrame
DataFrame with electrode positions.
- filenamestr
String of the output filename.
- data
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.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
Return the index of the file
- check_format(filename)[source]¶
Check if a given file is actually a tsert file with correct version number
- 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
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 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
- 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.