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
4a15d598
Commit
4a15d598
authored
2 years ago
by
Benjamin van Kuiken
Browse files
Options
Downloads
Plain Diff
Merge branch 'hrixs_construct' into 'master'
hRIXS Constructor See merge request
!243
parents
ee247989
f2e30876
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!243
hRIXS Constructor
Pipeline
#96444
passed
2 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/toolbox_scs/detectors/hrixs.py
+29
-22
29 additions, 22 deletions
src/toolbox_scs/detectors/hrixs.py
with
29 additions
and
22 deletions
src/toolbox_scs/detectors/hrixs.py
+
29
−
22
View file @
4a15d598
...
...
@@ -197,6 +197,9 @@ class hRIXS:
use None if you want to give it in standard deviations instead.
STD_THRESHOLD:
same as THRESHOLD, in standard deviations.
DBL_THRESHOLD:
threshold controling whether a detected hit is considered to be a
double hit.
BINS: int
the number of bins used in centroiding
CURVE_A, CURVE_B: float
...
...
@@ -212,9 +215,9 @@ class hRIXS:
Example
-------
h = hRIXS()
h
.PROPOSAL = 3145
proposal = 3145
h
= hRIXS(proposal)
h.Y_RANGE = slice(700, 900)
h.CURVE_B = -3.695346575286939e-07
h.CURVE_A = 0.024084479232443695
...
...
@@ -222,31 +225,34 @@ class hRIXS:
h.ENERGY_INTERCEPT = 498.27
h.STD_THRESHOLD = 3.5
"""
def
__init__
(
self
,
proposalNB
):
self
.
PROPOSAL
=
proposalNB
# image range
X_RANGE
=
np
.
s_
[:]
Y_RANGE
=
np
.
s_
[:]
# image range
self
.
X_RANGE
=
np
.
s_
[:]
self
.
Y_RANGE
=
np
.
s_
[:]
# centroid
THRESHOLD
=
None
# pixel counts above which a hit candidate is assumed
STD_THRESHOLD
=
3.5
# same as THRESHOLD, in standard deviations
DBL_THRESHOLD
=
0.1
# factor used for double hits in centroid_one
CURVE_A
=
0
# curvature parameters as determined elsewhere
CURVE_B
=
0
# centroid
self
.
THRESHOLD
=
None
# pixel counts above which a hit candidate is assumed
self
.
STD_THRESHOLD
=
3.5
# same as THRESHOLD, in standard deviations
self
.
DBL_THRESHOLD
=
0.1
# factor used for double hits in centroid_one
self
.
CURVE_A
=
0
# curvature parameters as determined elsewhere
self
.
CURVE_B
=
0
# integral
BINS
=
100
# integral
self
.
BINS
=
100
METHOD
=
'
centroid
'
# ['centroid', 'integral']
USE_DARK
=
False
self
.
METHOD
=
'
centroid
'
# ['centroid', 'integral']
self
.
USE_DARK
=
False
# Ignore double hits
AVOID_DBL
=
False
# Ignore double hits
self
.
AVOID_DBL
=
False
ENERGY_INTERCEPT
=
0
ENERGY_SLOPE
=
1
self
.
ENERGY_INTERCEPT
=
0
self
.
ENERGY_SLOPE
=
1
FIELDS
=
[
'
hRIXS_det
'
,
'
hRIXS_index
'
,
'
hRIXS_delay
'
,
'
hRIXS_norm
'
,
'
nrj
'
]
self
.
FIELDS
=
[
'
hRIXS_det
'
,
'
hRIXS_index
'
,
'
hRIXS_delay
'
,
'
hRIXS_norm
'
,
'
nrj
'
]
def
set_params
(
self
,
**
params
):
for
key
,
value
in
params
.
items
():
...
...
@@ -255,7 +261,8 @@ class hRIXS:
def
get_params
(
self
,
*
params
):
if
not
params
:
params
=
(
'
proposal
'
,
'
x_range
'
,
'
y_range
'
,
'
threshold
'
,
'
curve_a
'
,
'
curve_b
'
,
'
threshold
'
,
'
std_threshold
'
,
'
dbl_threshold
'
,
'
curve_a
'
,
'
curve_b
'
,
'
bins
'
,
'
method
'
,
'
fields
'
)
return
{
param
:
getattr
(
self
,
param
.
upper
())
for
param
in
params
}
...
...
This diff is collapsed.
Click to expand it.
Loïc Le Guyader
@lleguy
mentioned in issue
#67 (closed)
·
2 years ago
mentioned in issue
#67 (closed)
mentioned in issue #67
Toggle commit list
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