titusjan / argos Goto Github PK
View Code? Open in Web Editor NEWArgos: a data viewer that can read HDF5, NetCDF4, and other file formats.
License: GNU General Public License v3.0
Argos: a data viewer that can read HDF5, NetCDF4, and other file formats.
License: GNU General Public License v3.0
I was getting this warning message when I try to plot a line for a 1-D vector or 2-D matrix:
2021-10-04 10:10:03.459 : basereg.py:216 : WARNING : Unable to import 'argos.inspector.pgplugins.lineplot1d.PgLinePlot1d': name 'QtCore' is not defined
2021-10-04 10:10:03.459 : mainwindow.py:615 : WARNING : Unable to create 'lineplot' inspector because Class not successfully imported: name 'QtCore' is not defined
2021-10-04 10:10:03.459 : mainwindow.py:637 : WARNING : Unable to create 'lineplot' inspector because Class not successfully imported: name 'QtCore' is not defined
Even though the message was warning, line plotting functionality was not working.
This error disappeared and I was able to plot lines after modifying the file "argos/inspector/pgplugins/pghistlutitem.py" by adding the following line at the top:
from pyqtgraph.Qt import QtCore
Could anybody apply this simple bug fix and push the new version to conda-forge
?
Thank you very much for this nice tool! I've been looking for a good alternative to hdfview
for a very long time.
p.s. By the way, importing QtCore
from argos.qt
failed with the error message module 'PyQt5.QtCore' has no attribute 'Signal'
.
p.p.s The conda environment I tested was created as follows:
$ conda create -p argos_test argos pyqt h5py -c conda-forge
And the following is the output of $ conda list
:
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
alsa-lib 1.2.3 h516909a_0 conda-forge
argos 0.3.1 pyhd8ed1ab_0 conda-forge
c-ares 1.17.2 h7f98852_0 conda-forge
ca-certificates 2021.5.30 ha878542_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
cmlib 1.1.1 pyhd8ed1ab_0 conda-forge
dbus 1.13.6 h48d8840_2 conda-forge
expat 2.4.1 h9c3ff4c_0 conda-forge
fontconfig 2.13.1 hba837de_1005 conda-forge
freetype 2.10.4 h0708190_1 conda-forge
gettext 0.19.8.1 h73d1719_1008 conda-forge
glib 2.68.4 h9c3ff4c_1 conda-forge
glib-tools 2.68.4 h9c3ff4c_1 conda-forge
gst-plugins-base 1.18.5 hf529b03_0 conda-forge
gstreamer 1.18.5 h76c114f_0 conda-forge
h5py 3.4.0 nompi_py39h7e08c79_101 conda-forge
hdf5 1.12.1 nompi_h2750804_100 conda-forge
icu 68.1 h58526e2_0 conda-forge
jpeg 9d h36c2ea0_0 conda-forge
krb5 1.19.2 hcc1bbae_2 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
libblas 3.9.0 11_linux64_openblas conda-forge
libcblas 3.9.0 11_linux64_openblas conda-forge
libclang 11.1.0 default_ha53f305_1 conda-forge
libcurl 7.79.1 h2574ce0_1 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libevent 2.1.10 hcdb4288_3 conda-forge
libffi 3.4.2 h9c3ff4c_4 conda-forge
libgcc-ng 11.2.0 h1d223b6_9 conda-forge
libgfortran-ng 11.2.0 h69a702a_9 conda-forge
libgfortran5 11.2.0 h5c6108e_9 conda-forge
libglib 2.68.4 h174f98d_1 conda-forge
libgomp 11.2.0 h1d223b6_9 conda-forge
libiconv 1.16 h516909a_0 conda-forge
liblapack 3.9.0 11_linux64_openblas conda-forge
libllvm11 11.1.0 hf817b99_2 conda-forge
libnghttp2 1.43.0 h812cca2_1 conda-forge
libogg 1.3.4 h7f98852_1 conda-forge
libopenblas 0.3.17 pthreads_h8fe5266_1 conda-forge
libopus 1.3.1 h7f98852_1 conda-forge
libpng 1.6.37 h21135ba_2 conda-forge
libpq 13.3 hd57d9b9_0 conda-forge
libssh2 1.10.0 ha56f1ee_2 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_9 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libvorbis 1.3.7 h9c3ff4c_0 conda-forge
libxcb 1.13 h7f98852_1003 conda-forge
libxkbcommon 1.0.3 he3ba5ed_0 conda-forge
libxml2 2.9.12 h72842e0_0 conda-forge
libzlib 1.2.11 h36c2ea0_1013 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
mysql-common 8.0.25 ha770c72_2 conda-forge
mysql-libs 8.0.25 hfa10184_2 conda-forge
ncurses 6.2 h58526e2_4 conda-forge
nspr 4.30 h9c3ff4c_0 conda-forge
nss 3.69 hb5efdd6_1 conda-forge
numpy 1.21.2 py39hdbf815f_0 conda-forge
openssl 1.1.1l h7f98852_0 conda-forge
pcre 8.45 h9c3ff4c_0 conda-forge
pgcolorbar 1.1.1 pyhd8ed1ab_0 conda-forge
pip 21.2.4 pyhd8ed1ab_0 conda-forge
pthread-stubs 0.4 h36c2ea0_1001 conda-forge
pyqt 5.12.3 py39hf3d152e_7 conda-forge
pyqt-impl 5.12.3 py39h0fcd23e_7 conda-forge
pyqt5-sip 4.19.18 py39he80948d_7 conda-forge
pyqtchart 5.12 py39h0fcd23e_7 conda-forge
pyqtgraph 0.12.2 pyhd8ed1ab_0 conda-forge
pyqtwebengine 5.12.1 py39h0fcd23e_7 conda-forge
python 3.9.7 hb7a2778_3_cpython conda-forge
python_abi 3.9 2_cp39 conda-forge
qt 5.12.9 hda022c4_4 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
setuptools 58.0.4 py39hf3d152e_2 conda-forge
sqlite 3.36.0 h9cd32fc_2 conda-forge
tk 8.6.11 h27826a3_1 conda-forge
tzdata 2021b he74cb21_0 conda-forge
wheel 0.37.0 pyhd8ed1ab_1 conda-forge
xorg-libxau 1.0.9 h7f98852_0 conda-forge
xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zlib 1.2.11 h36c2ea0_1013 conda-forge
zstd 1.5.0 ha95c52a_0 conda-forge
fn.makeARGB()
requires a levels argument why is not given. No backward compatibility.
In case of floats, if no levels argument is provided, the 'min,max' values should be determined automatically from the image.
In my case and image with integer values transitions to floats and raises the exception upon redrawing it.
Exception: levels argument is required for float input types
Traceback (most recent call last):
File "C:\XXX\lib\site-packages\pyqtgraph\graphicsItems\ImageItem.py", line 834, in paint
self.render()
File "C:\XXX\lib\site-packages\pyqtgraph\graphicsItems\ImageItem.py", line 561, in render
fn.makeARGB(image, lut=lut, levels=levels, output=self._processingBuffer)
File "C:\XXX\lib\site-packages\pyqtgraph\functions.py", line 1401, in makeARGB
raise Exception('levels argument is required for float input types')
PyQtGraph version: 0.12.1 (works)
PyQtGraph version: 0.12.2 (fails)
Qt Python binding: PyQt5
When using the PySide2 binding the following error occurs when you close a spin box editor in the Config Tree (i.e. when you have filled in a value and select a new config item to edit).
Traceback (most recent call last):
File "/Users/kenter/prog/py/argos/argos/config/configtreeview.py", line 102, in closeEditor
configItemDelegate.finalizeEditor(editor)
File "/Users/kenter/prog/py/argos/argos/config/configitemdelegate.py", line 69, in finalizeEditor
editor.finalize()
File "/Users/kenter/prog/py/argos/argos/config/intcti.py", line 126, in finalize
super(IntCtiEditor, self).finalize()
File "/Users/kenter/prog/py/argos/argos/config/abstractcti.py", line 573, in finalize
self.resetButton.clicked.disconnect(self.resetEditorValue)
RuntimeError: Failed to disconnect signal clicked().
When you close a combobox editor the following error occurs.
Traceback (most recent call last):
File "/Users/kenter/prog/py/argos/argos/config/configtreeview.py", line 102, in closeEditor
configItemDelegate.finalizeEditor(editor)
File "/Users/kenter/prog/py/argos/argos/config/configitemdelegate.py", line 69, in finalizeEditor
editor.finalize()
File "/Users/kenter/prog/py/argos/argos/config/choicecti.py", line 226, in finalize
self._comboboxListView.removeEventFilter(self)
RuntimeError: Internal C++ object (PySide2.QtWidgets.QAbstractItemView) already deleted.
Might be related to #12
Hi,
Your tool looks amazing! Unfortunately it seems not to like my HDF5 files, created with pandas
.
Maybe you could implement that, too.
Best regards!
Execute this in Python to create the HDF5 file:
import pandas as pd
import numpy as np
with pd.HDFStore('NOT_IMPLEMENTED.h5') as store:
df = pd.DataFrame(np.random.rand(4, 4),
columns=['A', 'B', 'C', 'D'],
index=pd.date_range("20180101 00:00", periods=4))
store.put('Test', df, format='table', data_columns=True)
Then open it in argos (argos NOT_IMPLEMENTED.h5
) and open the group "Test" in the treeview.
Bug: uncaught OSError
Unable to read attribute (no appropriate function for conversion path)
Traceback (most recent call last):
File "/anaconda3/lib/python3.7/site-packages/argos/qt/treemodels.py", line 91, in data
return self.itemData(item, index.column(), role=role)
File "/anaconda3/lib/python3.7/site-packages/argos/repo/repotreemodel.py", line 113, in itemData
return super(RepoTreeModel, self).itemData(treeItem, column, role=role)
File "/anaconda3/lib/python3.7/site-packages/argos/qt/treemodels.py", line 117, in itemData
return item.decoration
File "/anaconda3/lib/python3.7/site-packages/argos/repo/baserti.py", line 274, in decoration
return rtiIconFactory.getIcon(self.iconGlyph, isOpen=not self.canFetchChildren(),
File "/anaconda3/lib/python3.7/site-packages/argos/repo/rtiplugins/hdf5.py", line 359, in iconGlyph
if self._h5Dataset.attrs.get('CLASS', None) == b'DIMENSION_SCALE':
File "/anaconda3/lib/python3.7/_collections_abc.py", line 660, in get
return self[key]
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/anaconda3/lib/python3.7/site-packages/h5py/_hl/attrs.py", line 81, in __getitem__
attr.read(arr, mtype=htype)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5a.pyx", line 355, in h5py.h5a.AttrID.read
File "h5py/_proxy.pyx", line 36, in h5py._proxy.attr_rw
OSError: Unable to read attribute (no appropriate function for conversion path)
Currently there are these zoom/pan modes, that I can figure out:
It would be really nice to be able to use a few more of the pan and zoom modes available in PyQtGraph, specifically:
The first two of these are already available in PyQtGraph, the first one just needs to be turned on - I'm not sure why the second is not working. The third option probably needs new functionlity in PyQtGraph, but I though I'd post this here first and check.
This is some really nice software. I've been looking for something like this for ages :)
Both
When cross hair plots are enabled in the Image Plot inspector, and the user hovers above plot, and the selected item is a NetCDF scalar set to the fill value, the application exits with the following error:
Traceback (most recent call last):
File "C:\Users\kenter\Documents\src\argos\argos\inspector\pgplugins\imageplot2d.py", line 587, in mouseMoved
rowData = replaceMaskedValueWithFloat(rowData, np.isinf(rowData),
File "C:\Users\kenter\Documents\src\argos\argos\utils\masks.py", line 252, in replaceMaskedValueWithFloat
return replaceMaskedValue(data, mask, replacementValue, copyOnReplace=copyOnReplace)
File "C:\Users\kenter\Documents\src\argos\argos\utils\masks.py", line 231, in replaceMaskedValue
result[mask] = replacementValue
ValueError: assignment destination is read-only
This can be reproduced with the scalars.nc/masked_scalar
item that can be generated by create_test_data.py
I tried installing Argos on Windows using Conda thusly:
conda create -n ARGOS python=3 numpy scipy netcdf4 h5py pandas pillow
activate ARGOS
pip install pyqt5
pip install pyqtgraph
pip install argos
but running
python -m argos.main
returns
from PyQt5 import QtCore, QtGui, QtWidgets, QtSvg
ImportError: DLL load failed: The specified module could not be found.
@ocefpaf tells me this is a known problem with the defaults channel at Continuum.
Version info:
I get the following dialog on a particular HDF5 test file generated with h5py (attached).
The error in question happens when activating 2D Image Plot view on node mode_low_gain/example_sequence/rts/<RESULTS>/map
.
The zipped HDF5 file is here:
I've got a file which displays under the table view fine, however when opening the image plot I get an error:
2022-07-26 13:56:37.178 : abstract.py:230 : ERROR : Error while drawing the inspector: Text reading control character must be a single unicode character or None; but got: ', ' ----
2022-07-26 13:56:37.178 : abstract.py:231 : ERROR : Text reading control character must be a single unicode character or None; but got: ', '
Traceback (most recent call last):
File "/home/foo/.local/lib/python3.9/site-packages/argos/inspector/abstract.py", line 201, in updateContents
self._drawContents(reason=reason, initiator=initiator)
File "/home/foo/.local/lib/python3.9/site-packages/argos/inspector/pgplugins/imageplot2d.py", line 557, in _drawContents
self.config.updateTarget()
File "/home/foo/.local/lib/python3.9/site-packages/argos/config/abstractcti.py", line 288, in updateTarget
child.updateTarget(level = level + 1)
File "/home/foo/.local/lib/python3.9/site-packages/argos/config/abstractcti.py", line 288, in updateTarget
child.updateTarget(level = level + 1)
File "/home/foo/.local/lib/python3.9/site-packages/argos/config/abstractcti.py", line 286, in updateTarget
self._updateTargetFromNode()
File "/home/foo/.local/lib/python3.9/site-packages/argos/inspector/pgplugins/pgctis.py", line 972, in _updateTargetFromNode
lut = self.data.rgb_uint8_array
File "/home/foo/.local/lib/python3.9/site-packages/cmlib/cmap.py", line 346, in rgb_uint8_array
self.load_rgba_uint8_array()
File "/home/foo/.local/lib/python3.9/site-packages/cmlib/cmap.py", line 366, in load_rgba_uint8_array
rgb_ints = self._read_rgb_uint8_file(file_name)
File "/home/foo/.local/lib/python3.9/site-packages/cmlib/cmap.py", line 328, in _read_rgb_uint8_file
rgb_floats = load_rgb_floats(file_name)
File "/home/foo/.local/lib/python3.9/site-packages/cmlib/misc.py", line 87, in load_rgb_floats
array = np.loadtxt(source_file, delimiter=delimiter, dtype=dtype, **kwargs)
File "/home/foo/.local/lib/python3.9/site-packages/numpy/lib/npyio.py", line 1308, in loadtxt
arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
File "/home/foo/.local/lib/python3.9/site-packages/numpy/lib/npyio.py", line 979, in _read
arr = _load_from_filelike(
TypeError: Text reading control character must be a single unicode character or None; but got: ', '
2022-07-26 13:56:37.192 : misc.py:114 : CRITICAL: Bug: uncaught TypeError
Add environment.yml for conda users
Sometimes it is nice to be able to view multiple variables at once.
It can be useful to compare multiple variables in the same way (e.g. small multiples), e.g. two or more timeseries of different variables, with linked zoom frames ("facetting"), or two or more panels of 2D image plots.
It can also be useful to plot one variable against another (e.g. scatter plot).
Would it take much to get such options into Argos?
Hello,
I was just introduced to your product which I find very helpful for viewing the structure of the HDF5. However, I have many experiments and store them in different groups for organization, for instance:
file['exp1/x']
file['exp2/x']
file['exp3/x']
It would be really nice to be able to plot file['exp3/x'] versus file['exp2/x'] for instance.
I recognize that this is a new software but if this gets added I would be a happy camper.
Thanks!
Salvatore Ferrone
Often I want to quickly export a dataset while browsing a h5 file. I could do this via the table view and select all and copy/paste, but it is a bit cumbersome and for (large) images it is even more difficult.
The way I do it now is open a jupyter notebook and copy the Path from argos and open/save the data with h5py.
It would be great if there was a Export to... option in the right-click menu when clicking a dataset.
When using the PySide2 binding the following errror occurs when you close a/the main window.
Traceback (most recent call last):
File "/Users/kenter/prog/py/argos/argos/widgets/mainwindow.py", line 826, in closeEvent
self.finalize()
File "/Users/kenter/prog/py/argos/argos/widgets/mainwindow.py", line 127, in finalize
self.collector.sigContentsChanged.disconnect(self.collectorContentsChanged)
RuntimeError: Failed to disconnect signal sigContentsChanged(QString).
My suspicion is that it occurs because the disconnect is called in the closeEvent
. More investigation is needed.
Hi!
This looks very awesome! I just tried installing argos, and seemingly succeeded, but running argos
just didn't show anything. I went deeper and found that apparently your main function fails due to some PyQt5 problem, but afaict I followed your instructions, and have no idea how to fix it.
Console output (Windows 10 64bit, and Anaconda)
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. Alle Rechte vorbehalten.
Z:\>conda create -n tryargos python numpy
Fetching package metadata .........
Solving package specifications: ..........
Package plan for installation in environment C:\Continuum\Anaconda3\envs\tryargos:
The following NEW packages will be INSTALLED:
mkl: 2017.0.1-0
numpy: 1.11.3-py36_0
pip: 9.0.1-py36_1
python: 3.6.0-0
setuptools: 27.2.0-py36_1
vs2015_runtime: 14.0.25123-0
wheel: 0.29.0-py36_0
Proceed ([y]/n)?
Linking packages ...
[ COMPLETE ]|##################################################| 100%
#
# To activate this environment, use:
# > activate tryargos
#
# To deactivate this environment, use:
# > deactivate tryargos
#
# * for power-users using bash, you must source
#
Z:\>activate tryargos
(tryargos) Z:\>pip install PyQt5 pyqtgraph argos
Collecting PyQt5
Using cached PyQt5-5.7.1-5.7.1-cp34.cp35.cp36-none-win_amd64.whl
Collecting pyqtgraph
Collecting argos
Collecting sip>=4.19 (from PyQt5)
Using cached sip-4.19-cp36-none-win_amd64.whl
Requirement already satisfied: numpy in c:\continuum\anaconda3\envs\tryargos\lib\site-packages (from pyqtgraph)
Installing collected packages: sip, PyQt5, pyqtgraph, argos
Successfully installed PyQt5-5.7.1 argos-0.2.1 pyqtgraph-0.10.0 sip-4.19
(tryargos) Z:\>argos -h
(tryargos) Z:\>argos
(tryargos) Z:\>python -m argos.main
Traceback (most recent call last):
File "C:\Continuum\Anaconda3\envs\tryargos\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Continuum\Anaconda3\envs\tryargos\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Continuum\Anaconda3\envs\tryargos\lib\site-packages\argos\main.py", line 200, in <module>
main()
File "C:\Continuum\Anaconda3\envs\tryargos\lib\site-packages\argos\main.py", line 186, in main
from argos.qt.misc import ABOUT_QT_BINDINGS
File "C:\Continuum\Anaconda3\envs\tryargos\lib\site-packages\argos\qt\__init__.py", line 23, in <module>
from argos.qt.misc import Qt, QtCore, QtGui, QtWidgets, QtSvg, QtSignal, QtSlot
File "C:\Continuum\Anaconda3\envs\tryargos\lib\site-packages\argos\qt\misc.py", line 83, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets, QtSvg
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
(tryargos) Z:\>
(The german bit says "the specified module could not be found")
Any ideas what's wrong here? Also, I would have expected that argos does not silently swallow the encountered exception, and would at least log something I can see to even know that something went wrong.
It's quite common in netcdf files to have variables that are one or two dimensions, but are indexed over three or four dimensions. When plotting these variables, it often happens that Argos just selects the first dimension to plot over, which may only have one value, and so no plot is produced. You then need to manually select the mapping to each axis.
e.g. I have a single-site met file, that has rainfall indexed by (x, y, time), but it only has information in the time dimension.
It would be good if Argos aotomatically detected non-informative dimensions, and preferentially selected other dimensions by default for plotting. This would make the workflow slightly faster and less annoying for users, and would be significantly less confusing for new users (it took me a while to work out why it wasn't plotting...).
I am trying to install argos in order to examine some hdf5 files I am trying to make.
I am using a cloned version of 0.2.1 and have using my linux (openSuse) package manager to get all the dependencies.
I am running Python 3.4.5
The problem seems to be with h5py 2.6.0
I am able to open an hdf5 file and then when I go to examine tree (in the left panel), it crashes with the follow message: (sorry, it is longer but better to be complete)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/abuild/rpmbuild/BUILD/h5py-2.6.0/h5py/_objects.c:2841)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/abuild/rpmbuild/BUILD/h5py-2.6.0/h5py/_objects.c:2799)
File "/usr/lib64/python3.4/site-packages/h5py/_hl/attrs.py", line 79, in getitem
attr.read(arr, mtype=htype)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/home/abuild/rpmbuild/BUILD/h5py-2.6.0/h5py/_objects.c:2841)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/home/abuild/rpmbuild/BUILD/h5py-2.6.0/h5py/_objects.c:2799)
File "h5py/h5a.pyx", line 355, in h5py.h5a.AttrID.read (/home/abuild/rpmbuild/BUILD/h5py-2.6.0/h5py/h5a.c:5349)
File "h5py/_proxy.pyx", line 36, in h5py._proxy.attr_rw (/home/abuild/rpmbuild/BUILD/h5py-2.6.0/h5py/_proxy.c:1142)
OSError: Unable to read attribute (No appropriate function for conversion path)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.