diff --git a/src/external/MuSRFitGUI/MSR.pm b/src/external/MuSRFitGUI/MSR.pm index 0ccb9f31..4d64fece 100755 --- a/src/external/MuSRFitGUI/MSR.pm +++ b/src/external/MuSRFitGUI/MSR.pm @@ -286,7 +286,6 @@ sub CreateMSR { if ($T0_Line ne "t0") { - print "I am here\n"; $Data_Line= $Data_Line."\n".$T0_Line; } @@ -507,6 +506,8 @@ sub CreateMSRSingleHist { foreach my $RUN (@RUNS) { ####################################################################### # For a single histogram fit we basically need to repeat this for each hist +# However, "physical" parameters such as Asymmetry, relaxation etc. should +# be the same for all histograms foreach my $Hist (@Hists) { # Prepare the Parameters and initial values block @@ -1103,7 +1104,7 @@ sub PrepParamTable { "Del_min", "0", "Del_max", "0", "Sgm", "0.1", "dSgm", "0.01", "Sgm_min", "0", "Sgm_max", "0", - "Aa", "0.1", "dAa", "0.01", + "Aa", "60.", "dAa", "0.01", "Aa_min", "0", "Aa_max", "0", "q", "0.1", "dq", "0.01", "q_min", "0", "q_max", "0", @@ -1466,7 +1467,6 @@ sub MSR2Dat { foreach (sort { $RUN{$a} <=> $RUN{$b}} keys %RUN ) { @RunParams=(); $NP=0; -# print $_."=".$MAP{$_}."\n"; @tmp=split(/\s+/,$MAP{$_}); # Remove first element (map) shift(@tmp); diff --git a/src/external/MuSRFitGUI/MuSRFit.pl b/src/external/MuSRFitGUI/MuSRFit.pl index aeff2de5..3ccfe35a 100755 --- a/src/external/MuSRFitGUI/MuSRFit.pl +++ b/src/external/MuSRFitGUI/MuSRFit.pl @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'MuSRFit.ui' # -# Created: Thu Oct 8 17:42:16 2009 +# Created: Fri Oct 30 14:58:36 2009 # by: The PerlQt User Interface Compiler (puic) # # WARNING! All changes made in this file will be lost! @@ -3283,24 +3283,6 @@ sub CreateAllInput $All{"Paramcomp_ref"}=$Paramcomp_ref; my @Paramcomp = @$Paramcomp_ref; -# Read initial values of paramets from tabel - my $erradd = "d"; - my $minadd = "_min"; - my $maxadd = "_max"; - my $NRows = InitParamTable->numRows(); - my $Header=InitParamTable->verticalHeader(); - if ($NRows > 0) { - for (my $i=0;$i<$NRows;$i++) { -# Take label of row, i.e. name of parameter - my $Param=$Header->label($i); -# Then take the value, error, max and min (as numbers) - $All{"$Param"}=1.0*InitParamTable->text($i,0); - $All{"$erradd$Param"}=1.0*InitParamTable->text($i,1); - $All{"$Param$minadd"}=1.0*InitParamTable->text($i,2); - $All{"$Param$maxadd"}=1.0*InitParamTable->text($i,3); - } - } - # Shared settings are detected here my $Shared = 0; @@ -3361,6 +3343,30 @@ sub CreateAllInput } +# This has to be at the end of CreateAll + my %PTable=MSR::PrepParamTable(\%All); + +# Setup the table with the right size + my $NParam=scalar keys( %PTable ); + +# Read initial values of paramets from tabel + my $erradd = "d"; + my $minadd = "_min"; + my $maxadd = "_max"; + my $Header=InitParamTable->verticalHeader(); +# TODO: Should not go over all rows, only on parameters. + if ($NParam > 0) { + for (my $i=0;$i<$NParam;$i++) { +# Take label of row, i.e. name of parameter + my $Param=$Header->label($i); +# Then take the value, error, max and min (as numbers) + $All{"$Param"}=1.0*InitParamTable->text($i,0); + $All{"$erradd$Param"}=1.0*InitParamTable->text($i,1); + $All{"$Param$minadd"}=1.0*InitParamTable->text($i,2); + $All{"$Param$maxadd"}=1.0*InitParamTable->text($i,3); + } + } + # Return Hash with all important values return %All; @@ -3572,6 +3578,7 @@ sub InitializeTab for (my $i=0;$i<$NRows;$i++) { # TODO: Better remove the row rather than hide it. InitParamTable->hideRow($i); +# InitParamTable->removeRow($i); } } diff --git a/src/external/MuSRFitGUI/MuSRFit.ui.h b/src/external/MuSRFitGUI/MuSRFit.ui.h index 0489beaf..b2326a8c 100755 --- a/src/external/MuSRFitGUI/MuSRFit.ui.h +++ b/src/external/MuSRFitGUI/MuSRFit.ui.h @@ -337,24 +337,6 @@ void MuSRFitform::CreateAllInput() $All{"Paramcomp_ref"}=$Paramcomp_ref; my @Paramcomp = @$Paramcomp_ref; -# Read initial values of paramets from tabel - my $erradd = "d"; - my $minadd = "_min"; - my $maxadd = "_max"; - my $NRows = InitParamTable->numRows(); - my $Header=InitParamTable->verticalHeader(); - if ($NRows > 0) { - for (my $i=0;$i<$NRows;$i++) { -# Take label of row, i.e. name of parameter - my $Param=$Header->label($i); -# Then take the value, error, max and min (as numbers) - $All{"$Param"}=1.0*InitParamTable->text($i,0); - $All{"$erradd$Param"}=1.0*InitParamTable->text($i,1); - $All{"$Param$minadd"}=1.0*InitParamTable->text($i,2); - $All{"$Param$maxadd"}=1.0*InitParamTable->text($i,3); - } - } - # Shared settings are detected here my $Shared = 0; @@ -415,6 +397,30 @@ void MuSRFitform::CreateAllInput() } +# This has to be at the end of CreateAll + my %PTable=MSR::PrepParamTable(\%All); + +# Setup the table with the right size + my $NParam=scalar keys( %PTable ); + +# Read initial values of paramets from tabel + my $erradd = "d"; + my $minadd = "_min"; + my $maxadd = "_max"; + my $Header=InitParamTable->verticalHeader(); +# TODO: Should not go over all rows, only on parameters. + if ($NParam > 0) { + for (my $i=0;$i<$NParam;$i++) { +# Take label of row, i.e. name of parameter + my $Param=$Header->label($i); +# Then take the value, error, max and min (as numbers) + $All{"$Param"}=1.0*InitParamTable->text($i,0); + $All{"$erradd$Param"}=1.0*InitParamTable->text($i,1); + $All{"$Param$minadd"}=1.0*InitParamTable->text($i,2); + $All{"$Param$maxadd"}=1.0*InitParamTable->text($i,3); + } + } + # Return Hash with all important values return %All; @@ -616,6 +622,7 @@ void MuSRFitform::InitializeTab() for (my $i=0;$i<$NRows;$i++) { # TODO: Better remove the row rather than hide it. InitParamTable->hideRow($i); +# InitParamTable->removeRow($i); } }