Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
XRStools
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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
myron
XRStools
Commits
cb34db68
Commit
cb34db68
authored
8 years ago
by
Alessandro Mirone
Browse files
Options
Downloads
Patches
Plain Diff
simplified version for simple weighting
parent
e3de402a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
XRStools/fit_spectra.py
+5
-5
5 additions, 5 deletions
XRStools/fit_spectra.py
with
5 additions
and
5 deletions
XRStools/fit_spectra.py
+
5
−
5
View file @
cb34db68
...
...
@@ -291,12 +291,12 @@ def fit_spectra_roi( ref, datas, user_de , beta, niter, niterLip ):
## calculating the longitudinal position along the line ( to weight with the projected response_line_intensity)
posx_inref
=
int
(
round
(
(
ix
-
(
(
ref
.
line_infos
.
Xintercept
-
CRX
+
fNmiddle
*
ref
.
line_infos
.
Xslope
)
+
ii
*
ref
.
line_infos
.
Xslope
)
)))
# posx_inref = int( round( (ix-( (ref.line_infos.Xintercept-CRX+ fNmiddle*ref.line_infos.Xslope ) + ii * ref.line_infos.Xslope ) )))
if
posx_inref
>=
0
and
posx_inref
<
len
(
response_line_intensity
):
freq
=
response_line_intensity
[
posx_inref
]
# a weigthing factor
# if posx_inref>=0 and posx_inref< len(response_line_intensity):
if
True
:
# freq = response_line_intensity[posx_inref] # a weigthing factor
freq
=
1.0
fipos
=
(
E
-
mine
)
/
de
# the position in pixel units of the contribution to the spectra array (which starts from mine)
ipos
=
int
(
fipos
)
# the integer part of fipos
f
=
fipos
-
ipos
# the fractional residu of fipos
...
...
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