Run 1 |████████████████████| 100% [0:00:01 / 0:00:00] - Misfit: 0.0529
Run 2 |████████████████████| 100% [0:00:01 / 0:00:00] - Misfit: 0.0528f
[?25hTraceback (most recent call last):
File "/tmp/ipykernel_131271/491983976.py", line 1, in <module>
res = model.invert(curves, maxrun=2,split_results=False)
File "/home/wgajek/.local/lib/python3.9/site-packages/evodcinv/_model.py", line 304, in invert
out += result
File "/home/wgajek/.local/lib/python3.9/site-packages/evodcinv/_result.py", line 88, in __add__
raise TypeError()
TypeError
BUG 2
What's more, prior to setting maxrun>1 running, i.e. using:
res = model.invert(curves, split_results=False)
with default maxrun, the code worked. Then I tried maxrun=2 (bug 1 reported above) and returned to maxrun=1. However, the code didn't work anymore, raising this error:
Run 1 |████████████████████| 100% [0:00:01 / 0:00:00] - Misfit: 0.0529
[?25hTraceback (most recent call last):
File "/tmp/ipykernel_131271/824901905.py", line 1, in <module>
res = model.invert(curves, split_results=False)
File "/home/wgajek/.local/lib/python3.9/site-packages/evodcinv/_model.py", line 304, in invert
out += result
File "/home/wgajek/.local/lib/python3.9/site-packages/evodcinv/_result.py", line 88, in __add__
raise TypeError()
TypeError
I tried redefining the model (model = EarthModel() etc as in tutorial) but it did not solve the problem. Restarting the kernel (I'm using spyder) solved the issue (till trying maxrun>1 again).
Still, it seems solving bug 1 will also solve bug 2
Side bug:
when trying to plot the results afterwards by using res.plot_model('rho',show='all') (for 1 run) the colors of all the lines are same so I am not able to reproduce plots from the readme. Not sure if it is another problem or you need more than 1 run for it (I guess 1 run is enough to plot density of solutions correctly). The figure is plotted then, but all lines are yellow and following error message is given:
/home/wgajek/anaconda3/lib/python3.9/site-packages/matplotlib/colors.py:1254: RuntimeWarning: invalid value encountered in true_divide
resdat /= (vmax - vmin)
/home/wgajek/anaconda3/lib/python3.9/site-packages/matplotlib/colors.py:1254: RuntimeWarning: invalid value encountered in true_divide
resdat /= (vmax - vmin)
/home/wgajek/anaconda3/lib/python3.9/site-packages/matplotlib/colors.py:1254: RuntimeWarning: invalid value encountered in true_divide
resdat /= (vmax - vmin)
/home/wgajek/anaconda3/lib/python3.9/site-packages/matplotlib/colors.py:1254: RuntimeWarning: invalid value encountered in true_divide
resdat /= (vmax - vmin)
/home/wgajek/anaconda3/lib/python3.9/site-packages/matplotlib/colors.py:1254: RuntimeWarning: invalid value encountered in true_divide
resdat /= (vmax - vmin)
That's a cool code! Thanks for posting. I found it very useful but also found some bugs.
BUG 1. When running model.invert for maxrun>1 with split_results=False (default value) TypeError is raised.
my example:
Full error message
BUG 2 What's more, prior to setting maxrun>1 running, i.e. using: res = model.invert(curves, split_results=False) with default maxrun, the code worked. Then I tried maxrun=2 (bug 1 reported above) and returned to maxrun=1. However, the code didn't work anymore, raising this error:
I tried redefining the model (model = EarthModel() etc as in tutorial) but it did not solve the problem. Restarting the kernel (I'm using spyder) solved the issue (till trying maxrun>1 again). Still, it seems solving bug 1 will also solve bug 2
System information
Side bug: when trying to plot the results afterwards by using res.plot_model('rho',show='all') (for 1 run) the colors of all the lines are same so I am not able to reproduce plots from the readme. Not sure if it is another problem or you need more than 1 run for it (I guess 1 run is enough to plot density of solutions correctly). The figure is plotted then, but all lines are yellow and following error message is given: