diff options
Diffstat (limited to 'scripts/i0-analysis')
-rwxr-xr-x | scripts/i0-analysis | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/i0-analysis b/scripts/i0-analysis index 1c797139..36fd7a9a 100755 --- a/scripts/i0-analysis +++ b/scripts/i0-analysis @@ -2,6 +2,7 @@ use strict; use File::Basename; +use POSIX; open(FH, $ARGV[0]); @@ -33,7 +34,7 @@ while ( $line = <FH> ) { if ( $line =~ /^([\d\.]+)\ ([\d\.]+)$/ ) { my $scale = $1; my $i0 = $2; - my $bin = int(($scale-$hmin)/$hstep); + my $bin = floor(($scale-$hmin)/$hstep); $hist[$bin]++; } } @@ -59,7 +60,7 @@ while ( $line = <FH> ) { if ( $line =~ /^([\d\.]+)\ ([\d\.]+)$/ ) { my $scale = $1; my $i0 = $2; - my $bin = int(($i0-$hmin)/$hstep); + my $bin = floor(($i0-$hmin)/$hstep); $hist[$bin]++; } } @@ -85,7 +86,7 @@ while ( $line = <FH> ) { if ( $line =~ /^([\d\.]+)\ ([\d\.]+)$/ ) { my $scale = $1; my $i0 = $2; - my $bin = int((($scale/$i0)-$hmin)/$hstep); + my $bin = floor((($scale/$i0)-$hmin)/$hstep); $hist[$bin]++; } } |