From c385618291076dd69f0152dfbb5bdafb21acb575 Mon Sep 17 00:00:00 2001 From: Zaher Salman Date: Tue, 8 Jun 2010 16:39:07 +0000 Subject: [PATCH] Fix some bugs in single hist fits. --- src/external/MuSRFitGUI/MSR.pm | 10 ++++++++++ src/external/MuSRFitGUI/musrfit.cgi | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/external/MuSRFitGUI/MSR.pm b/src/external/MuSRFitGUI/MSR.pm index 8e12977f..160e693d 100755 --- a/src/external/MuSRFitGUI/MSR.pm +++ b/src/external/MuSRFitGUI/MSR.pm @@ -93,6 +93,14 @@ sub CreateMSR { } my @Hists = split( /,/, $All{"LRBF"} ); + # TODO + # Check the number of histograms + # should be 2 or 4 histograms + # should be checked in GUI + # for 2 simple asymmetry fit + # for 4 two run blocks with different geometric parameters: + # Alpha, N0, NBg, Phi, Asy + my @TiVals = split( /,/, $All{"Tis"} ); my @TfVals = split( /,/, $All{"Tfs"} ); my @BINVals = split( /,/, $All{"BINS"} ); @@ -1282,6 +1290,8 @@ sub PrepParamTable { # Change state/label of parameters foreach my $Param (@Params) { my $Param_ORG = $Param; + # If multiple histograms (sum or difference) take the first histogram only + ($Hist,$tmp) = split(/ /,$Hist); $Param=$Param.$Hist; if ( $#FitTypes != 0 && ( $Param_ORG ne "N0" && $Param_ORG ne "NBg" ) ){ $Param = join( $EMPTY, $Param, "_", "$Component" ); diff --git a/src/external/MuSRFitGUI/musrfit.cgi b/src/external/MuSRFitGUI/musrfit.cgi index ba338de7..2ab65fe7 100755 --- a/src/external/MuSRFitGUI/musrfit.cgi +++ b/src/external/MuSRFitGUI/musrfit.cgi @@ -248,7 +248,7 @@ elsif ( $Step == 2 ) { elsif ( $Step <= 6 && $Step >= 3 ) { # Then create appropriate file - if ($All{"FitAsyType"} eq "SingleHist") { + if ($FitAsyType eq "SingleHist") { ($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSRSingleHist(\%AllParameters); } else { ($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSR(\%AllParameters);