@@ -187,41 +185,35 @@ class maskAndFuntionality (BASE, WIDGET):
ncFile.close()
defshowInfo(self):
"""this function is to show the attributes of the groups if the group is clicked and the groups of the groups if the group of the group is clicked and the attributes of the variables if the variable is clicked"""
#we get the item that is clicked
item=self.tree_data.currentItem()
#we get the name of the item that is clicked
itemName=item.text(0)
#we get the name of the file
fileName=self.text_file.text()
#we open the netCDF file
ncFile=Dataset(fileName,"r",format="NETCDF4")
#we get the name of the file without the extension
ncFileName=os.path.splitext(fileName)[0]
#we set first the name of the file in the QTextBrowser
self.text_info.append('File name: '+ncFileName)
"""this function shows first the name of the file and the global attributes and then if a varible is clicked delete the info and add the attributes of the selected variable"""
#we get the path from the text space
path=self.text_set.text()
#we load the netCDF file
ncFile=nc.Dataset(path,'r',format='NETCDF4')
#we get the name of the netCDF file to show it in the GUI
ncFileName=os.path.basename(path)
#We get the title of the netCDF file
ncFileTitle=ncFile.title
#we get the global attributes of the netCDF file
ncFileGlobalAttributes=list(ncFile.ncattrs())
#we get the attributes of the groups if the group is clicked