From 0543c97b81d013e6d8c4881771be35b23f1eb0ac Mon Sep 17 00:00:00 2001 From: nemu Date: Mon, 7 Jun 2010 16:23:34 +0000 Subject: [PATCH] Algorithm for FUNCTIONS block implemented in GUI. Not yet full in MSR module. --- src/external/MuSRFitGUI/devel/MuSRFit.ui | 5 ++- src/external/MuSRFitGUI/devel/MuSRFit.ui.h | 46 +++++++++++----------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/src/external/MuSRFitGUI/devel/MuSRFit.ui b/src/external/MuSRFitGUI/devel/MuSRFit.ui index de94b696..0cfde366 100755 --- a/src/external/MuSRFitGUI/devel/MuSRFit.ui +++ b/src/external/MuSRFitGUI/devel/MuSRFit.ui @@ -3962,7 +3962,7 @@ TheoryBlock - false + true @@ -4228,7 +4228,7 @@ ParametersList - false + true @@ -5458,6 +5458,7 @@ RunSelectionToggle() fileBrowse() AppendToFunctions() + ResetFunctions() diff --git a/src/external/MuSRFitGUI/devel/MuSRFit.ui.h b/src/external/MuSRFitGUI/devel/MuSRFit.ui.h index dd6ed10b..8da1bcfa 100755 --- a/src/external/MuSRFitGUI/devel/MuSRFit.ui.h +++ b/src/external/MuSRFitGUI/devel/MuSRFit.ui.h @@ -570,7 +570,6 @@ void MuSRFitform::ActivateShComp() my $Full_T_Block= $All{"Full_T_Block"}; my $Component=1; - CParamsCombo->clear(); foreach my $FitType (@FitTypes) { my $Parameters=$Paramcomp[$Component-1]; @@ -613,11 +612,6 @@ void MuSRFitform::ActivateShComp() } $Component++; } -# Set theory block in Constraints - TheoryBlock->setText($Full_T_Block); -# Then clear the text - ConstraintLine->setText(""); - FunctionsBlock->setText(""); } void MuSRFitform::InitializeTab() @@ -634,10 +628,6 @@ void MuSRFitform::InitializeTab() } } -# Initialize Parameters List in function block (constraints). - my $ParametersList=""; - ParametersList->setText(""); - my %PTable=MSR::PrepParamTable(\%All); # Setup the table with the right size @@ -646,9 +636,6 @@ void MuSRFitform::InitializeTab() InitParamTable->setNumRows($NParam); } -# Counter for function block (with out Alpha etc.) - my $ParCount=0; - # Fill the table with labels and values of parametr for (my $PCount=0;$PCount<$NParam;$PCount++) { my ($Param,$value,$error,$minvalue,$maxvalue,$RUN) = split(/,/,$PTable{$PCount}); @@ -661,15 +648,6 @@ void MuSRFitform::InitializeTab() InitParamTable->setText($PCount,1,$error); InitParamTable->setText($PCount,2,$minvalue); InitParamTable->setText($PCount,3,$maxvalue); - -# Also update Parameters List for the Functions block - (my $Ptmp,my $tmp)=split(/_/,$Param); - if ($Ptmp ne "" && $Ptmp ne "Alpha" && $Ptmp ne "N0" && $Ptmp ne "NBg") { - $ParCount++; - $ParametersList=$ParametersList."$Param is par$ParCount\n"; - ParametersList->setText($ParametersList); - } - } } @@ -846,3 +824,27 @@ void MuSRFitform::AppendToFunctions() TheoryBlock->setText($Full_T_Block); } +void MuSRFitform::ResetFunctions() +{ + # Initialize Parameters List in function block (constraints). + my $ParametersList=""; + ParametersList->setText(""); + +# Counter for function block (with out Alpha etc.) + my $ParCount=0; + CParamsCombo->clear(); + +# Also update Parameters List for the Functions block + (my $Ptmp,my $tmp)=split(/_/,$Param); + if ($Ptmp ne "" && $Ptmp ne "Alpha" && $Ptmp ne "N0" && $Ptmp ne "NBg") { + $ParCount++; + $ParametersList=$ParametersList."$Param is par$ParCount\n"; + ParametersList->setText($ParametersList); + } +# Set theory block in Constraints + TheoryBlock->setText($Full_T_Block); +# Then clear the text + ConstraintLine->setText(""); + FunctionsBlock->setText(""); + +}