3 my ( $line, $comment ) =
4 split( ";", $self -> {'option_string'}, 2 );
6 ## Split and store labels and units
7 if ( defined $comment ) {
8 my ($label,$unit) = split( ";",$comment,2 );
9 chomp $label if $label;
11 $self -> {'label'} = $label;
12 $self -> {'unit'} = $unit;
15 # $line should be one theta now
22 $self -> {'fix'} = $line =~ s/FIX\w*// ?
1 : 0;
24 my @inits = split( ",", $line );
26 $self -> {'init'} = $inits[0];
27 $self -> {'lobnd'} = undef;
28 $self -> {'upbnd'} = undef;
30 $self -> {'lobnd'} = $inits[0];
31 $self -> {'init'} = $inits[1];
32 $self -> {'upbnd'} = $inits[2];
35 if( defined $self -> {'lobnd'} and $self -> {'lobnd'} =~ /INF/ ){
37 # print Dumper $PsN::config;
38 $self -> {'lobnd'} = $PsN::config
-> {'low_INF'};
39 # print $self -> {'lobnd'};
42 if( defined $self -> {'upbnd'} and $self -> {'upbnd'} =~ /INF/ ){
43 $self -> {'upbnd'} = $PsN::config
-> {'high_INF'};
46 # print 'Found lobnd: ',$self -> {'lobnd'},
47 # ', init: ',$self -> {'init'},
48 # ', upbnd: ',$self -> {'upbnd'},
49 # ', label: ',$self -> {'label'},
50 # ', unit: ',$self -> {'unit'},"\n"
51 # if ( $self -> {'debug'} );
58 my $init = $self -> {'init'};
59 if( length($init) > 8 ){
60 if( $init < 1 && $init > -1 ){
61 if( length($init) - 2 > 8 ){
72 debug
-> warn( level
=> 1,
73 message
=> "Warning: initial theta value: \"".$self -> {'init'}."\"is to loong, replacing with 0.0001" );
76 if ( ( defined $self -> {'upbnd'} ) or
77 ( defined $self -> {'lobnd'} ) ) {
78 $formatted = $formatted."(".
79 $self -> {'lobnd'}.",";
80 $formatted = $formatted.$init;
81 # $formatted = $formatted.sprintf("%6f",$init);
83 $formatted = $formatted.",".$self -> {'upbnd'}
84 if ( defined $self -> {'upbnd'} );
85 $formatted = $formatted.")";
87 # $formatted = sprintf("%6f",$init);
88 $formatted = $formatted.$init;
91 if ( $self -> {'fix'} ) {
92 $formatted = $formatted.sprintf("%5s",'FIX');
93 # $formatted = $formatted." "x(30-length($formatted));
94 # $formatted = $formatted.' FIX ';
96 $formatted = $formatted." ";
99 # $formatted = $formatted." "x(40-length($formatted));
100 $formatted = $formatted." ; "
101 if ( ( defined $self -> {'label'} ) or
102 ( defined $self -> {'unit'} ) );
103 if ( defined $self -> {'label'} ) {
104 $formatted = $formatted.sprintf("%15.15s",$self -> {'label'});
107 if ( defined $self -> {'unit'} ) {
108 $formatted = $formatted." ;".sprintf("%15.15s",$self -> {'unit'});
109 # $formatted = $formatted." "x(57-length($formatted))."; ";
110 # $formatted = $formatted.$self -> {'unit'};
113 # $formatted = $formatted." "x(64-length($formatted))."\n";