Update to last working version.
This commit is contained in:
69
src/external/MuSRFitGUI/MSR.pm
vendored
69
src/external/MuSRFitGUI/MSR.pm
vendored
@ -30,7 +30,8 @@ my %DBDIR=("LEM","/afs/psi.ch/project/nemu/data/log/",
|
|||||||
"GPD","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
"GPD","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||||
"ALC","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
"ALC","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||||
"HAL","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
"HAL","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||||
"LTF","/afs/psi.ch/project/bulkmusr/olddata/list/");
|
"LTF","/afs/psi.ch/project/bulkmusr/olddata/list/",
|
||||||
|
"ALL","/afs/psi.ch/project/bulkmusr/olddata/list/");
|
||||||
|
|
||||||
# Information available since
|
# Information available since
|
||||||
my %MinYears=("LEM","2001",
|
my %MinYears=("LEM","2001",
|
||||||
@ -56,7 +57,7 @@ sub CreateMSRUni {
|
|||||||
#
|
#
|
||||||
# Input in %All
|
# Input in %All
|
||||||
# Required:
|
# Required:
|
||||||
# $All{"FitType1/2/3"} - Function types, 3 components
|
# $All{"FitTypei"} - Function types, i components
|
||||||
# $All{"LRBF"} - Histograms, comma separated
|
# $All{"LRBF"} - Histograms, comma separated
|
||||||
# $All{"Tis"}
|
# $All{"Tis"}
|
||||||
# $All{"Tfs"}
|
# $All{"Tfs"}
|
||||||
@ -86,10 +87,11 @@ sub CreateMSRUni {
|
|||||||
my $DEBUG = "";
|
my $DEBUG = "";
|
||||||
# Start with empty array
|
# Start with empty array
|
||||||
my @FitTypes = ();
|
my @FitTypes = ();
|
||||||
|
# loop over fitTypes
|
||||||
foreach ($All{"FitType1"},$All{"FitType2"},$All{"FitType3"}) {
|
if (!defined($All{"numComps"})) {$All{"numComps"}=3;}
|
||||||
if ($_ ne "None") {
|
for (my $i=1;$i<=$All{"numComps"};$i++) {
|
||||||
@FitTypes=(@FitTypes,$_);
|
if ( defined($All{"FitType$i"}) &&$All{"FitType$i"} ne "None" ) {
|
||||||
|
push( @FitTypes, $All{"FitType$i"} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -664,6 +666,7 @@ sub CreateTheory {
|
|||||||
"asymmetry", "Asy",
|
"asymmetry", "Asy",
|
||||||
"simplExpo", "Lam",
|
"simplExpo", "Lam",
|
||||||
"generExpo", "Lam Bet",
|
"generExpo", "Lam Bet",
|
||||||
|
"abragam", "Del Lam",
|
||||||
"simpleGss", "Sgm",
|
"simpleGss", "Sgm",
|
||||||
"statGssKT", "Sgm",
|
"statGssKT", "Sgm",
|
||||||
"statGssKTLF", "Frqg Sgm",
|
"statGssKTLF", "Frqg Sgm",
|
||||||
@ -675,10 +678,10 @@ sub CreateTheory {
|
|||||||
"spinGlass", "Lam gam q",
|
"spinGlass", "Lam gam q",
|
||||||
"rdAnisoHf", "Frq Lam",
|
"rdAnisoHf", "Frq Lam",
|
||||||
"TFieldCos", "Phi Frq",
|
"TFieldCos", "Phi Frq",
|
||||||
|
"Bessel", "Phi Frq",
|
||||||
"internFld", "Alp Phi Frq LamT LamL",
|
"internFld", "Alp Phi Frq LamT LamL",
|
||||||
"Bessel", "Phi Frq",
|
"Bessel", "Phi Frq",
|
||||||
"internBsl", "Alp Phi Frq LamT LamL",
|
"internBsl", "Alp Phi Frq LamT LamL",
|
||||||
"abragam", "Sgm gam",
|
|
||||||
"Meissner", "Phi Energy Field DeadLayer Lambda",
|
"Meissner", "Phi Energy Field DeadLayer Lambda",
|
||||||
"skewedGss", "Phi Frq Sgmm Sgmp"
|
"skewedGss", "Phi Frq Sgmm Sgmp"
|
||||||
);
|
);
|
||||||
@ -734,7 +737,7 @@ sub CreateTheory {
|
|||||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
||||||
}
|
}
|
||||||
|
|
||||||
# Oscillationg gaussian
|
# Oscillationg Gaussian
|
||||||
elsif ( $FitType eq "GaussianCos" ) {
|
elsif ( $FitType eq "GaussianCos" ) {
|
||||||
$T_Block = $T_Block . "\n" . "simpleGss " . $THEORY{'simpleGss'};
|
$T_Block = $T_Block . "\n" . "simpleGss " . $THEORY{'simpleGss'};
|
||||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'simpleGss'} );
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'simpleGss'} );
|
||||||
@ -750,14 +753,30 @@ sub CreateTheory {
|
|||||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
||||||
}
|
}
|
||||||
|
|
||||||
# Oscillationg Gaussian
|
# Oscillationg Abragam function
|
||||||
elsif ( $FitType eq "GaussianCos" ) {
|
elsif ( $FitType eq "AbragamCos" ) {
|
||||||
$T_Block = $T_Block . "\n" . "simpelGss " . $THEORY{'simpelGss'};
|
$T_Block = $T_Block . "\n" . "abragam " . $THEORY{'abragam'};
|
||||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'simpleGss'} );
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'abragam'} );
|
||||||
$T_Block = $T_Block . "\n" . "TFieldCos " . $THEORY{'TFieldCos'};
|
$T_Block = $T_Block . "\n" . "TFieldCos " . $THEORY{'TFieldCos'};
|
||||||
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'TFieldCos'} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Oscillationg Bessel Gaussian
|
||||||
|
elsif ( $FitType eq "GaussianBessel" ) {
|
||||||
|
$T_Block = $T_Block . "\n" . "simpleGss " . $THEORY{'simpleGss'};
|
||||||
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'simpleGss'} );
|
||||||
|
$T_Block = $T_Block . "\n" . "Bessel " . $THEORY{'Bessel'};
|
||||||
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'Bessel'} );
|
||||||
|
}
|
||||||
|
|
||||||
|
# Oscillationg Bessel Exponential
|
||||||
|
elsif ( $FitType eq "ExponentialBessel" ) {
|
||||||
|
$T_Block = $T_Block . "\n" . "simplExpo " . $THEORY{'simplExpo'};
|
||||||
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'simplExpo'} );
|
||||||
|
$T_Block = $T_Block . "\n" . "Bessel " . $THEORY{'Bessel'};
|
||||||
|
$Parameters = join( $SPACE, $Parameters, $THEORY{'Bessel'} );
|
||||||
|
}
|
||||||
|
|
||||||
# Static Lorentzian KT
|
# Static Lorentzian KT
|
||||||
elsif ( $FitType eq "SLKT" ) {
|
elsif ( $FitType eq "SLKT" ) {
|
||||||
$T_Block = $T_Block . "\n" . "statExpKT " . $THEORY{'statExpKT'};
|
$T_Block = $T_Block . "\n" . "statExpKT " . $THEORY{'statExpKT'};
|
||||||
@ -1008,6 +1027,14 @@ sub T0BgData {
|
|||||||
my $HistParams=$GPS{$Hists[0]};
|
my $HistParams=$GPS{$Hists[0]};
|
||||||
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||||
}
|
}
|
||||||
|
elsif ($BeamLine eq "GPD") {
|
||||||
|
my $HistParams=$GPD{$Hists[0]};
|
||||||
|
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
my $HistParams=$GPS{$Hists[0]};
|
||||||
|
($RV{"t0"},$RV{"Bg1"},$RV{"Bg2"},$RV{"Data1"},$RV{"Data2"})=split(/,/,$HistParams);
|
||||||
|
}
|
||||||
return $RV{$Name};
|
return $RV{$Name};
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1048,9 +1075,14 @@ sub PrepParamTable {
|
|||||||
my @Hists = split( /,/, $All{"LRBF"} );
|
my @Hists = split( /,/, $All{"LRBF"} );
|
||||||
|
|
||||||
my @FitTypes = ();
|
my @FitTypes = ();
|
||||||
foreach my $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) {
|
# loop over fitTypes
|
||||||
if ( $FitType ne "None" ) { push( @FitTypes, $FitType ); }
|
if (!defined($All{"numComps"})) {$All{"numComps"}=3;}
|
||||||
|
for (my $i=1;$i<=$All{"numComps"};$i++) {
|
||||||
|
if ( defined($All{"FitType$i"}) &&$All{"FitType$i"} ne "None" ) {
|
||||||
|
push( @FitTypes, $All{"FitType$i"} );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Get theory block to determine the size of the table
|
# Get theory block to determine the size of the table
|
||||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
||||||
# For now the line below does not work. Why?
|
# For now the line below does not work. Why?
|
||||||
@ -1240,9 +1272,14 @@ sub ExportParams {
|
|||||||
my @Hists = split( /,/, $All{"LRBF"} );
|
my @Hists = split( /,/, $All{"LRBF"} );
|
||||||
|
|
||||||
my @FitTypes = ();
|
my @FitTypes = ();
|
||||||
foreach my $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) {
|
# loop over fitTypes
|
||||||
if ( $FitType ne "None" ) { push( @FitTypes, $FitType ); }
|
if (!defined($All{"numComps"})) {$All{"numComps"}=3;}
|
||||||
|
for (my $i=1;$i<=$All{"numComps"};$i++) {
|
||||||
|
if ( defined($All{"FitType$i"}) &&$All{"FitType$i"} ne "None" ) {
|
||||||
|
push( @FitTypes, $All{"FitType$i"} );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Get theory block to determine the size of the table
|
# Get theory block to determine the size of the table
|
||||||
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes);
|
||||||
# For now the line below does not work. Why?
|
# For now the line below does not work. Why?
|
||||||
|
Reference in New Issue
Block a user