Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
GEPARD
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GEPARD
GEPARD
Commits
8e7707c0
Commit
8e7707c0
authored
Jul 22, 2019
by
JosefBrandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small Bugfixes / Optimizations
parent
3ad72d39
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
22 deletions
+23
-22
.gitignore
.gitignore
+4
-0
analysis/analysisview.py
analysis/analysisview.py
+4
-5
analysis/particleContainer.py
analysis/particleContainer.py
+3
-0
analysis/particlePainter.py
analysis/particlePainter.py
+1
-1
dataset.py
dataset.py
+6
-2
detectionview.py
detectionview.py
+0
-1
gepard.py
gepard.py
+2
-2
ramanscanui.py
ramanscanui.py
+0
-1
sampleview.py
sampleview.py
+3
-10
No files found.
.gitignore
View file @
8e7707c0
...
...
@@ -6,3 +6,7 @@ gepard\.cfg
analysis/database_config\.txt
*.so
*.c
external/build/
analysis/analysisview.py
View file @
8e7707c0
...
...
@@ -111,8 +111,8 @@ class ParticleAnalysis(QtWidgets.QMainWindow):
self
.
specNumberSelector
=
QtWidgets
.
QSpinBox
()
self
.
specNumberSelector
.
setMinimumWidth
(
100
)
self
.
specNumberSelector
.
setMinimum
(
1
)
num
Particles
=
self
.
particleContainer
.
getNumberOfParticle
s
()
self
.
specNumberSelector
.
setMaximum
(
num
Particles
)
num
Spectra
=
self
.
particleContainer
.
getNumberOfMeasurement
s
()
self
.
specNumberSelector
.
setMaximum
(
num
Spectra
)
self
.
jumpToSpecBtn
=
QtWidgets
.
QPushButton
(
'Jump To Spectrum of Number:'
)
self
.
jumpToSpecBtn
.
released
.
connect
(
self
.
jumpToIndicatedSpectrum
)
...
...
@@ -387,8 +387,8 @@ class ParticleAnalysis(QtWidgets.QMainWindow):
self
.
typeSelectorCombo
.
addItems
(
uniquePolymers
)
self
.
typeSelectorCombo
.
currentIndexChanged
.
connect
(
self
.
setTypeSelector
)
num
Particles
=
self
.
particleContainer
.
getNumberOfParticle
s
()
self
.
specNumberSelector
.
setMaximum
(
num
Particles
)
num
Spectra
=
self
.
particleContainer
.
getNumberOfMeasurement
s
()
self
.
specNumberSelector
.
setMaximum
(
num
Spectra
)
def
initializeSpecPlot
(
self
):
self
.
specPlot
.
loadSpectraAndInitializeSpecPlot
()
...
...
@@ -531,7 +531,6 @@ class ParticleAnalysis(QtWidgets.QMainWindow):
self
.
particleSelector
.
setValue
(
partIndices
.
index
(
particleIndex
)
+
1
)
specIndices
=
self
.
particleContainer
.
getSpectraIndicesOfParticle
(
self
.
currentParticleIndex
)
self
.
spectrumSelector
.
setValue
(
1
)
self
.
spectrumSelector
.
setMaximum
(
len
(
specIndices
))
...
...
analysis/particleContainer.py
View file @
8e7707c0
...
...
@@ -176,6 +176,9 @@ class ParticleContainer(object):
def
getNumberOfParticles
(
self
):
return
len
(
self
.
particles
)
def
getNumberOfMeasurements
(
self
):
return
len
(
self
.
measurements
)
def
getParticleContours
(
self
):
contours
=
[
part
.
contour
for
part
in
self
.
particles
]
return
contours
...
...
analysis/particlePainter.py
View file @
8e7707c0
...
...
@@ -166,7 +166,7 @@ class ParticlePainter(QtWidgets.QGraphicsItem):
painter
.
drawEllipse
(
p
[
0
]
-
p
[
2
],
p
[
1
]
-
p
[
2
],
2
*
p
[
2
],
2
*
p
[
2
])
if
self
.
pixmap
is
not
None
:
painter
.
setOpacity
(
0.
6
)
painter
.
setOpacity
(
0.
4
)
painter
.
drawPixmap
(
self
.
topLeft
[
1
],
self
.
topLeft
[
0
],
self
.
pixmap
)
...
...
dataset.py
View file @
8e7707c0
...
...
@@ -252,6 +252,9 @@ class DataSet(object):
self
.
particleContainer
.
clearMeasurements
()
if
self
.
particles2spectra
is
None
:
self
.
particles2spectra
=
[[
int
(
np
.
where
(
self
.
ramanscansortindex
==
i
)[
0
])]
for
i
in
range
(
len
(
self
.
ramanscansortindex
))]
if
len
(
self
.
particlestats
)
>
0
:
#i.e., particle detection was completed and particle data is there
self
.
particleDetectionDone
=
True
for
particleIndex
,
listOfScanIndices
in
enumerate
(
self
.
particles2spectra
):
...
...
@@ -259,11 +262,12 @@ class DataSet(object):
curParticle
.
measurements
=
[]
for
scanIndex
in
listOfScanIndices
:
indexOfNewMeas
=
self
.
particleContainer
.
addEmptyMeasurement
()
x
,
y
=
self
.
ramanpoints
[
indexOfNewMeas
][
0
],
self
.
ramanpoints
[
indexOfNewMeas
][
1
]
indexOfMeasInRamanPoints
=
self
.
ramanscansortindex
[
scanIndex
]
x
,
y
=
self
.
ramanpoints
[
indexOfMeasInRamanPoints
][
0
],
self
.
ramanpoints
[
indexOfMeasInRamanPoints
][
1
]
self
.
particleContainer
.
setMeasurementPixelCoords
(
indexOfNewMeas
,
x
,
y
)
self
.
particleContainer
.
setMeasurementScanIndex
(
indexOfNewMeas
,
scanIndex
)
curParticle
.
addMeasurement
(
self
.
particleContainer
.
measurements
[
indexOfNewMeas
])
for
particle
in
self
.
particleContainer
.
particles
:
for
meas
in
particle
.
measurements
:
specIndex
=
meas
.
getScanIndex
()
...
...
detectionview.py
View file @
8e7707c0
...
...
@@ -672,7 +672,6 @@ class ParticleDetectionView(QtWidgets.QWidget):
particleContainer
.
setMeasurementPixelCoords
(
indexOfNewMeas
,
point
.
x
,
point
.
y
)
curParticle
.
addMeasurement
(
particleContainer
.
measurements
[
indexOfNewMeas
])
self
.
dataset
.
ramanpoints
=
measurementPoints
self
.
dataset
.
particleDetectionDone
=
True
self
.
dataset
.
mode
=
"prepareraman"
self
.
dataset
.
save
()
...
...
gepard.py
View file @
8e7707c0
...
...
@@ -329,8 +329,8 @@ if __name__ == '__main__':
logname
=
os
.
path
.
join
(
logpath
,
'logfile.txt'
)
fp
=
open
(
logname
,
"a"
)
#
sys.stderr = fp
#
sys.stdout = fp
sys
.
stderr
=
fp
sys
.
stdout
=
fp
print
(
"starting GEPARD at: "
+
strftime
(
"%d %b %Y %H:%M:%S"
,
localtime
()),
flush
=
True
)
gepard
=
GEPARDMainWindow
(
logpath
)
...
...
ramanscanui.py
View file @
8e7707c0
...
...
@@ -234,7 +234,6 @@ class RamanScanUI(QtWidgets.QWidget):
for
measIndex
,
ramanScanIndex
in
enumerate
(
cmin
):
self
.
dataset
.
particleContainer
.
setMeasurementScanIndex
(
measIndex
,
ramanScanIndex
)
self
.
dataset
.
ramanscansortindex
=
cmin
self
.
view
.
saveDataSet
()
self
.
view
.
prepareAnalysis
()
self
.
view
.
scaleImage
(
2.0
)
...
...
sampleview.py
View file @
8e7707c0
...
...
@@ -555,18 +555,11 @@ class SampleView(QtWidgets.QGraphicsView):
def
prepareAnalysis
(
self
):
self
.
clearItems
()
if
self
.
dataset
.
particleDetectionDone
:
data
=
[]
for
i
in
self
.
dataset
.
ramanscansortindex
:
data
.
append
(
list
(
self
.
dataset
.
ramanpoints
[
i
]))
for
i
in
range
(
len
(
data
)):
item
=
RamanScanIndicator
(
self
,
i
+
1
,
20
,
(
data
[
i
][
0
],
data
[
i
][
1
]))
for
meas
in
self
.
dataset
.
particleContainer
.
measurements
:
number
=
meas
.
ramanScanIndex
+
1
item
=
RamanScanIndicator
(
self
,
number
,
20
,
(
meas
.
pixelcoord_x
,
meas
.
pixelcoord_y
))
self
.
scene
().
addItem
(
item
)
self
.
ramanscanitems
.
append
(
item
)
# for index, meas in enumerate(self.dataset.particleContainer.measurements):
# number = meas.ramanScanIndex+1
# item = RamanScanIndicator(self, number, 20, (meas.pixelcoord_x, meas.pixelcoord_y))
# self.scene().addItem(item)
# self.ramanscanitems.append(item)
def
resetParticleContours
(
self
):
t0
=
time
.
time
()
...
...
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