~ubuntu-branches/ubuntu/intrepid/horae/intrepid

« back to all changes in this revision

Viewing changes to artemis_parts/fit.pl

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2008-02-23 23:13:02 UTC
  • mfrom: (2.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080223231302-mnyyxs3icvrus4ke
Tags: 066-3
Apply patch to athena_parts/misc.pl for compatibility with 
perl-tk 804.28.

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
 
210
210
  ## --- clear out the Messages tab
211
211
  $notes{messages} -> delete(qw(1.0 end));
212
 
  $current_file = "";
 
212
  ##$current_file = "";
213
213
  $top -> update;
214
214
 
215
215
  ## --- post a message if trouble was found among the parameters
227
227
                     -title          => 'Artemis: Errors...',
228
228
                     -buttons        => [qw/Continue Abort/],
229
229
                     -default_button => 'Abort',
 
230
                     -font           => $config{fonts}{med},
230
231
                     -popover        => 'cursor');
231
232
    &posted_Dialog;
232
233
    my $response = $dialog->Show();
242
243
                       -title          => 'Artemis: Def parameters...',
243
244
                       -buttons        => ["Change to skip", "Change to after", "Do nothing"],
244
245
                       -default_button => 'Change to skip',
 
246
                       -font           => $config{fonts}{med},
245
247
                       -popover        => 'cursor'
246
248
                      );
247
249
      &posted_Dialog;
745
747
    my $fh;
746
748
    ## --- save the log file to this fit folder
747
749
    open $fh, ">".File::Spec->catfile($project_fit_dir, "log");
748
 
    ##print "calling results_header\n";
749
 
    &write_results_header($fh, $fit{fom});
750
 
    ##print "calling results\n";
 
750
    #my @a;
 
751
    #@a=localtime; print "$a[1]:$a[0] calling results_header\n";
 
752
    &write_results_header($fh, \%fit);
 
753
    #@a=localtime; print "$a[1]:$a[0] calling results\n";
751
754
    &write_results($fh, $how, $how_many);
752
 
    ##print "calling show_correlations\n";
 
755
    #@a=localtime; print "$a[1]:$a[0] calling show_correlations\n";
753
756
    &show_correlations($fh) if ($how == 1);
754
757
    foreach my $d (&all_data) {
755
758
      next if (($how == 2) and ($d ne $paths{$current}->data));
756
759
      my $lab = $paths{$d}->get('lab');
757
760
      print $fh join("", "\n\n\n", "=" x 5,
758
761
                     " Data set >>$lab<< ", "=" x 40, "\n\n");
759
 
      ##print "calling write_opparams\n";
 
762
      #@a=localtime; print "$a[1]:$a[0] calling write_opparams\n";
760
763
      &write_opparams($fh, $d);
761
764
      print $fh join("", "\n\n  ", "=" x 5,
762
765
                     " Paths used to fit $lab\n");
763
 
      ##print "calling write_paths\n";
 
766
      #@a=localtime; print "$a[1]:$a[0] calling write_paths\n";
764
767
      if ($paths{data0} -> vstr >= 1.02005) {
765
768
        $warnings .= &write_paths($fh, $d, $how, $how_many, \%selection);
766
769
      } else {
768
771
      };
769
772
    };
770
773
    close $fh;
771
 
    ##print "calling log_file_display\n";
 
774
    #@a=localtime; print "$a[1]:$a[0] calling log_file_display\n";
772
775
    log_file_display();
773
776
    $widgets{results_choose} -> configure(-state=>'normal');
774
777
    $notes{results} -> yviewMoveto(0);
918
921
  ## --- if there were some bad guess parameters ...
919
922
  if (@bad_params) {
920
923
    my $all = join("\n\t", @bad_params);
 
924
    my $these = ($#bad_params) ? 'these' : 'this';
921
925
    my $dialog =
922
926
      $top -> Dialog(-bitmap         => 'warning',
923
 
                     -text           => "The guess parameters:\n\t$all\ncould not be determined by the fit.\n\nShould Artemis change these from guess to set?",
 
927
                     -text           => "The guess parameters:\n\t$all\ncould not be determined by the fit.\n\nShould Artemis change $these from guess to set?",
924
928
                     -title          => 'Artemis: Bad guess parameters...',
925
929
                     -buttons        => [qw/Yes No/],
926
930
                     -default_button => 'No',
 
931
                     -font           => $config{fonts}{med},
927
932
                     -popover        => 'cursor');
928
933
    &posted_Dialog;
929
934
    my $response = $dialog->Show();