dhasterok / LaserMapExplorer

An intuitive interface application designed to process and visualize large volumes of geochemical data.
5 stars 0 forks source link

Switching to log scale doesn't update plot #53

Closed dhasterok closed 2 months ago

dhasterok commented 3 months ago

I was switched from log to linear scale after playing with the negative handling. After doing so, the maps would not update and selecting from the tree stopped working.

dhasterok commented 2 months ago

Switching to log scale causes many errors, the first few below are repeated many many times:

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/core/generic.py", line 2171, in __array_ufunc__ return arraylike.array_ufunc(self, ufunc, method, *inputs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/core/arraylike.py", line 398, in array_ufunc inputs = tuple(extract_array(x, extract_numpy=True) for x in inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/core/arraylike.py", line 398, in inputs = tuple(extract_array(x, extract_numpy=True) for x in inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pandas/core/construction.py", line 473, in extract_array elif extract_numpy and typ == "npy_extension": ^^^^^^^^^^^^^^^^^^^^^^ RecursionError: maximum recursion depth exceeded in comparison

dhasterok commented 2 months ago

I fixed this issue by changing where to np.where in about 6 places associated with taking the log of the data in various forms. However, this has introduced an issue with plotting as the log of the data is done twice when plotting a log-scale and the scale is not updated for log when it is chosen from the comboBoxNorm widget.