Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xsocs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kmap
xsocs
Commits
446be24d
Commit
446be24d
authored
Nov 19, 2018
by
Thomas Vincent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide 0 division warnings
parent
9e8df4e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
xsocs/process/fit/peak_fit.py
xsocs/process/fit/peak_fit.py
+6
-3
No files found.
xsocs/process/fit/peak_fit.py
View file @
446be24d
...
...
@@ -36,11 +36,13 @@ import ctypes
import
multiprocessing
from
threading
import
Thread
import
multiprocessing.sharedctypes
as
mp_sharedctypes
from
silx.math.fit
import
snip1d
import
warnings
import
numpy
as
np
from
scipy.optimize
import
leastsq
from
silx.math.fit
import
snip1d
from
...
import
config
from
...io
import
QSpaceH5
from
...io.FitH5
import
BackgroundTypes
...
...
@@ -325,7 +327,9 @@ def project(data, hits=None):
:rtype: List[numpy.ndarray]
"""
if
hits
is
not
None
:
data
/=
hits
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
'ignore'
,
RuntimeWarning
)
data
/=
hits
data
[
hits
<=
0
]
=
0
dim2_sum
=
data
.
sum
(
axis
=
0
).
sum
(
axis
=
0
)
...
...
@@ -376,7 +380,6 @@ def _gaussian_err(parameters, axis, signal):
_SQRT_2_PI
=
np
.
sqrt
(
2
*
np
.
pi
)
# TODO double check
def
gaussian_fit
(
axis
,
signal
):
"""Returns gaussian fitting information
...
...
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