File: getTimeObservablesInSitu.pl

package info (click to toggle)
dmrgpp 6.06-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 113,900 kB
  • sloc: cpp: 80,986; perl: 14,772; ansic: 2,923; makefile: 83; sh: 17
file content (30 lines) | stat: -rwxr-xr-x 612 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl

use strict;
use warnings;
use lib "../scripts";
use timeObservablesInSitu;


my ($site, $label, $tau)=@ARGV;
defined($tau) or die "USAGE: $0 site label tau < file\n";
my @matrix = timeObservablesInSitu::getMatrix($site, $label, *STDIN, $tau);
print "#site= $site\n";
print "#label=$label\n";
my $times = scalar(@matrix);

print STDERR "$0: Found $times times in STDIN\n";

for (my $t = 0; $t < $times; $t += 1) {
	my $time = $tau*$t;

	my $a = $matrix[$site];
	my $pair = $a->[$t];
	if (!defined($pair)) {
		next;
	}

	print "$time $site ".$pair->{"value"}." ".$pair->{"superdensity"}."\n";
}