Starting to fix single histogram fits

This commit is contained in:
salman 2010-08-24 18:17:43 +00:00
parent 30862e21d0
commit dd2263b6a0
7 changed files with 99 additions and 68 deletions

View File

@ -99,7 +99,7 @@ sub CreateMSR {
# should be checked in GUI # should be checked in GUI
# for 2 simple asymmetry fit # for 2 simple asymmetry fit
# for 4 two run blocks with different geometric parameters: # for 4 two run blocks with different geometric parameters:
# Alpha, N0, NBg, Phi, Asy # Alpha, No, NBg, Phi, Asy
my @TiVals = split( /,/, $All{"Tis"} ); my @TiVals = split( /,/, $All{"Tis"} );
my @TfVals = split( /,/, $All{"Tfs"} ); my @TfVals = split( /,/, $All{"Tfs"} );
@ -451,9 +451,9 @@ STATISTIC --- 0000-00-00 00:00:00
return($Full_T_Block,\@Paramcomp); return($Full_T_Block,\@Paramcomp);
} }
######################## ##########################################################################
# CreateMSRSingleHist # CreateMSRSingleHist
######################## ##########################################################################
sub CreateMSRSingleHist { sub CreateMSRSingleHist {
my %All = %{$_[0]}; my %All = %{$_[0]};
@ -533,7 +533,7 @@ FUNCTIONS
if ( $#RUNS == 0 && $#Hists == 0) { if ( $#RUNS == 0 && $#Hists == 0) {
my $shcount = 1; my $shcount = 1;
} else { } else {
if ( $All{"Sh_N0"} == 1 ) { if ( $All{"Sh_No"} == 1 ) {
my $shcount = 1; my $shcount = 1;
} elsif ( $All{"Sh_NBg"} == 1 ) { } elsif ( $All{"Sh_NBg"} == 1 ) {
my $shcount = 1; my $shcount = 1;
@ -569,8 +569,8 @@ FUNCTIONS
# How many non-shared parameter for this RUN? # How many non-shared parameter for this RUN?
my $nonsh = 0; my $nonsh = 0;
# Prepeare N0/NBg line for the RUN block. Empty initially. # Prepeare No/NBg line for the RUN block. Empty initially.
my $N0Bg_Line = $EMPTY; my $NoBg_Line = $EMPTY;
# Loop over all components in the fit # Loop over all components in the fit
foreach my $FitType (@FitTypes) { foreach my $FitType (@FitTypes) {
@ -578,15 +578,15 @@ FUNCTIONS
my $Parameters = $Paramcomp[ $component - 1 ]; my $Parameters = $Paramcomp[ $component - 1 ];
my @Params = split( /\s+/, $Parameters ); my @Params = split( /\s+/, $Parameters );
# For the first component we need N0 and NBg for SingleHist fits # For the first component we need No and NBg for SingleHist fits
if ( $component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { if ( $component == 1 ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
foreach $Param (@Params) { foreach $Param (@Params) {
$Param_ORG = $Param; $Param_ORG = $Param;
$Param=$Param.$Hist; $Param=$Param.$Hist;
if ( ($#FitTypes != 0) && ( $Param ne "N0" && $Param ne "NBg" ) ) { if ( ($#FitTypes != 0) && ( $Param ne "No" && $Param ne "NBg" ) ) {
$Param = join( $EMPTY, $Param, "_", "$component" ); $Param = join( $EMPTY, $Param, "_", "$component" );
} }
@ -599,35 +599,35 @@ FUNCTIONS
$Shared = $All{"Sh_$Param"}; $Shared = $All{"Sh_$Param"};
} }
# N0 and NBg Lines # No and NBg Lines
# #
# If you encounter N0 in the parameters list make sure # If you encounter No in the parameters list make sure
# to fill this line for the RUN block. # to fill this line for the RUN block.
if ( $Param_ORG eq "N0" ) { if ( $Param_ORG eq "No" ) {
if ($Shared) { if ($Shared) {
$N0Bg_Line = "norm 1\n"; $NoBg_Line = "norm 1\n";
} }
else { else {
$N0Bg_Line = "norm $PCount\n"; $NoBg_Line = "norm $PCount\n";
} }
# Optional - add lifetime correction for SingleHist fits # Optional - add lifetime correction for SingleHist fits
if ( $All{"ltc"} eq "y" ) { if ( $All{"ltc"} eq "y" ) {
$N0Bg_Line = $N0Bg_Line . "lifetimecorrection\n"; $NoBg_Line = $NoBg_Line . "lifetimecorrection\n";
} }
} }
# If you encounter NBg in the parameters list make sure # If you encounter NBg in the parameters list make sure
# to fill this line for the RUN block. # to fill this line for the RUN block.
elsif ( $Param_ORG eq "NBg" ) { elsif ( $Param_ORG eq "NBg" ) {
if ($Shared) { if ($Shared) {
$N0Bg_Line = $N0Bg_Line . "backgr.fit 2\n"; $NoBg_Line = $NoBg_Line . "backgr.fit 2\n";
} }
else { else {
$N0Bg_Line = $N0Bg_Line . "backgr.fit $PCount\n"; $NoBg_Line = $NoBg_Line . "backgr.fit $PCount\n";
} }
} }
# End of N0 and NBg Lines # End of No and NBg Lines
#################################################################################################### ####################################################################################################
# Start preparing the parameters block # Start preparing the parameters block
@ -641,7 +641,7 @@ FUNCTIONS
} else { } else {
# Parameter is not shared, use map unless it is a single RUN fit # Parameter is not shared, use map unless it is a single RUN fit
# Skip adding to map line in these cases # Skip adding to map line in these cases
if ( $Param ne "N0" && $Param ne "NBg" && ($#RUNS != 0 || $#Hist != 0)) { if ( $Param ne "No" && $Param ne "NBg" && ($#RUNS != 0 || $#Hist != 0)) {
++$nonsh; ++$nonsh;
$Full_T_Block =~ s/$Param_ORG/map$nonsh/; $Full_T_Block =~ s/$Param_ORG/map$nonsh/;
$MAP_Line = join( ' ', $MAP_Line, $PCount ); $MAP_Line = join( ' ', $MAP_Line, $PCount );
@ -657,7 +657,7 @@ FUNCTIONS
# For each defined range we need a block in the RUN-Block # For each defined range we need a block in the RUN-Block
# Also for each histogram in Single Histograms fits # Also for each histogram in Single Histograms fits
# Also for Imaginaryand and Real for RRF fits # Also for Imaginary and and Real for RRF fits
$RUN = $RUNS[ $iRun - 1 ]; $RUN = $RUNS[ $iRun - 1 ];
@ -694,7 +694,7 @@ FUNCTIONS
$Tmp_Hist_Line = $Hist_Lines; $Tmp_Hist_Line = $Hist_Lines;
$Tmp_Hist_Line =~ s/HIST/$Hist/g; $Tmp_Hist_Line =~ s/HIST/$Hist/g;
$Single_RUN = $Single_RUN $Single_RUN = $Single_RUN
. "$RUN_Line\n$Type_Line\n$N0Bg_Line$Tmp_Hist_Line\n$Data_Line\n$MAP_Line\n$FRANGE_Line\n$PAC_Line\n\n"; . "$RUN_Line\n$Type_Line\n$NoBg_Line$Tmp_Hist_Line\n$Data_Line\n$MAP_Line\n$FRANGE_Line\n$PAC_Line\n\n";
# Now add the appropriate values of fit range and packing # Now add the appropriate values of fit range and packing
my $Range_Min = 8; my $Range_Min = 8;
@ -851,8 +851,8 @@ sub CreateTheory {
"generExpo", "Lam Bet", "generExpo", "Lam Bet",
"simpleGss", "Sgm", "simpleGss", "Sgm",
"statGssKT", "Sgm", "statGssKT", "Sgm",
"statGssKTLF", "Frq Sgm", "statGssKTLF", "Frqg Sgm",
"dynGssKTLF", "Frq Sgm Lam", "dynGssKTLF", "Frql Sgm Lam",
"statExpKT", "Lam", "statExpKT", "Lam",
"statExpKTLF", "Frq Aa", "statExpKTLF", "Frq Aa",
"dynExpKTLF", "Frq Aa Lam", "dynExpKTLF", "Frq Aa Lam",
@ -1019,6 +1019,18 @@ sub CreateTheory {
$Parameters = join( $SPACE, $Parameters, $THEORY{'statGssKTLF'} ); $Parameters = join( $SPACE, $Parameters, $THEORY{'statGssKTLF'} );
} }
# Lorentzian or Gaussian KT LF multiplied by stretched exponential
elsif ( $FitType eq "MolMag" ) {
$T_Block = $T_Block . "\n" . "generExpo " . $THEORY{'generExpo'};
$Parameters = join( $SPACE, $Parameters, $THEORY{'generExpo'} );
$T_Block =
$T_Block . "\n" . "statExpKTLF " . $THEORY{'statExpKTLF'};
$Parameters = join( $SPACE, $Parameters, $THEORY{'statExpKTLF'} );
$T_Block =
$T_Block . "\n" . "statGssKTLF " . $THEORY{'statGssKTLF'};
$Parameters = join( $SPACE, $Parameters, $THEORY{'statGssKTLF'} );
}
# Meissner state model # Meissner state model
elsif ( $FitType eq "Meissner" ) { elsif ( $FitType eq "Meissner" ) {
$T_Block = $T_Block . "\n" . "simpleGss " . $THEORY{'simpleGss'}; $T_Block = $T_Block . "\n" . "simpleGss " . $THEORY{'simpleGss'};
@ -1145,8 +1157,8 @@ sub PrepParamTable {
"Asy_min", "0", "Asy_max", "0", "Asy_min", "0", "Asy_max", "0",
"Alpha", "1.0", "dAlpha", "0.01", "Alpha", "1.0", "dAlpha", "0.01",
"Alpha_min", "0", "Alpha_max", "0", "Alpha_min", "0", "Alpha_max", "0",
"N0", "300.0", "dN0", "0.01", "No", "300.0", "dNo", "0.01",
"N0_min", "0", "N0_max", "0", "No_min", "0", "No_max", "0",
"NBg", "30.0", "dNBg", "0.01", "NBg", "30.0", "dNBg", "0.01",
"NBg_min", "0", "NBg_max", "0", "NBg_min", "0", "NBg_max", "0",
"Lam", "1.0", "dLam", "0.01", "Lam", "1.0", "dLam", "0.01",
@ -1281,7 +1293,7 @@ sub PrepParamTable {
my $Parameters=$Paramcomp[$Component-1]; my $Parameters=$Paramcomp[$Component-1];
my @Params = split( /\s+/, $Parameters ); my @Params = split( /\s+/, $Parameters );
if ( $Component == 1 ) { if ( $Component == 1 ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
# This is the counter for parameters of this component # This is the counter for parameters of this component
@ -1293,7 +1305,7 @@ sub PrepParamTable {
# If multiple histograms (sum or difference) take the first histogram only # If multiple histograms (sum or difference) take the first histogram only
($Hist,$tmp) = split(/ /,$Hist); ($Hist,$tmp) = split(/ /,$Hist);
$Param=$Param.$Hist; $Param=$Param.$Hist;
if ( $#FitTypes != 0 && ( $Param_ORG ne "N0" && $Param_ORG ne "NBg" ) ){ if ( $#FitTypes != 0 && ( $Param_ORG ne "No" && $Param_ORG ne "NBg" ) ){
$Param = join( $EMPTY, $Param, "_", "$Component" ); $Param = join( $EMPTY, $Param, "_", "$Component" );
} }
@ -1443,7 +1455,7 @@ sub ExportParams {
my $Parameters=$Paramcomp[$Component-1]; my $Parameters=$Paramcomp[$Component-1];
my @Params = split( /\s+/, $Parameters ); my @Params = split( /\s+/, $Parameters );
if ( $Component == 1 ) { if ( $Component == 1 ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
# This is the counter for parameters of this component # This is the counter for parameters of this component
@ -1453,7 +1465,7 @@ sub ExportParams {
foreach my $Param (@Params) { foreach my $Param (@Params) {
my $Param_ORG = $Param; my $Param_ORG = $Param;
$Param=$Param.$Hist; $Param=$Param.$Hist;
if ( $#FitTypes != 0 && ( $Param_ORG ne "N0" && $Param_ORG ne "NBg" ) ){ if ( $#FitTypes != 0 && ( $Param_ORG ne "No" && $Param_ORG ne "NBg" ) ){
$Param = join( $EMPTY, $Param, "_", "$Component" ); $Param = join( $EMPTY, $Param, "_", "$Component" );
} }

View File

@ -2,6 +2,6 @@
# Copyright 2009 by Zaher Salman and the LEM Group. # Copyright 2009 by Zaher Salman and the LEM Group.
export MUSRBIN=$ROOTSYS/bin/ export MUSRBIN=$ROOTSYS/bin/
export PERLLIB=$HOME/analysis/musrfit/src/external/MuSRFitGUI export PERLLIB=$HOME/LEM/musrfit/src/external/MuSRFitGUI
perl $HOME/analysis/musrfit/src/external/MuSRFitGUI/MuSRFit.pl perl $HOME/LEM/musrfit/src/external/MuSRFitGUI/MuSRFit.pl

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MuSRFit.ui' # Form implementation generated from reading ui file 'MuSRFit.ui'
# #
# Created: Wed Jun 9 23:34:32 2010 # Created: Wed Aug 18 12:51:07 2010
# by: The PerlQt User Interface Compiler (puic) # by: The PerlQt User Interface Compiler (puic)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -1704,7 +1704,7 @@ sub NEW
setName("MuSRFitform" ); setName("MuSRFitform" );
} }
setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) ); setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) );
setMinimumSize(Qt::Size(23, 270) ); setMinimumSize(Qt::Size(21, 275) );
setIcon($image0 ); setIcon($image0 );
setCentralWidget(Qt::Widget(this, "qt_central_widget")); setCentralWidget(Qt::Widget(this, "qt_central_widget"));
@ -3114,9 +3114,10 @@ sub languageChange
FitType2->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Exp") ); FitType2->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Exp") );
FitType2->insertItem( trUtf8("Lorentzian Kubo-Toyabe LF x Str Exp") ); FitType2->insertItem( trUtf8("Lorentzian Kubo-Toyabe LF x Str Exp") );
FitType2->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Str Exp") ); FitType2->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Str Exp") );
FitType2->insertItem( trUtf8("MolMag") );
FitType2->insertItem( trUtf8("Meissner State Model") ); FitType2->insertItem( trUtf8("Meissner State Model") );
FitType2->insertItem( trUtf8("None") ); FitType2->insertItem( trUtf8("None") );
FitType2->setCurrentItem( int(14) ); FitType2->setCurrentItem( int(15) );
TfsLabel->setText( trUtf8("Final Time") ); TfsLabel->setText( trUtf8("Final Time") );
FitType1->clear(); FitType1->clear();
FitType1->insertItem( trUtf8("Exponential") ); FitType1->insertItem( trUtf8("Exponential") );
@ -3132,6 +3133,7 @@ sub languageChange
FitType1->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Exp") ); FitType1->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Exp") );
FitType1->insertItem( trUtf8("Lorentzian Kubo-Toyabe LF x Str Exp") ); FitType1->insertItem( trUtf8("Lorentzian Kubo-Toyabe LF x Str Exp") );
FitType1->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Str Exp") ); FitType1->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Str Exp") );
FitType1->insertItem( trUtf8("MolMag") );
FitType1->insertItem( trUtf8("Meissner State Model") ); FitType1->insertItem( trUtf8("Meissner State Model") );
FitType1->insertItem( trUtf8("None") ); FitType1->insertItem( trUtf8("None") );
BINS->setText( trUtf8("100") ); BINS->setText( trUtf8("100") );
@ -3155,9 +3157,10 @@ sub languageChange
FitType3->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Exp") ); FitType3->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Exp") );
FitType3->insertItem( trUtf8("Lorentzian Kubo-Toyabe LF x Str Exp") ); FitType3->insertItem( trUtf8("Lorentzian Kubo-Toyabe LF x Str Exp") );
FitType3->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Str Exp") ); FitType3->insertItem( trUtf8("Gaussian Kubo-Toyabe LF x Str Exp") );
FitType3->insertItem( trUtf8("MolMag") );
FitType3->insertItem( trUtf8("Meissner State Model") ); FitType3->insertItem( trUtf8("Meissner State Model") );
FitType3->insertItem( trUtf8("None") ); FitType3->insertItem( trUtf8("None") );
FitType3->setCurrentItem( int(14) ); FitType3->setCurrentItem( int(15) );
Comp2Label->setText( trUtf8("Second Component") ); Comp2Label->setText( trUtf8("Second Component") );
FitAsyTypeLabel->setText( trUtf8("Fit type") ); FitAsyTypeLabel->setText( trUtf8("Fit type") );
FitAsyType->clear(); FitAsyType->clear();
@ -3696,8 +3699,9 @@ sub CreateAllInput
10,"GLFExp", 10,"GLFExp",
11,"LLFSExp", 11,"LLFSExp",
12,"GLFSExp", 12,"GLFSExp",
13,"Meissner", 13,"MolMag",
14,"None" 14,"Meissner",
15,"None"
); );
my $FT1=FitType1->currentItem; my $FT1=FitType1->currentItem;
@ -3737,7 +3741,7 @@ sub CreateAllInput
unshift( @Params, "Alpha" ); unshift( @Params, "Alpha" );
} }
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
# This is the counter for parameters of this component # This is the counter for parameters of this component
@ -3750,7 +3754,7 @@ sub CreateAllInput
if ( $All{"FitAsyType"} eq "SingleHist" ) { if ( $All{"FitAsyType"} eq "SingleHist" ) {
$Param=$Param.$Hists[0]; $Param=$Param.$Hists[0];
} }
if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "N0" && $Param ne "NBg" ) ){ if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "No" && $Param ne "NBg" ) ){
$Param = join( "", $Param, "_", $Component); $Param = join( "", $Param, "_", $Component);
} }
@ -3768,6 +3772,7 @@ sub CreateAllInput
$Shared = $ChkBx->isChecked(); $Shared = $ChkBx->isChecked();
} }
$All{"Sh_$Param"}=$Shared; $All{"Sh_$Param"}=$Shared;
print "Sh_$Param=$Shared\n";
$NP++; $NP++;
} }
#Loop on parameters #Loop on parameters
@ -3975,7 +3980,7 @@ sub ActivateShComp
unshift( @Params, "Alpha" ); unshift( @Params, "Alpha" );
} }
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
@ -4261,24 +4266,26 @@ sub InitializeFunctions
my $ParCount=0; my $ParCount=0;
CParamsCombo->clear(); CParamsCombo->clear();
# Possibly use the parameters block to axtract names for the dropdown menu
# this makes sense if we can use fun in map line. Check!
my $Component=1; my $Component=1;
foreach my $FitType (@FitTypes) { foreach my $FitType (@FitTypes) {
my $Parameters=$Paramcomp[$Component-1]; my $Parameters=$Paramcomp[$Component-1];
my @Params = split( /\s+/, $Parameters ); my @Params = split( /\s+/, $Parameters );
# Alpha, N0 and NBg are counted in the parameters # Alpha, No and NBg are counted in the parameters
if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) { if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) {
unshift( @Params, "Alpha" ); unshift( @Params, "Alpha" );
} }
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
# Add list to the constraints drop down menu # Add list to the constraints drop down menu
for (my $i=1; $i<=9;$i++) { for (my $i=1; $i<=9;$i++) {
my $CParam = $Params[$i-1]."_".$Component; my $CParam = $Params[$i-1]."_".$Component;
if ($Params[$i-1] ne "" ) { if ($Params[$i-1] ne "" ) {
if ($Params[$i-1] ne "Alpha" && $Params[$i-1] ne "N0" && $Params[$i-1] ne "NBg") { if ($Params[$i-1] ne "Alpha" && $Params[$i-1] ne "No" && $Params[$i-1] ne "NBg") {
CParamsCombo->insertItem($CParam,-1); CParamsCombo->insertItem($CParam,-1);
$Full_T_Block=~ s/\b$Params[$i-1]\b/$CParam/; $Full_T_Block=~ s/\b$Params[$i-1]\b/$CParam/;
} }

View File

@ -22,8 +22,8 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>23</width> <width>21</width>
<height>270</height> <height>275</height>
</size> </size>
</property> </property>
<property name="caption"> <property name="caption">
@ -456,6 +456,11 @@
<string>Gaussian Kubo-Toyabe LF x Str Exp</string> <string>Gaussian Kubo-Toyabe LF x Str Exp</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>MolMag</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>Meissner State Model</string> <string>Meissner State Model</string>
@ -478,7 +483,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentItem"> <property name="currentItem">
<number>14</number> <number>15</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="QLabel" row="2" column="1">
@ -566,6 +571,11 @@
<string>Gaussian Kubo-Toyabe LF x Str Exp</string> <string>Gaussian Kubo-Toyabe LF x Str Exp</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>MolMag</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>Meissner State Model</string> <string>Meissner State Model</string>
@ -1271,6 +1281,11 @@
<string>Gaussian Kubo-Toyabe LF x Str Exp</string> <string>Gaussian Kubo-Toyabe LF x Str Exp</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>MolMag</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>Meissner State Model</string> <string>Meissner State Model</string>
@ -1293,7 +1308,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="currentItem"> <property name="currentItem">
<number>14</number> <number>15</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="QLabel" row="0" column="1">

View File

@ -320,8 +320,9 @@ void MuSRFitform::CreateAllInput()
10,"GLFExp", 10,"GLFExp",
11,"LLFSExp", 11,"LLFSExp",
12,"GLFSExp", 12,"GLFSExp",
13,"Meissner", 13,"MolMag",
14,"None" 14,"Meissner",
15,"None"
); );
my $FT1=FitType1->currentItem; my $FT1=FitType1->currentItem;
@ -361,7 +362,7 @@ void MuSRFitform::CreateAllInput()
unshift( @Params, "Alpha" ); unshift( @Params, "Alpha" );
} }
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
# This is the counter for parameters of this component # This is the counter for parameters of this component
@ -374,7 +375,7 @@ void MuSRFitform::CreateAllInput()
if ( $All{"FitAsyType"} eq "SingleHist" ) { if ( $All{"FitAsyType"} eq "SingleHist" ) {
$Param=$Param.$Hists[0]; $Param=$Param.$Hists[0];
} }
if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "N0" && $Param ne "NBg" ) ){ if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "No" && $Param ne "NBg" ) ){
$Param = join( "", $Param, "_", $Component); $Param = join( "", $Param, "_", $Component);
} }
@ -591,7 +592,7 @@ void MuSRFitform::ActivateShComp()
unshift( @Params, "Alpha" ); unshift( @Params, "Alpha" );
} }
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
@ -861,24 +862,26 @@ void MuSRFitform::InitializeFunctions()
my $ParCount=0; my $ParCount=0;
CParamsCombo->clear(); CParamsCombo->clear();
# Possibly use the parameters block to axtract names for the dropdown menu
# this makes sense if we can use fun in map line. Check!
my $Component=1; my $Component=1;
foreach my $FitType (@FitTypes) { foreach my $FitType (@FitTypes) {
my $Parameters=$Paramcomp[$Component-1]; my $Parameters=$Paramcomp[$Component-1];
my @Params = split( /\s+/, $Parameters ); my @Params = split( /\s+/, $Parameters );
# Alpha, N0 and NBg are counted in the parameters # Alpha, No and NBg are counted in the parameters
if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) { if ( $Component == 1 && $All{"FitAsyType"} eq "Asymmetry" ) {
unshift( @Params, "Alpha" ); unshift( @Params, "Alpha" );
} }
elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) { elsif ( $Component == 1 && $All{"FitAsyType"} eq "SingleHist" ) {
unshift( @Params, ( "N0", "NBg" ) ); unshift( @Params, ( "No", "NBg" ) );
} }
# Add list to the constraints drop down menu # Add list to the constraints drop down menu
for (my $i=1; $i<=9;$i++) { for (my $i=1; $i<=9;$i++) {
my $CParam = $Params[$i-1]."_".$Component; my $CParam = $Params[$i-1]."_".$Component;
if ($Params[$i-1] ne "" ) { if ($Params[$i-1] ne "" ) {
if ($Params[$i-1] ne "Alpha" && $Params[$i-1] ne "N0" && $Params[$i-1] ne "NBg") { if ($Params[$i-1] ne "Alpha" && $Params[$i-1] ne "No" && $Params[$i-1] ne "NBg") {
CParamsCombo->insertItem($CParam,-1); CParamsCombo->insertItem($CParam,-1);
$Full_T_Block=~ s/\b$Params[$i-1]\b/$CParam/; $Full_T_Block=~ s/\b$Params[$i-1]\b/$CParam/;
} }

View File

@ -4734,7 +4734,7 @@
<action name="ManualFile"/> <action name="ManualFile"/>
<action name="optionsFourier"/> <action name="optionsFourier"/>
<action name="optionsT0"/> <action name="optionsT0"/>
<action name="optionsCustomise"/> <action name="optionsConfigure"/>
</item> </item>
<item text="&amp;Help" name="helpMenu"> <item text="&amp;Help" name="helpMenu">
<action name="helpContentsAction"/> <action name="helpContentsAction"/>
@ -5243,13 +5243,13 @@
</action> </action>
<action> <action>
<property name="name"> <property name="name">
<cstring>optionsCustomise</cstring> <cstring>optionsConfigure</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Customise</string> <string>Configure</string>
</property> </property>
<property name="menuText"> <property name="menuText">
<string>Customise</string> <string>Configure</string>
</property> </property>
</action> </action>
</actions> </actions>
@ -5493,12 +5493,6 @@
<receiver>MuSRFitform</receiver> <receiver>MuSRFitform</receiver>
<slot>AppendToFunctions()</slot> <slot>AppendToFunctions()</slot>
</connection> </connection>
<connection>
<sender>optionsCustomise</sender>
<signal>activated()</signal>
<receiver>MuSRFitform</receiver>
<slot>optionCustromize()</slot>
</connection>
</connections> </connections>
<tabstops> <tabstops>
<tabstop>musrfit_tabs</tabstop> <tabstop>musrfit_tabs</tabstop>
@ -5607,7 +5601,7 @@
<slot>fileBrowse()</slot> <slot>fileBrowse()</slot>
<slot>AppendToFunctions()</slot> <slot>AppendToFunctions()</slot>
<slot>InitializeFunctions()</slot> <slot>InitializeFunctions()</slot>
<slot>optionCustromize()</slot> <slot>optionConfigure()</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

View File

@ -900,7 +900,7 @@ void MuSRFitform::InitializeFunctions()
} }
void MuSRFitform::optionCustromize() void MuSRFitform::optionConfigure()
{ {
use Customize; use Customize;