Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
ToolBox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
SCS
ToolBox
Commits
35e26f66
Commit
35e26f66
authored
2 years ago
by
Johannes Niskanen
Browse files
Options
Downloads
Patches
Plain Diff
A few comments clarified
parent
71e16cc5
No related branches found
No related tags found
2 merge requests
!198
Alignment of spectra
,
!188
P2866 updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/toolbox_scs/detectors/hrixs.py
+4
-3
4 additions, 3 deletions
src/toolbox_scs/detectors/hrixs.py
with
4 additions
and
3 deletions
src/toolbox_scs/detectors/hrixs.py
+
4
−
3
View file @
35e26f66
...
@@ -504,8 +504,8 @@ class hRIXS:
...
@@ -504,8 +504,8 @@ class hRIXS:
# -gauss_fit
# -gauss_fit
# start and stop are values of data.energy
# start and stop are values of data.energy
# that define the range of these operations
# that define the range of these operations
# RETURNS
MAXIMUM POSITIONS AND data with
# RETURNS
LINE CENTER POSITIONS
# shifted spectra
#
(and in future perhaps
shifted spectra
)
#********************************************
#********************************************
searchinds
=
(
data
.
energy
>=
start
)
*
(
data
.
energy
<=
stop
)
searchinds
=
(
data
.
energy
>=
start
)
*
(
data
.
energy
<=
stop
)
peak_posis
=
[]
peak_posis
=
[]
...
@@ -524,6 +524,7 @@ class hRIXS:
...
@@ -524,6 +524,7 @@ class hRIXS:
#********************************************
#********************************************
# Alignment based on autocorrelation
# Alignment based on autocorrelation
# this is a relative alignment method
# this is a relative alignment method
# where 1st readout defines the abs scale
#********************************************
#********************************************
elif
method
.
lower
()
==
'
autocorrelation
'
:
elif
method
.
lower
()
==
'
autocorrelation
'
:
#********************************************
#********************************************
...
@@ -585,7 +586,7 @@ class hRIXS:
...
@@ -585,7 +586,7 @@ class hRIXS:
plt
.
plot
(
x
,
p
.
x
[
0
]
*
Gauss
(
x
,
p
.
x
[
1
],
p
.
x
[
2
]))
plt
.
plot
(
x
,
p
.
x
[
0
]
*
Gauss
(
x
,
p
.
x
[
1
],
p
.
x
[
2
]))
raise
Exception
(
'
align_readouts(): can not fit a gaussian to the data.
'
)
raise
Exception
(
'
align_readouts(): can not fit a gaussian to the data.
'
)
else
:
else
:
raise
Exception
(
'
align_readouts() did recognize the method.
'
)
raise
Exception
(
'
align_readouts() did
not
recognize the method.
'
)
return
peak_posis
return
peak_posis
...
...
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