Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EBVCubeVisualizerPlugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
no67wuwu
EBVCubeVisualizerPlugin
Commits
9036217b
"git@gitlab.idiv.de:ye87zine/symobio-modeling.git" did not exist on "60a58262fc8179f340e82642471dcd7d934e4446"
Commit
9036217b
authored
2 years ago
by
Emmanuel Heriberto Oceguera Conchas
Browse files
Options
Downloads
Patches
Plain Diff
updated
parent
60a01b32
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
netCDF_visualizer_funtionality.py
+1
-27
1 addition, 27 deletions
netCDF_visualizer_funtionality.py
with
1 addition
and
27 deletions
netCDF_visualizer_funtionality.py
+
1
−
27
View file @
9036217b
...
...
@@ -78,7 +78,6 @@ class maskAndFuntionality (BASE, WIDGET):
self
.
btn_remove
.
clicked
.
connect
(
self
.
removePath
)
self
.
btn_load
.
clicked
.
connect
(
self
.
loadNetCDF
)
self
.
btn_remove_sel
.
clicked
.
connect
(
self
.
removeSelection
)
self
.
btn_plot
.
clicked
.
connect
(
self
.
plotEbvCube
)
#here we set the clicked signal for the tree widget
self
.
tree_data
.
itemClicked
.
connect
(
self
.
showInfo
)
...
...
@@ -169,27 +168,12 @@ class maskAndFuntionality (BASE, WIDGET):
child3
=
QTreeWidgetItem
([
ncFileVariablesName2
[
k
],
longNameVariables2
])
child2
.
addChild
(
child3
)
#we get the attributes of the variables of the groups of the groups and show them in the QTextBrowser if the variable is clicked
if
child3
.
isSelected
():
ncFileVariablesName2Attributes
=
list
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
[
ncFileGroupsName2
[
j
]].
variables
[
ncFileVariablesName2
[
k
]].
ncattrs
())
for
l
in
range
(
len
(
ncFileVariablesName2Attributes
)):
ncFileVariablesName2AttributesValue
=
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
[
ncFileGroupsName2
[
j
]].
variables
[
ncFileVariablesName2
[
k
]].
getncattr
(
ncFileVariablesName2Attributes
[
l
])
self
.
text_info
.
append
(
ncFileVariablesName2Attributes
[
l
]
+
"
:
"
+
str
(
ncFileVariablesName2AttributesValue
))
#get the entyties of the variables of the groups of the groups an set the lon name of the entyties into the QComboBox if the variable is a cube and click on the variable
if
child3
.
isSelected
()
and
len
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
[
ncFileGroupsName2
[
j
]].
variables
[
ncFileVariablesName2
[
k
]].
dimensions
)
==
3
:
ncFileVariablesName2Entities
=
list
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
[
ncFileGroupsName2
[
j
]].
variables
[
ncFileVariablesName2
[
k
]].
dimensions
)
for
m
in
range
(
len
(
ncFileVariablesName2Entities
)):
ncFileVariablesName2EntitiesValue
=
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
[
ncFileGroupsName2
[
j
]].
variables
[
ncFileVariablesName2
[
k
]].
getncattr
(
ncFileVariablesName2Entities
[
m
])
self
.
combo_entity
.
addItem
(
ncFileVariablesName2Entities
[
m
])
self
.
combo_entity
.
setItemText
(
m
,
ncFileVariablesName2EntitiesValue
)
#we get the variables of the groups
ncFileGroupsVariablesName
=
list
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
variables
.
keys
())
#we show the variables of the groups in the QTreeWidgetite and set the long name of the variables
if the group is clicked
#we show the variables of the groups in the QTreeWidgetite and set the long name of the variables
for
j
in
range
(
len
(
ncFileGroupsVariablesName
)):
longNameVariables
=
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
variables
[
ncFileGroupsVariablesName
[
j
]].
long_name
child4
=
QTreeWidgetItem
([
ncFileGroupsVariablesName
[
j
],
longNameVariables
])
...
...
@@ -199,16 +183,6 @@ class maskAndFuntionality (BASE, WIDGET):
#expand all the data
self
.
tree_data
.
expandAll
()
"""
here we are gonna show all information into the GUI
"""
#get the attributes and the name of the file and show them in the QTextBrowser
ncFileAttributes
=
list
(
ncFile
.
ncattrs
())
for
i
in
range
(
len
(
ncFileAttributes
)):
ncFileAttributesValue
=
ncFile
.
getncattr
(
ncFileAttributes
[
i
])
self
.
text_info
.
append
(
ncFileName
)
#we show the name of the file
self
.
text_info
.
append
(
ncFileAttributes
[
i
]
+
"
:
"
+
str
(
ncFileAttributesValue
))
#we show the attributes of the file
#we close the netCDF file
ncFile
.
close
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment