Correct single hist fit in CGI

This commit is contained in:
2010-05-31 15:00:43 +00:00
parent 5d124b3d79
commit 912f1f48e8
5 changed files with 147 additions and 137 deletions

View File

@ -122,7 +122,6 @@ sub CreateMSR {
# First create the THEORY Block
my ($Full_T_Block,$Paramcomp_ref)=MSR::CreateTheory(@FitTypes);
my @Paramcomp = @$Paramcomp_ref;
# Counter for RUNS
@ -147,8 +146,7 @@ sub CreateMSR {
# $shcount is a counter for shared parameters
if ( $#RUNS == 0 ) {
my $shcount = 1;
}
else {
} else {
if ( $All{"Sh_Alpha"} == 1 ) {
my $shcount = 1;
} else {
@ -493,6 +491,7 @@ sub CreateMSRSingleHist {
$RUNSType = 1;
}
# Until here identical to sub CreateMSR
# $shcount is a counter for shared parameters
if ( $#RUNS == 0 && $#Hists == 0) {
my $shcount = 1;
@ -517,6 +516,10 @@ sub CreateMSRSingleHist {
# For a single histogram fit we basically need to repeat this for each hist
# However, "physical" parameters such as Asymmetry, relaxation etc. should
# be the same for all histograms
# We distinguich between sharing among different runs to common parameters
# for different histograms. The first is done in the usual "Sharing" schame,
# while the second has to be done in the functions block. This can be done
# in a consistent, non-confusing algorithm
foreach my $Hist (@Hists) {
# Prepare the Parameters and initial values block

View File

@ -2141,7 +2141,7 @@
</sizepolicy>
</property>
<property name="title">
<string>Shared Parameters</string>
<string>Shared parameters among different runs</string>
</property>
<property name="alignment">
<set>AlignLeft</set>
@ -3007,134 +3007,6 @@
<attribute name="title">
<string>FFT/RRF</string>
</attribute>
<widget class="QGroupBox">
<property name="name">
<cstring>RRFBox</cstring>
</property>
<property name="geometry">
<rect>
<x>6</x>
<y>135</y>
<width>547</width>
<height>125</height>
</rect>
</property>
<property name="title">
<string>RRF</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout35</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>18</y>
<width>265</width>
<height>100</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>5</number>
</property>
<property name="spacing">
<number>5</number>
</property>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1_6_2_2</cstring>
</property>
<property name="text">
<string>Phase</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_6</cstring>
</property>
<property name="text">
<string>Frequency</string>
</property>
</widget>
<widget class="QLabel" row="2" column="2">
<property name="name">
<cstring>textLabel1_6_2_4</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<property name="name">
<cstring>RRFFrq</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<property name="name">
<cstring>textLabel1_6_2_3</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<property name="name">
<cstring>RRFPack</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_6_2</cstring>
</property>
<property name="text">
<string>Packing</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="2">
<item>
<property name="text">
<string>MHz</string>
</property>
</item>
<item>
<property name="text">
<string>kHz</string>
</property>
</item>
<item>
<property name="text">
<string>Mc/s</string>
</property>
</item>
<item>
<property name="text">
<string>G</string>
</property>
</item>
<item>
<property name="text">
<string>T</string>
</property>
</item>
<property name="name">
<cstring>RRFUnits</cstring>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<property name="name">
<cstring>RRFPhase</cstring>
</property>
</widget>
</grid>
</widget>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>FourierBox</cstring>
@ -3148,7 +3020,7 @@
</rect>
</property>
<property name="title">
<string>Fourier</string>
<string>Fourier transform parameters</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
@ -3409,6 +3281,134 @@
</grid>
</widget>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>RRFBox</cstring>
</property>
<property name="geometry">
<rect>
<x>6</x>
<y>135</y>
<width>547</width>
<height>125</height>
</rect>
</property>
<property name="title">
<string>Rotatting reference frame (RRF) parameters</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout35</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>18</y>
<width>265</width>
<height>100</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>5</number>
</property>
<property name="spacing">
<number>5</number>
</property>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1_6_2_2</cstring>
</property>
<property name="text">
<string>Phase</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_6</cstring>
</property>
<property name="text">
<string>Frequency</string>
</property>
</widget>
<widget class="QLabel" row="2" column="2">
<property name="name">
<cstring>textLabel1_6_2_4</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<property name="name">
<cstring>RRFFrq</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<property name="name">
<cstring>textLabel1_6_2_3</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<property name="name">
<cstring>RRFPack</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_6_2</cstring>
</property>
<property name="text">
<string>Packing</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="2">
<item>
<property name="text">
<string>MHz</string>
</property>
</item>
<item>
<property name="text">
<string>kHz</string>
</property>
</item>
<item>
<property name="text">
<string>Mc/s</string>
</property>
</item>
<item>
<property name="text">
<string>G</string>
</property>
</item>
<item>
<property name="text">
<string>T</string>
</property>
</item>
<property name="name">
<cstring>RRFUnits</cstring>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<property name="name">
<cstring>RRFPhase</cstring>
</property>
</widget>
</grid>
</widget>
</widget>
</widget>
<widget class="QWidget">
<property name="name">

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MuSRFit.ui'
#
# Created: Thu Mar 25 16:29:56 2010
# Created: Mon May 31 15:10:55 2010
# by: The PerlQt User Interface Compiler (puic)
#
# WARNING! All changes made in this file will be lost!
@ -3974,12 +3974,13 @@ sub AppendToFunctions
sub ResetFunctions
{
my %All=CreateAllInput();
# Clear drop down parameters menu
# CParamsCombo->clear();
# Then clear the text
ConstraintLine->setText("");
FunctionsBlock->setText("");
# my $Full_T_Block= $All{"Full_T_Block"};
my $Full_T_Block= $All{"Full_T_Block"};
TheoryBlock->setText($Full_T_Block);

View File

@ -824,12 +824,13 @@ void MuSRFitform::AppendToFunctions()
void MuSRFitform::ResetFunctions()
{
my %All=CreateAllInput();
# Clear drop down parameters menu
# CParamsCombo->clear();
# Then clear the text
ConstraintLine->setText("");
FunctionsBlock->setText("");
# my $Full_T_Block= $All{"Full_T_Block"};
my $Full_T_Block= $All{"Full_T_Block"};
TheoryBlock->setText($Full_T_Block);
}

View File

@ -248,7 +248,12 @@ elsif ( $Step == 2 ) {
elsif ( $Step <= 6 && $Step >= 3 ) {
# Then create appropriate file
($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSR(\%AllParameters);
if ($All{"FitAsyType"} eq "SingleHist") {
($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSR(\%AllParameters);
} else {
($Full_T_Block,$Paramcomp_ref)= MSR::CreateMSRSingleHist(\%AllParameters);
}
@Paramcomp = @$Paramcomp_ref;
if ( $Step == 3 ) {