When reading the .log files, there is a bug when getting the metrics from ModEM inversion results. When the rms values are higher than 10, I get back the following error in the plot_rms_iterations.read(logfile) function
File "mtpy\mtpy\utils\plot_rms_iterations.py", line 77, in read
metric, value = word.split('=')
ValueError: not enough values to unpack (expected 2, got 1)
Possible Solution
A possible solution is to account for a broader possibilities of rms values by changing line 72 in plot_rms_iterations.py from,
value_lines = [l.strip().replace(' ', '').split() for l in value_lines]
to
value_lines = [
line.strip().replace(' ', '').replace(' ', '').replace(
'= ', '=').split()
for line in value_lines
]
Steps to Reproduce (for bugs)
Here is a file (Modular_NLCG.log) that has a series of rms values higher than 10. Download the file and create a python script to run the following code,
Hello,
When reading the
.log
files, there is a bug when getting the metrics from ModEM inversion results. When therms
values are higher than 10, I get back the following error in theplot_rms_iterations.read(logfile)
functionPossible Solution
A possible solution is to account for a broader possibilities of
rms
values by changing line 72 inplot_rms_iterations.py
from,to
Steps to Reproduce (for bugs)
Here is a file (Modular_NLCG.log) that has a series of
rms
values higher than 10. Download the file and create a python script to run the following code,This should reproduce the error I got.
Your Environment