If Bg and Data bins are empty use musrt0 for defaults.
This commit is contained in:
parent
9e0866a56e
commit
26180566e5
34
src/external/MuSRFitGUI/MSR.pm
vendored
34
src/external/MuSRFitGUI/MSR.pm
vendored
@ -295,28 +295,40 @@ FUNCTIONS
|
|||||||
foreach ("t0","Bg1","Bg2","Data1","Data2") {
|
foreach ("t0","Bg1","Bg2","Data1","Data2") {
|
||||||
$Name = "$_$NHist";
|
$Name = "$_$NHist";
|
||||||
# If empty fill with defaults
|
# If empty fill with defaults
|
||||||
if ($All{$Name} eq $EMPTY) {
|
# if ($All{$Name} eq $EMPTY) {
|
||||||
$All{$Name}=MSR::T0BgData($_,$Hist,$BeamLine);
|
# $All{$Name}=MSR::T0BgData($_,$Hist,$BeamLine);
|
||||||
}
|
# }
|
||||||
|
}
|
||||||
|
# If empty skip lines
|
||||||
|
if ($All{"Bg1$NHist"} ne $EMPTY && $All{"Bg2$NHist"} ne $EMPTY) {
|
||||||
|
$Bg_Line = $Bg_Line." ".$All{"Bg1$NHist"}." ".$All{"Bg2$NHist"};
|
||||||
|
}
|
||||||
|
if ($All{"Data1$NHist"} ne $EMPTY && $All{"Data2$NHist"} ne $EMPTY) {
|
||||||
|
$Data_Line =$Data_Line." ".$All{"Data1$NHist"}." ".$All{"Data2$NHist"};
|
||||||
}
|
}
|
||||||
$Bg_Line = $Bg_Line." ".$All{"Bg1$NHist"}." ".$All{"Bg2$NHist"};
|
|
||||||
$Data_Line =$Data_Line." ".$All{"Data1$NHist"}." ".$All{"Data2$NHist"};
|
|
||||||
if ($All{"t0$NHist"} ne $EMPTY) {
|
if ($All{"t0$NHist"} ne $EMPTY) {
|
||||||
$T0_Line=$T0_Line." ".$All{"Data1$NHist"};
|
$T0_Line=$T0_Line." ".$All{"Data1$NHist"};
|
||||||
}
|
}
|
||||||
$NHist++;
|
$NHist++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Put T0_Line Bg_Line and Data_Line together if not empty
|
||||||
|
my $T0DataBg=$EMPTY;
|
||||||
|
if ($T0_Line ne "t0") {
|
||||||
|
$T0DataBg = $T0DataBg."\n".$T0_Line;
|
||||||
|
}
|
||||||
|
if ($Bg_Line ne "background") {
|
||||||
|
$T0DataBg = $T0DataBg."\n".$Bg_Line;
|
||||||
|
}
|
||||||
|
if ($Data_Line ne "data") {
|
||||||
|
$T0DataBg = $T0DataBg."\n".$Data_Line;
|
||||||
|
}
|
||||||
|
|
||||||
$FRANGE_Line = "fit TINI TFIN";
|
$FRANGE_Line = "fit TINI TFIN";
|
||||||
$PAC_Line = "packing BINNING";
|
$PAC_Line = "packing BINNING";
|
||||||
|
|
||||||
|
|
||||||
if ($T0_Line ne "t0") {
|
|
||||||
$Data_Line= $Data_Line."\n".$T0_Line;
|
|
||||||
}
|
|
||||||
|
|
||||||
$Single_RUN =
|
$Single_RUN =
|
||||||
"$RUN_Line\n$Type_Line\n$Alpha_Line$Hist_Lines\n$Bg_Line\n$Data_Line\n$MAP_Line\n$FRANGE_Line\n$PAC_Line\n\n";
|
"$RUN_Line\n$Type_Line\n$Alpha_Line$Hist_Lines\n$T0DataBg\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;
|
||||||
|
40
src/external/MuSRFitGUI/MuSRFit.ui
vendored
40
src/external/MuSRFitGUI/MuSRFit.ui
vendored
@ -23,7 +23,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>21</width>
|
<width>21</width>
|
||||||
<height>271</height>
|
<height>264</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
<property name="caption">
|
||||||
@ -3428,6 +3428,25 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>t0/Bg</string>
|
<string>t0/Bg</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<widget class="QPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>t0Update</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>450</x>
|
||||||
|
<y>220</y>
|
||||||
|
<width>94</width>
|
||||||
|
<height>27</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Update</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
<widget class="QLayoutWidget">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>layout25</cstring>
|
<cstring>layout25</cstring>
|
||||||
@ -3775,25 +3794,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</hbox>
|
</hbox>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>t0Update</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>450</x>
|
|
||||||
<y>220</y>
|
|
||||||
<width>94</width>
|
|
||||||
<height>27</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Update</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget">
|
<widget class="QWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user