-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathpreprocess_dataset.py
More file actions
46 lines (41 loc) · 1.94 KB
/
preprocess_dataset.py
File metadata and controls
46 lines (41 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""
Preprocess resistance (Delta V/I [ohm], linear scale)
and resistivity ([ohm*m], log10 scale).
"""
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
FILEDIR = os.path.dirname(__file__)
if __name__ == '__main__':
from erinn.preprocessing import make_processed_dataset
# setting
config_file = os.path.join(FILEDIR, '..', '..', 'config', 'for_preprocess.yml')
# Under "dataset_dir" defined in config_file,
# the script will create a specific folder tree and
# save the following data as pickle files within the corresponding folder.
# resistance:
# add_noise => V/I with noise in linear scale.
# shape = (number of resistance,)
# log_transform => V/I in special log scale.
# shape = (number of resistance,)
# to_midpoint => V/I in linear scale.
# shape = (accumulated number of same midpoint,
# number of midpoint)
# or shape = (accumulated number of same midpoint,
# number of midpoint, 1)
# to_txrx => V/I in linear scale.
# shape = (number of Tx pair, number of Rx pair)
# or shape = (number of Tx pair, number of Rx pair, 1)
# resistivity:
# to_section => resistivity in log10 scale.
# shape = (
# number of cell center mesh in the z (y) direction,
# number of cell center mesh in the x direction
# )
# or shape = (
# number of cell center mesh in the z (y) direction,
# number of cell center mesh in the x direction,
# 1
# )
# In addition, a simulator object containing information
# about physical simulation will be saved.
make_processed_dataset(config_file)