Skip to content

Commit

Permalink
Remove debugging information
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Apr 10, 2024
1 parent ae95ee8 commit a11f5ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
15 changes: 2 additions & 13 deletions PyMca5/PyMcaGui/io/hdf5/HDF5Widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,7 @@ def children(self):
if self.__sorting or not self._children:
# obtaining the lock here is necessary, otherwise application can
# freeze if navigating tree while data is processing
if 0 and not isinstance(self.file, h5py.File):
items = list(self.raw_items())
tmpList = list(self.raw_values())
finalList = tmpList
for i in range(len(finalList)):
finalList[i]._posixPath = posixpath.join(self.name,
items[i][0])
self._children = [H5NodeProxy(self.file, i, self)
for i in finalList]
else: #with self.file.plock:
if 1: #with self.file.plock:
if 1:
try:
# this returns (str, str) in case of dealing with a broken link
Expand Down Expand Up @@ -676,7 +667,6 @@ def phynxFileInstanceDistroyed(weakrefObject):
ddict = {}
ddict['event'] = "fileAppended"
ddict['filename'] = filename
print("filename = ", filename)
self.sigFileAppended.emit(ddict)
return phynxFile

Expand Down Expand Up @@ -890,8 +880,8 @@ def emitSignal(self, event, modelIndex):
ddict['event'] = event
ddict['file'] = item.file.filename
# awful patch to support tiled sources where silx removes "tiled:" from the name
print("TODO: Issue with silx removing tiled: from the file name")
if ddict['file'].startswith("http"):
print("TODO: Issue with silx removing tiled: from the file name")
ddict['file'] = "tiled:" + ddict['file']
ddict['name'] = item.name
ddict['type'] = item.type
Expand Down Expand Up @@ -1142,7 +1132,6 @@ def getGroupNameDialog(filename=None, message=None, parent=None):
app = qt.QApplication(sys.argv)
fileModel = FileModel()
fileView = HDF5Widget(fileModel)
print("sys.argv[1]", sys.argv[1])
phynxFile = fileModel.openFile(sys.argv[1])
def mySlot(ddict):
print(ddict)
Expand Down
6 changes: 4 additions & 2 deletions PyMca5/PyMcaGui/io/hdf5/QNexusWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,8 +1032,8 @@ def buttonsSlot(self, ddict, emit=True):
continue
mcaIdx = 0
if filename not in self.data.sourceName:
print("TODO silx tiled handling")
if ("tiled:" + filename) in self.data.sourceName:
print("TODO silx tiled handling")
filename = "tiled:" + filename

for yMca in mcaSelection['selectionindex']:
Expand Down Expand Up @@ -1083,9 +1083,11 @@ def buttonsSlot(self, ddict, emit=True):
sel['selection']['sourcename'] = filename
#deal with the case the "entry" is a dataset hunging at root level
if isinstance(phynxFile[entry], h5py.Dataset):
_logger.info("HDF5 dataset at root level)
entry = "/"
elif hasattr(phynxFile[entry], "shape"):
# HDF5-like dataset at top level
_logger.info("HDF5-like dataset at root level)
entry = "/"
sel['selection']['entry'] = entry
sel['selection']['key'] = "%d.%d" % (fileIndex+1, entryIndex+1)
Expand All @@ -1106,7 +1108,7 @@ def buttonsSlot(self, ddict, emit=True):
else:
actualDatasetPath = posixpath.join(entry,
cntSelection['cntlist'][yCnt])
print("actualDatasetPath = ", actualDatasetPath)
_logger.info("actualDatasetPath = %s" % actualDatasetPath)
try:
actualDataset = phynxFile[actualDatasetPath]
except KeyError:
Expand Down

0 comments on commit a11f5ba

Please sign in to comment.