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
0467a7e8
Commit
0467a7e8
authored
2 years ago
by
Emmanuel Heriberto Oceguera Conchas
Browse files
Options
Downloads
Patches
Plain Diff
we add the child
parent
006d70a5
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
+46
-9
46 additions, 9 deletions
netCDF_visualizer_funtionality.py
with
46 additions
and
9 deletions
netCDF_visualizer_funtionality.py
+
46
−
9
View file @
0467a7e8
...
@@ -109,9 +109,9 @@ class maskAndFuntionality (BASE, WIDGET):
...
@@ -109,9 +109,9 @@ class maskAndFuntionality (BASE, WIDGET):
def
removeSelection
(
self
):
def
removeSelection
(
self
):
"""
this function remove the selection in the tree widget
"""
"""
this function remove the selection in the tree widget
"""
#remove the select
ion in
the tree widget
#
we
rem
m
ove the select
ec TopLevelItems from
the tree widget
self
.
tree_data
.
clearSelection
()
for
item
in
self
.
tree_data
.
selectedItems
():
self
.
tree_data
.
takeTopLevelItem
(
self
.
tree_data
.
indexOfTopLevelItem
(
item
))
def
loadNetCDF
(
self
):
def
loadNetCDF
(
self
):
...
@@ -134,27 +134,64 @@ class maskAndFuntionality (BASE, WIDGET):
...
@@ -134,27 +134,64 @@ class maskAndFuntionality (BASE, WIDGET):
ncFileVariablesName
=
list
(
ncFile
.
variables
.
keys
())
ncFileVariablesName
=
list
(
ncFile
.
variables
.
keys
())
#we get the groups of the file
#we get the groups of the file
ncFileGroupsName
=
list
(
ncFile
.
groups
.
keys
())
ncFileGroupsName
=
list
(
ncFile
.
groups
.
keys
())
#we set the top of the tree that it is the name od the file
#we set the top of the tree that it is the name od the file
self
.
tree_data
.
addTopLevelItem
(
top_level
)
self
.
tree_data
.
addTopLevelItem
(
top_level
)
"""
we sho
e
the variables of the file in the QTreeWidgetite
"""
"""
we sho
w
the variables of the file in the QTreeWidgetite
"""
for
i
in
range
(
len
(
ncFileVariablesName
)):
for
i
in
range
(
len
(
ncFileVariablesName
)):
child
=
QTreeWidgetItem
([
ncFileVariablesName
[
i
]])
child
=
QTreeWidgetItem
([
ncFileVariablesName
[
i
]])
top_level
.
addChild
(
child
)
top_level
.
addChild
(
child
)
#we show the groups of the file in the QTreeWidgetite
for
i
in
range
(
len
(
ncFileGroupsName
)):
for
i
in
range
(
len
(
ncFileGroupsName
)):
child
=
QTreeWidgetItem
([
ncFileGroupsName
[
i
]])
child
=
QTreeWidgetItem
([
ncFileGroupsName
[
i
]])
top_level
.
addChild
(
child
)
top_level
.
addChild
(
child
)
#we get the groups of the groups
ncFileGroupsName2
=
list
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
.
keys
())
#we show the groups of the groups in the QTreeWidgetite
for
j
in
range
(
len
(
ncFileGroupsName2
)):
child2
=
QTreeWidgetItem
([
ncFileGroupsName2
[
j
]])
child
.
addChild
(
child2
)
#we get the variables of the groups of the groups
ncFileVariablesName2
=
list
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
groups
[
ncFileGroupsName2
[
j
]].
variables
.
keys
())
#we show the variables of the groups of the groups in the QTreeWidgetite
for
k
in
range
(
len
(
ncFileVariablesName2
)):
child3
=
QTreeWidgetItem
([
ncFileVariablesName2
[
k
]])
child2
.
addChild
(
child3
)
#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
for
j
in
range
(
len
(
ncFileGroupsVariablesName
)):
child2
=
QTreeWidgetItem
([
ncFileGroupsVariablesName
[
j
],
ncFileGroupsVariablesLongName
[
j
]])
child
.
addChild
(
child2
)
#we get the long name of the variables
ncFileGroupsVariablesLongName
=
list
(
ncFile
.
groups
[
ncFileGroupsName
[
i
]].
variables
[
ncFileGroupsVariablesName
[
j
]].
long_name
)
#we show the long name of the variables in the QTreeWidgetite
for
j
in
range
(
len
(
ncFileGroupsVariablesLongName
)):
child2
=
QTreeWidgetItem
([
ncFileGroupsVariablesLongName
[
j
]])
child
.
addChild
(
child2
)
# #we set the dimensions in the ListWidget
# #we set the dimensions in the ListWidget
# self.column_data.addItems(ncFileDimensions)
# self.column_data.addItems(ncFileDimensions)
# #we set the variables in the ListWidget
# #we set the variables in the ListWidget
# self.column_data.addItems(ncFileVariables)
# self.column_data.addItems(ncFileVariables)
#we close the netCDF file
#we close the netCDF file
ncFile
.
close
()
ncFile
.
close
()
#remove the path from the text space
self
.
text_set
.
clear
()
def
plotNetCDF
(
self
):
"""
This function plots the netCDF file
"""
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