Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alvarez, Gonzalo
PsimagLite
Commits
a3dd3dd9
Commit
a3dd3dd9
authored
Jun 22, 2021
by
Alvarez, Gonzalo
Browse files
lorenzian.pl: filename is omegas weights
parent
2f213ca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/lorentzian.pl
View file @
a3dd3dd9
...
...
@@ -5,8 +5,8 @@ use warnings;
use
utf8
;
#The file to be read has format
#
weight0 omega
0
#
weight1 omega
1
#
omega0 weight
0
#
omega1 weight
1
#...
#
my
(
$file
,
$wbegin
,
$wtotal
,
$wstep
,
$delta
,
$norm
)
=
@ARGV
;
...
...
@@ -69,8 +69,8 @@ sub computeValueFor
my
$total
=
scalar
(
@$data
);
for
(
my
$i
=
0
;
$i
<
$total
;
++
$i
)
{
my
$ptr
=
$data
->
[
$i
];
my
$deltaOmega
=
$omega
-
$ptr
->
[
1
];
$sum
+=
$ptr
->
[
0
]
/
(
$deltaOmega*$deltaOmega
+
$delta*$delta
);
my
$deltaOmega
=
$omega
-
$ptr
->
[
0
];
$sum
+=
$ptr
->
[
1
]
/
(
$deltaOmega*$deltaOmega
+
$delta*$delta
);
}
return
$sum
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment