Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
LAMP
Commits
de28f2f2
Commit
de28f2f2
authored
May 14, 2019
by
Gonzalez, Miguel
Browse files
S. Rols added keyword /constant to conv_ins routine
parent
bd9738fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
lamp_mac/ATOMS/conv_ins.pro
View file @
de28f2f2
FUNCTION
conv_ins
,
w_in
,
pc
,
cutoff
,
intrange
,
W_FWHM
=
W_FWHM
FUNCTION
conv_ins
,
w_in
,
pc
,
cutoff
,
intrange
,
W_FWHM
=
W_FWHM
,
CONSTANT
=
CONSTANT
;
+
;
*******
********
;
**
User
callable
...
...
@@ -10,16 +10,19 @@ FUNCTION conv_ins, w_in , pc, cutoff, intrange,W_FWHM=W_FWHM
;** y=(1/w.sqrt(pi/2))exp(-2(x-x0)^2/w^2)
;** output spectrum in wavenumbers
;** ------------------------------------------------------
;** call is w2=conv_ins(w1,0.05, 1.5, 3.0)
;** call is w2=conv_ins(w1,0.05, 1.5, 3.0
, /constant
)
;** w1 is workspace to be convoluted
;** 0.05 is width of Gaussian resolution, a % of energy transfer
;** 1.5 is a cutoff to prevent divergence at small E
;** intrange is to integrate over the whole Gaussian
;** /constant indicates that pc is not a percentage but a value of FWHM constant over the total range
;** W_FWHM is the workspace number where the evolution of the FWHM as a function of energy is stored (useful for TOF)
;-
; modified 20/8/2008 to loop through a 2d array, energy along x
; comment 7/10/2008 needs further modification to work on 1D arrays
; done 13/3/2009
; Modified by SR 01/2016 to include /constant keyword and W_FWHM option
take_datp, datp & w_out = w_in & w_temp1=w_in[*,0] & w_temp2=w_in[*,0]
...
...
@@ -50,10 +53,14 @@ w_temp1=w_in[*,i_q]
for
i_orig
=
0
,
N
-
1
do
begin
;
define
Gaussian
,
wd
is
width
,
pc
is
pcage
of
energy
transfer
,
1.17741
is
sqrt
(
2
ln2
)
;
0.79788
is
pre
-
exp
to
give
unit
intensity
,
pc
=
0.02
read
as
parameter
if
(
not
i_fromwksp
)
then
wd
=
e_i
[
i_orig
]
*
pc
/
1.177410
else
wd
=
w_fromwksp
[
i_orig
]
/
1.177410
if
(
not
i_fromwksp
)
then
begin
if
(
keyword_set
(
CONSTANT
))
then
wd
=
pc
/
1.177410
else
wd
=
e_i
[
i_orig
]
*
pc
/
1.177410
endif
else
wd
=
w_fromwksp
[
i_orig
]
/
1.177410
if
(
wd
LT
w_cutoff
)
then
begin
wd
=
w_cutoff
endif
;
select
range
for
intrangeation
,
intrange
=
3.0
read
as
parameter
grange
=
intrange
*
wd
/
e_step
&
igrange
=
floor
(
grange
)
;
print
,
igrange
...
...
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