Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GEPARD
GEPARD
Commits
ad95af53
Commit
ad95af53
authored
Oct 10, 2019
by
Josef Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hotfix in legacyConvert, ComfortUpdates
parent
a10389ae
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
5 deletions
+34
-5
__main__.py
__main__.py
+1
-0
analysis/analysisplots.py
analysis/analysisplots.py
+4
-0
analysis/analysisview.py
analysis/analysisview.py
+7
-4
analysis/analysiswidgets.py
analysis/analysiswidgets.py
+19
-0
analysis/particleClassification/shapeClassification.py
analysis/particleClassification/shapeClassification.py
+1
-1
legacyConvert.py
legacyConvert.py
+1
-0
sampleview.py
sampleview.py
+1
-0
No files found.
__main__.py
View file @
ad95af53
...
@@ -209,6 +209,7 @@ class GEPARDMainWindow(QtWidgets.QMainWindow):
...
@@ -209,6 +209,7 @@ class GEPARDMainWindow(QtWidgets.QMainWindow):
self
.
fullOverlayAct
=
QtWidgets
.
QAction
(
"&Full Overlay"
,
self
)
self
.
fullOverlayAct
=
QtWidgets
.
QAction
(
"&Full Overlay"
,
self
)
self
.
transpAct
=
QtWidgets
.
QAction
(
"&Transparent Overlay"
,
self
)
self
.
transpAct
=
QtWidgets
.
QAction
(
"&Transparent Overlay"
,
self
)
self
.
hideLabelAct
=
QtWidgets
.
QAction
(
'&Hide Spectra Numbers'
,
self
)
self
.
hideLabelAct
=
QtWidgets
.
QAction
(
'&Hide Spectra Numbers'
,
self
)
self
.
hideLabelAct
.
setShortcut
(
"H"
)
self
.
darkenAct
=
QtWidgets
.
QAction
(
"&Darken Image"
,
self
)
self
.
darkenAct
=
QtWidgets
.
QAction
(
"&Darken Image"
,
self
)
self
.
seedAct
=
QtWidgets
.
QAction
(
"&Set Color Seed"
,
self
)
self
.
seedAct
=
QtWidgets
.
QAction
(
"&Set Color Seed"
,
self
)
...
...
analysis/analysisplots.py
View file @
ad95af53
...
@@ -275,4 +275,8 @@ class SpectraPlot(QtWidgets.QGroupBox):
...
@@ -275,4 +275,8 @@ class SpectraPlot(QtWidgets.QGroupBox):
self
.
reference_axis
.
tick_params
(
'y'
,
colors
=
'r'
)
self
.
reference_axis
.
tick_params
(
'y'
,
colors
=
'r'
)
self
.
reference_axis
.
set_xbound
(
100
,
(
3400
if
self
.
spectra
[
-
1
,
0
]
>
3400
else
self
.
spectra
[
-
1
,
0
]))
self
.
reference_axis
.
set_xbound
(
100
,
(
3400
if
self
.
spectra
[
-
1
,
0
]
>
3400
else
self
.
spectra
[
-
1
,
0
]))
self
.
canvas
.
draw
()
def
clearReferenceSpectrum
(
self
):
self
.
reference_axis
.
clear
()
self
.
canvas
.
draw
()
self
.
canvas
.
draw
()
\ No newline at end of file
analysis/analysisview.py
View file @
ad95af53
...
@@ -358,10 +358,13 @@ class ParticleAnalysis(QtWidgets.QMainWindow):
...
@@ -358,10 +358,13 @@ class ParticleAnalysis(QtWidgets.QMainWindow):
assignment
=
self
.
particleContainer
.
getParticleAssignmentByIndex
(
self
.
currentParticleIndex
)
assignment
=
self
.
particleContainer
.
getParticleAssignmentByIndex
(
self
.
currentParticleIndex
)
self
.
specPlot
.
updateParticleSpectrum
(
self
.
currentSpectrumIndex
,
assignment
,
hqi
)
self
.
specPlot
.
updateParticleSpectrum
(
self
.
currentSpectrumIndex
,
assignment
,
hqi
)
if
self
.
refSelector
.
isEnabled
()
and
self
.
refSelector
.
currentText
()
!=
''
:
if
self
.
refSelector
.
isEnabled
():
refID
=
self
.
dbWin
.
activeDatabase
.
spectraNames
.
index
(
self
.
refSelector
.
currentText
())
if
self
.
refSelector
.
currentText
()
!=
''
:
ref
=
self
.
dbWin
.
activeDatabase
.
spectra
[
refID
]
refID
=
self
.
dbWin
.
activeDatabase
.
spectraNames
.
index
(
self
.
refSelector
.
currentText
())
self
.
specPlot
.
updateReferenceSpectrum
(
ref
[:,
0
],
ref
[:,
1
])
ref
=
self
.
dbWin
.
activeDatabase
.
spectra
[
refID
]
self
.
specPlot
.
updateReferenceSpectrum
(
ref
[:,
0
],
ref
[:,
1
])
else
:
self
.
specPlot
.
clearReferenceSpectrum
()
def
updateContourColors
(
self
):
def
updateContourColors
(
self
):
"""
"""
...
...
analysis/analysiswidgets.py
View file @
ad95af53
...
@@ -111,6 +111,8 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
...
@@ -111,6 +111,8 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
self
.
particleContainer
=
particleContainer
self
.
particleContainer
=
particleContainer
self
.
currentSpectrumIndex
=
None
self
.
currentSpectrumIndex
=
None
self
.
currentParticleIndex
=
None
self
.
currentParticleIndex
=
None
self
.
lastSpecIndex
=
None
self
.
lastParticleIndex
=
None
self
.
createWidgets
()
self
.
createWidgets
()
...
@@ -167,6 +169,9 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
...
@@ -167,6 +169,9 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
"""
"""
uniquePolymers
=
self
.
particleContainer
.
getUniquePolymers
()
uniquePolymers
=
self
.
particleContainer
.
getUniquePolymers
()
if
len
(
uniquePolymers
)
>
0
:
if
len
(
uniquePolymers
)
>
0
:
self
.
lastSpecIndex
=
self
.
currentSpectrumIndex
self
.
lastParticleIndex
=
self
.
currentParticleIndex
self
.
setDisabled
(
False
)
self
.
setDisabled
(
False
)
self
.
typeSelectorCombo
.
currentIndexChanged
.
disconnect
()
self
.
typeSelectorCombo
.
currentIndexChanged
.
disconnect
()
self
.
typeSelectorCombo
.
clear
()
self
.
typeSelectorCombo
.
clear
()
...
@@ -227,6 +232,10 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
...
@@ -227,6 +232,10 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
def
setParticleSelector
(
self
):
def
setParticleSelector
(
self
):
assignment
=
self
.
typeSelectorCombo
.
currentText
()
assignment
=
self
.
typeSelectorCombo
.
currentText
()
if
assignment
!=
''
:
if
assignment
!=
''
:
# if self.lastParticleIndex is not None:
# self.currentParticleIndex = self.lastParticleIndex
# self.lastParticleIndex = None
# else:
partIndices
=
self
.
particleContainer
.
getIndicesOfParticleType
(
assignment
)
partIndices
=
self
.
particleContainer
.
getIndicesOfParticleType
(
assignment
)
self
.
currentParticleIndex
=
partIndices
[
self
.
particleSelector
.
value
()
-
1
]
self
.
currentParticleIndex
=
partIndices
[
self
.
particleSelector
.
value
()
-
1
]
...
@@ -237,12 +246,22 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
...
@@ -237,12 +246,22 @@ class PolymerNavigationToolbar(QtWidgets.QGroupBox):
self
.
setSpecSelector
()
self
.
setSpecSelector
()
def
setSpecSelector
(
self
):
def
setSpecSelector
(
self
):
# if self.lastSpecIndex is not None:
# self.currentSpectrumIndex = self.lastSpecIndex
# self.lastSpecIndex = None
# else:
specIndices
=
self
.
particleContainer
.
getSpectraIndicesOfParticle
(
self
.
currentParticleIndex
)
specIndices
=
self
.
particleContainer
.
getSpectraIndicesOfParticle
(
self
.
currentParticleIndex
)
self
.
currentSpectrumIndex
=
specIndices
[
self
.
spectrumSelector
.
value
()
-
1
]
self
.
currentSpectrumIndex
=
specIndices
[
self
.
spectrumSelector
.
value
()
-
1
]
self
.
specNumberSelector
.
setValue
(
self
.
currentSpectrumIndex
+
1
)
self
.
specNumberSelector
.
setValue
(
self
.
currentSpectrumIndex
+
1
)
self
.
WidgetsUpdated
.
emit
()
self
.
WidgetsUpdated
.
emit
()
self
.
JumpToIndicatedSpec
.
emit
()
self
.
JumpToIndicatedSpec
.
emit
()
if
self
.
lastSpecIndex
is
not
None
:
self
.
currentParticleIndex
=
self
.
particleContainer
.
getParticleIndexContainingSpecIndex
(
self
.
lastSpecIndex
)
self
.
lastSpecIndex
=
None
self
.
setWidgetsToNewParticleIndex
(
self
.
currentParticleIndex
)
class
FindColoredParticleWindow
(
QtWidgets
.
QWidget
):
class
FindColoredParticleWindow
(
QtWidgets
.
QWidget
):
...
...
analysis/particleClassification/shapeClassification.py
View file @
ad95af53
...
@@ -144,6 +144,6 @@ class Fibre(BaseShape):
...
@@ -144,6 +144,6 @@ class Fibre(BaseShape):
def
__init__
(
self
):
def
__init__
(
self
):
super
(
Fibre
,
self
).
__init__
()
super
(
Fibre
,
self
).
__init__
()
self
.
name
=
'fibre'
self
.
name
=
'fibre'
self
.
aspectRatioRange
=
[
3
,
1000
]
self
.
aspectRatioRange
=
[
5
,
1000
]
self
.
solidityRange
=
[
0.0
,
0.4
]
self
.
solidityRange
=
[
0.0
,
0.4
]
self
.
height2AverageLengthRange
=
[
0
,
1000
]
self
.
height2AverageLengthRange
=
[
0
,
1000
]
\ No newline at end of file
legacyConvert.py
View file @
ad95af53
...
@@ -189,6 +189,7 @@ def updateParticleStats(dset):
...
@@ -189,6 +189,7 @@ def updateParticleStats(dset):
particle
.
shape
=
pc
.
getParticleShape
(
particle
.
contour
,
particle
.
height
,
shapeClassifier
)
particle
.
shape
=
pc
.
getParticleShape
(
particle
.
contour
,
particle
.
height
,
shapeClassifier
)
except
InvalidParticleError
:
except
InvalidParticleError
:
markForDeletion
(
particle
)
markForDeletion
(
particle
)
continue
if
particle
.
shape
==
'fibre'
:
if
particle
.
shape
==
'fibre'
:
particle
.
longSize
,
particle
.
shortSize
=
pc
.
getFibreDimension
(
particle
.
contour
)
particle
.
longSize
,
particle
.
shortSize
=
pc
.
getFibreDimension
(
particle
.
contour
)
...
...
sampleview.py
View file @
ad95af53
...
@@ -289,6 +289,7 @@ class SampleView(QtWidgets.QGraphicsView):
...
@@ -289,6 +289,7 @@ class SampleView(QtWidgets.QGraphicsView):
tryDisconnectingSignal
(
self
.
particleEditor
.
particleAssignmentChanged
)
tryDisconnectingSignal
(
self
.
particleEditor
.
particleAssignmentChanged
)
if
self
.
analysiswidget
is
not
None
:
if
self
.
analysiswidget
is
not
None
:
self
.
particleEditor
.
particleAssignmentChanged
.
connect
(
self
.
analysiswidget
.
updatePlotsAndContours
)
self
.
particleEditor
.
particleAssignmentChanged
.
connect
(
self
.
analysiswidget
.
updatePlotsAndContours
)
self
.
particleEditor
.
particleAssignmentChanged
.
connect
(
self
.
analysiswidget
.
updateWidgetContents
)
def
setMicroscopeMode
(
self
):
def
setMicroscopeMode
(
self
):
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment