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
65d974c8
Commit
65d974c8
authored
2 years ago
by
Emmanuel Oceguera Conchas
Browse files
Options
Downloads
Patches
Plain Diff
the time and the antitites have been adding
parent
0e971ef7
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
+21
-13
21 additions, 13 deletions
netCDF_visualizer_funtionality.py
with
21 additions
and
13 deletions
netCDF_visualizer_funtionality.py
+
21
−
13
View file @
65d974c8
...
@@ -47,6 +47,7 @@ except ImportError:
...
@@ -47,6 +47,7 @@ except ImportError:
pipmain
([
'
install
'
,
'
netCDF4
'
])
pipmain
([
'
install
'
,
'
netCDF4
'
])
import
netCDF4
as
nc
import
netCDF4
as
nc
from
netCDF4
import
Dataset
from
netCDF4
import
Dataset
#we need the matplotlib module to plot the data
#we need the matplotlib module to plot the data
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
...
@@ -105,23 +106,24 @@ class maskAndFuntionality (BASE, WIDGET):
...
@@ -105,23 +106,24 @@ class maskAndFuntionality (BASE, WIDGET):
self
.
tree_data
.
clear
()
self
.
tree_data
.
clear
()
#we remove the information from the QtextBrowser
#we remove the information from the QtextBrowser
self
.
text_info
.
clear
()
self
.
text_info
.
clear
()
#we remove the info from QCombobos
self
.
cbox_entity
.
clear
()
self
.
cbox_time
.
clear
()
def
removeSelection
(
self
):
def
removeSelection
(
self
):
"""
this function remove the selection in the tree widget
"""
"""
this function remove the selection in the tree widget
"""
item
=
sel
f
.
tree_data
.
selectedItems
()
#if the top level
item
is
sel
ected we remove the Item and the children as well text_info, cbox_entity and cbox_time
if
item
[
0
]
.
parent
()
==
None
:
if
self
.
tree_data
.
currentItem
()
.
parent
()
==
None
:
self
.
tree_data
.
clear
(
)
self
.
tree_data
.
takeTopLevelItem
(
self
.
tree_data
.
indexOfTopLevelItem
(
self
.
tree_data
.
currentItem
())
)
self
.
text_info
.
clear
()
self
.
text_info
.
clear
()
self
.
cbox_entity
.
clear
()
self
.
cbox_entity
.
clear
()
self
.
cbox_time
.
clear
()
self
.
cbox_time
.
clear
()
#if the child item is selected we don't remove anything
elif
self
.
tree_data
.
currentItem
()
==
None
:
pass
else
:
else
:
pass
pass
# #we remmove the selectec TopLevelItems from the tree widget
# for item in self.tree_data.selectedItems():
# self.tree_data.takeTopLevelItem(self.tree_data.indexOfTopLevelItem(item))
# else:
# self.text_info.clear()
...
@@ -251,13 +253,19 @@ class maskAndFuntionality (BASE, WIDGET):
...
@@ -251,13 +253,19 @@ class maskAndFuntionality (BASE, WIDGET):
self
.
cbox_time
.
clear
()
self
.
cbox_time
.
clear
()
self
.
cbox_time
.
addItems
([
str
(
i
)
for
i
in
time
])
self
.
cbox_time
.
addItems
([
str
(
i
)
for
i
in
time
])
#we get the entities
self
.
cbox_entity
.
clear
()
#we get the entities of the netCDF file
#we get the entities of the netCDF file
entities
=
ncFile
.
variables
[
'
entity
'
]
entities
=
ncFile
.
variables
[
'
entity
'
]
##we get the entities od the netCDF file
#we get the name of the entities
entities
=
[
entities
[
i
].
decode
(
'
UTF-8
'
,
'
strict
'
)
for
i
in
range
(
len
(
entities
))]
entityScope
=
entities
.
ebv_entity_scope
.
split
(
'
,
'
)
#we get the number of entities of the netCDF file
numberOfEntities
=
len
(
entities
)
#we set the entity_scope and the number of the entity into the QComboBox
#self.cbox_entity.addItems([entityScope[i] + " " + str(i) for i in range(numberOfEntities)])
#we set the entities into the QComboBox
#we set the entities into the QComboBox
self
.
cbox_entity
.
clear
()
self
.
cbox_entity
.
addItems
(
entityScope
)
self
.
cbox_entity
.
addItems
(
entities
)
#we close the netCDF file
#we close the netCDF file
ncFile
.
close
()
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