~ubuntu-branches/ubuntu/oneiric/horae/oneiric

« back to all changes in this revision

Viewing changes to lib/Ifeffit/Plugins/Filetype/Athena/PFBL12C.pm

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2011-06-20 12:04:52 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110620120452-oy78au97bzst3k8o
Tags: 071~svn536-1
* New plugin files in SVN pull
* Upgrade to Standards-Version 3.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
  open my $N, ">".$new or die "could not write to $new (fix in PFBL12C)\n";
79
79
 
80
80
  my $header = 1;
81
 
  my @offsets;
82
81
  while (<$D>) {
83
82
    next if ($_ =~ m{\A\s*\z});
84
83
    last if ($_ =~ m{});
85
84
    chomp;
86
85
    if ($header and ($_ =~ m{\A\s+offset}i)) {
87
86
      my $this = $_;
88
 
      @offsets = split(" ", $this);
89
87
      print $N '# ', $_, $/;
90
88
      print $N '# --------------------------------------------------', $/;
91
89
      print $N '# energy_requested   energy_attained  time  i0  i1  ', $/;
102
100
      $list[1] = (HC) / ($ddistance * sin($list[1] * PI / 180));
103
101
      my $ndet = $#list-2;
104
102
      foreach my $i (1..$ndet) {
105
 
        $list[2+$i] = $list[2+$i] - $offsets[2+$i];
 
103
        $list[2+$i] = $list[2+$i];
106
104
      };
107
105
      my $pattern = "  %9.3f  %9.3f  %6.2f" . "  %12.3f" x $ndet . $/;
108
106
      printf $N $pattern, @list;