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
961b3253
Commit
961b3253
authored
May 17, 2019
by
Hackmet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in SQLExport
parent
1258436c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
19 deletions
+9
-19
analysis/sqlexport.py
analysis/sqlexport.py
+9
-19
No files found.
analysis/sqlexport.py
View file @
961b3253
...
...
@@ -176,7 +176,7 @@ class SQLExport(QtWidgets.QDialog):
currentParticleInd
=
self
.
getPartIndicesOfSample
(
self
.
sampleSelector
.
currentText
())
currentAnalysisInd
=
self
.
getAnalyisIndicesOfMethod
(
self
.
methodIndices
[
self
.
methodSelector
.
currentIndex
()])
sizeCategories
=
self
.
get
ColFromTable
(
'Size_category'
,
'size_fraction'
)
sizeCategories
=
self
.
get
EntireTable
(
'size_fraction'
)
[
1
]
for
index
,
polymerType
in
enumerate
(
self
.
polymerTypes
):
if
self
.
polymerCheckboxes
[
index
].
isChecked
():
...
...
@@ -287,26 +287,16 @@ class SQLExport(QtWidgets.QDialog):
def
getSizeFraction
(
self
,
sizeList
,
size
):
def
isNumber
(
string
):
try
:
float
(
string
)
return
True
except
:
return
False
size
=
np
.
round
(
size
)
for
i
in
sizeList
:
if
i
.
find
(
'>'
)
!=
-
1
:
#i.e., string is >10000
return
i
if
i
[
1
]
.
find
(
'>'
)
!=
-
1
:
#i.e., string is
'
>10000
0'
return
i
[
1
]
else
:
limits
=
[
float
(
s
)
for
s
in
i
.
split
()
if
isNumber
(
s
)]
try
:
upper
=
float
(
limits
[
1
])
lower
=
float
(
limits
[
0
])
except
:
print
(
'error processing limits {} from {} with size {}'
.
format
(
limits
,
i
,
size
))
raise
if
lower
<=
np
.
round
(
size
)
<=
upper
:
return
i
limits
=
[
i
[
2
],
i
[
3
]]
upper
=
float
(
limits
[
1
])
lower
=
float
(
limits
[
0
])
if
lower
<=
size
<=
upper
:
return
i
[
1
]
def
getDateString
(
self
,
QDateObject
):
...
...
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