Added controls on fourier parameters.

This commit is contained in:
salman 2009-08-27 14:02:28 +00:00
parent 90823c9f84
commit 6797878583
4 changed files with 1030 additions and 117 deletions

View File

@ -194,8 +194,10 @@ FITPARAMETER
my @Params = split( /\s+/, $Parameters ); my @Params = split( /\s+/, $Parameters );
# For the first component we need Alpha for Asymmetry fits # For the first component we need Alpha for Asymmetry fits
unshift( @Params, "Alpha" ); if ($component == 1) {
unshift( @Params, "Alpha" );
}
foreach $Param (@Params) { foreach $Param (@Params) {
$Param_ORG = $Param; $Param_ORG = $Param;
if ( ($#FitTypes != 0) && ($Param ne "Alpha") ) { if ( ($#FitTypes != 0) && ($Param ne "Alpha") ) {
@ -361,12 +363,16 @@ FITPARAMETER
$Bg_Line = "background 66000 66500 66000 66500"; $Bg_Line = "background 66000 66500 66000 66500";
$Data_Line = "data 3419 63000 3419 63000"; $Data_Line = "data 3419 63000 3419 63000";
# Omit background and data lines for LTG,GPS and Dolly # Omit background and data lines for LTF,GPS and Dolly
if ( $BeamLine ne "LEM" ) { if ( $BeamLine eq "Dolly" ) {
$Bg_Line = "background 50 250 50 250"; $Bg_Line = "background 50 250 50 250";
$Data_Line = $Data_Line =
"t0 287 284\ndata 297 8000 294 8000"; "t0 287 284\ndata 297 8000 294 8000";
} } elsif ( $BeamLine eq "GPS" ) {
$Bg_Line = "background 40 120 40 120";
$Data_Line = "t0 124 129\ndata 135 8000 135 8000";
# $Data_Line = "data 135 8000 135 8000";
}
$FRANGE_Line = "fit TINI TFIN"; $FRANGE_Line = "fit TINI TFIN";
$PAC_Line = "packing BINNING"; $PAC_Line = "packing BINNING";
@ -443,15 +449,24 @@ runs $RUNS_Line
$PRANGE_Line $PRANGE_Line
$logxy"; $logxy";
if ($All{"FUNITS"} eq "") {$All{"FUNITS"}="MHz";}
if ($All{"FAPODIZATION"} eq "") {$All{"FAPODIZATION"}="STRONG";}
if ($All{"FPLOT"} eq "") {$All{"FPLOT"}="POWER";}
$FOURIER_Block= $FOURIER_Block=
"################################################################### "###################################################################
FOURIER FOURIER
units MHz # units either 'Gauss', 'MHz', or 'Mc/s' units FUNITS # units either 'Gauss', 'MHz', or 'Mc/s'
fourier_power 12 fourier_power 12
apodization STRONG # NONE, WEAK, MEDIUM, STRONG apodization FAPODIZATION # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE plot FPLOT # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase 8.50"; phase 8.50";
$FOURIER_Block=~ s/FUNITS/$All{"FUNITS"}/g;
$FOURIER_Block=~ s/FAPODIZATION/$All{"FAPODIZATION"}/g;
$FOURIER_Block=~ s/FPLOT/$All{"FPLOT"}/g;
# Don't know why but it is needed initially # Don't know why but it is needed initially
$STAT_Block = $STAT_Block =
"############################################################### "###############################################################
@ -796,10 +811,14 @@ FITPARAMETER
$Data_Line = "data 3419 63000"; $Data_Line = "data 3419 63000";
# Omit background and data lines for LTG,GPS and Dolly # Omit background and data lines for LTG,GPS and Dolly
if ( $BeamLine ne "LEM" ) { if ( $BeamLine eq "Dolly" ) {
$Bg_Line = "background 50 250 50 250"; $Bg_Line = "background 50 250 50 250";
$Data_Line = $Data_Line =
"t0 287 284\ndata 297 8000 294 8000"; "t0 287 284\ndata 297 8000 294 8000";
} elsif ( $BeamLine eq "GPS" ) {
$Bg_Line = "background 40 120 40 120";
$Data_Line = "t0 124 129\ndata 135 8000 135 8000";
# $Data_Line = "data 135 8000 135 8000";
} }
# $MAP_Line = "map 0 0 0 0 0 0 0 0 0 0"; # $MAP_Line = "map 0 0 0 0 0 0 0 0 0 0";
@ -881,15 +900,24 @@ runs $RUNS_Line
$PRANGE_Line $PRANGE_Line
$logxy"; $logxy";
if ($All{"FUNITS"} eq "") {$All{"FUNITS"}="MHz";}
if ($All{"FAPODIZATION"} eq "") {$All{"FAPODIZATION"}="STRONG";}
if ($All{"FPLOT"} eq "") {$All{"FPLOT"}="POWER";}
$FOURIER_Block= $FOURIER_Block=
"################################################################### "###################################################################
FOURIER FOURIER
units MHz # units either 'Gauss', 'MHz', or 'Mc/s' units FUNITS # units either 'Gauss', 'MHz', or 'Mc/s'
fourier_power 12 fourier_power 12
apodization STRONG # NONE, WEAK, MEDIUM, STRONG apodization FAPODIZATION # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE plot FPLOT # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase 8.50"; phase 8.50";
$FOURIER_Block=~ s/FUNITS/$All{"FUNITS"}/g;
$FOURIER_Block=~ s/FAPODIZATION/$All{"FAPODIZATION"}/g;
$FOURIER_Block=~ s/FPLOT/$All{"FPLOT"}/g;
# Don't know why but it is needed initially # Don't know why but it is needed initially
$STAT_Block = $STAT_Block =
"############################################################### "###############################################################

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: Thu Aug 27 09:03:25 2009 # Created: Thu Aug 27 15:58:41 2009
# 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!
@ -30,12 +30,14 @@ use Qt::slots
CreateAllInput => [], CreateAllInput => [],
CallMSRCreate => [], CallMSRCreate => [],
UpdateMSRFileInitTable => [], UpdateMSRFileInitTable => [],
ActivateT0Hists => [],
ActivateShComp => [], ActivateShComp => [],
InitializeTab => [], InitializeTab => [],
TabChanged => [], TabChanged => [],
GoFit => [], GoFit => [],
UpdeateTable => []; ShowMuSRT0 => [];
use Qt::attributes qw( use Qt::attributes qw(
textLabel2_2
musrfit_tabs musrfit_tabs
RUNSPage RUNSPage
TITLELabel TITLELabel
@ -102,18 +104,58 @@ use Qt::attributes qw(
ShParam_3_9 ShParam_3_9
InitializationPage InitializationPage
InitParamTable InitParamTable
TableUpdate
FittingPage FittingPage
textMSROutput textMSROutput
TabPage TabPage
ErrorCalc
HESSE
MINOS
Minimization Minimization
MINIMIZE MINIMIZE
MIGRAD MIGRAD
SIMPLEX SIMPLEX
ErrorCalc
HESSE
MINOS
go
FitTextOutput FitTextOutput
go
TabPage_2
FPlot
FApodization
FApodizationLabel
FUnits
FPlotLabel
FUnitsLabel
TabPage_3
groupHist0
textLabel2
textLabel2_2_2_3
textLabel2_2_2
textLabel2_2_2_2
textLabel2_2_2_2_2
groupHist1
t01
Bg11
Bg21
Data11
Data21
groupHist2
t02
Bg12
Bg22
Data12
Data22
groupHist3
t03
Bg13
Bg23
Data13
Data23
groupHist4
t04
Bg14
Bg24
Data14
Data24
ShowT0
MenuBar MenuBar
fileMenu fileMenu
editMenu editMenu
@ -510,6 +552,9 @@ sub NEW
setCentralWidget(Qt::Widget(this, "qt_central_widget")); setCentralWidget(Qt::Widget(this, "qt_central_widget"));
textLabel2_2 = Qt::Label(centralWidget(), "textLabel2_2");
textLabel2_2->setGeometry( Qt::Rect(13, 78, 55, 19) );
musrfit_tabs = Qt::TabWidget(centralWidget(), "musrfit_tabs"); musrfit_tabs = Qt::TabWidget(centralWidget(), "musrfit_tabs");
musrfit_tabs->setEnabled( 1 ); musrfit_tabs->setEnabled( 1 );
musrfit_tabs->setGeometry( Qt::Rect(5, 0, 560, 400) ); musrfit_tabs->setGeometry( Qt::Rect(5, 0, 560, 400) );
@ -830,7 +875,7 @@ sub NEW
InitParamTable->horizontalHeader()->setLabel(InitParamTable->numCols() - 1, trUtf8("Min")); InitParamTable->horizontalHeader()->setLabel(InitParamTable->numCols() - 1, trUtf8("Min"));
InitParamTable->setNumCols(InitParamTable->numCols() + 1); InitParamTable->setNumCols(InitParamTable->numCols() + 1);
InitParamTable->horizontalHeader()->setLabel(InitParamTable->numCols() - 1, trUtf8("Max")); InitParamTable->horizontalHeader()->setLabel(InitParamTable->numCols() - 1, trUtf8("Max"));
InitParamTable->setGeometry( Qt::Rect(5, 0, 545, 560) ); InitParamTable->setGeometry( Qt::Rect(5, 5, 545, 325) );
InitParamTable->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, InitParamTable->sizePolicy()->hasHeightForWidth()) ); InitParamTable->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, InitParamTable->sizePolicy()->hasHeightForWidth()) );
InitParamTable->setMaximumSize( Qt::Size(32767, 32767) ); InitParamTable->setMaximumSize( Qt::Size(32767, 32767) );
InitParamTable->setFocusPolicy( &Qt::Table::TabFocus() ); InitParamTable->setFocusPolicy( &Qt::Table::TabFocus() );
@ -846,6 +891,9 @@ sub NEW
InitParamTable->setShowGrid( 1 ); InitParamTable->setShowGrid( 1 );
InitParamTable->setRowMovingEnabled( 0 ); InitParamTable->setRowMovingEnabled( 0 );
InitParamTable->setFocusStyle( &Qt::Table::SpreadSheet() ); InitParamTable->setFocusStyle( &Qt::Table::SpreadSheet() );
TableUpdate = Qt::PushButton(InitializationPage, "TableUpdate");
TableUpdate->setGeometry( Qt::Rect(435, 335, 115, 28) );
musrfit_tabs->insertTab( InitializationPage, "" ); musrfit_tabs->insertTab( InitializationPage, "" );
FittingPage = Qt::Widget(musrfit_tabs, "FittingPage"); FittingPage = Qt::Widget(musrfit_tabs, "FittingPage");
@ -857,6 +905,20 @@ sub NEW
TabPage = Qt::Widget(musrfit_tabs, "TabPage"); TabPage = Qt::Widget(musrfit_tabs, "TabPage");
ErrorCalc = Qt::ButtonGroup(TabPage, "ErrorCalc");
ErrorCalc->setGeometry( Qt::Rect(223, 11, 211, 125) );
ErrorCalc->setAlignment( int(&Qt::ButtonGroup::AlignTop) );
ErrorCalc->setExclusive( 1 );
ErrorCalc->setRadioButtonExclusive( 1 );
ErrorCalc->setProperty( "selectedId", Qt::Variant(int(0) ) );
HESSE = Qt::RadioButton(ErrorCalc, "HESSE");
HESSE->setGeometry( Qt::Rect(19, 30, 69, 22) );
HESSE->setChecked( 1 );
MINOS = Qt::RadioButton(ErrorCalc, "MINOS");
MINOS->setGeometry( Qt::Rect(19, 59, 69, 22) );
Minimization = Qt::ButtonGroup(TabPage, "Minimization"); Minimization = Qt::ButtonGroup(TabPage, "Minimization");
Minimization->setGeometry( Qt::Rect(6, 11, 211, 125) ); Minimization->setGeometry( Qt::Rect(6, 11, 211, 125) );
Minimization->setExclusive( 1 ); Minimization->setExclusive( 1 );
@ -873,30 +935,181 @@ sub NEW
SIMPLEX = Qt::RadioButton(Minimization, "SIMPLEX"); SIMPLEX = Qt::RadioButton(Minimization, "SIMPLEX");
SIMPLEX->setGeometry( Qt::Rect(16, 88, 83, 22) ); SIMPLEX->setGeometry( Qt::Rect(16, 88, 83, 22) );
ErrorCalc = Qt::ButtonGroup(TabPage, "ErrorCalc"); FitTextOutput = Qt::TextEdit(TabPage, "FitTextOutput");
ErrorCalc->setGeometry( Qt::Rect(223, 11, 211, 125) ); FitTextOutput->setGeometry( Qt::Rect(5, 140, 545, 225) );
ErrorCalc->setAlignment( int(&Qt::ButtonGroup::AlignTop) ); FitTextOutput->setOverwriteMode( 1 );
ErrorCalc->setExclusive( 1 );
ErrorCalc->setRadioButtonExclusive( 1 );
ErrorCalc->setProperty( "selectedId", Qt::Variant(int(0) ) );
HESSE = Qt::RadioButton(ErrorCalc, "HESSE");
HESSE->setGeometry( Qt::Rect(19, 30, 69, 22) );
HESSE->setChecked( 1 );
MINOS = Qt::RadioButton(ErrorCalc, "MINOS");
MINOS->setGeometry( Qt::Rect(19, 59, 69, 22) );
go = Qt::PushButton(TabPage, "go"); go = Qt::PushButton(TabPage, "go");
go->setGeometry( Qt::Rect(440, 15, 111, 31) ); go->setGeometry( Qt::Rect(440, 15, 111, 31) );
go->setAutoDefault( 0 ); go->setAutoDefault( 0 );
go->setDefault( 1 ); go->setDefault( 1 );
FitTextOutput = Qt::TextEdit(TabPage, "FitTextOutput");
FitTextOutput->setGeometry( Qt::Rect(5, 140, 545, 225) );
FitTextOutput->setOverwriteMode( 1 );
musrfit_tabs->insertTab( TabPage, "" ); musrfit_tabs->insertTab( TabPage, "" );
TabPage_2 = Qt::Widget(musrfit_tabs, "TabPage_2");
my $LayoutWidget_5 = Qt::Widget(TabPage_2, '$LayoutWidget_5');
$LayoutWidget_5->setGeometry( Qt::Rect(8, 18, 225, 92) );
my $layout11 = Qt::GridLayout($LayoutWidget_5, 1, 1, 11, 6, '$layout11');
FPlot = Qt::ComboBox(0, $LayoutWidget_5, "FPlot");
FPlot->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, FPlot->sizePolicy()->hasHeightForWidth()) );
$layout11->addWidget(FPlot, 2, 1);
FApodization = Qt::ComboBox(0, $LayoutWidget_5, "FApodization");
FApodization->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, FApodization->sizePolicy()->hasHeightForWidth()) );
$layout11->addWidget(FApodization, 1, 1);
FApodizationLabel = Qt::Label($LayoutWidget_5, "FApodizationLabel");
$layout11->addWidget(FApodizationLabel, 1, 0);
FUnits = Qt::ComboBox(0, $LayoutWidget_5, "FUnits");
FUnits->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, FUnits->sizePolicy()->hasHeightForWidth()) );
$layout11->addWidget(FUnits, 0, 1);
FPlotLabel = Qt::Label($LayoutWidget_5, "FPlotLabel");
$layout11->addWidget(FPlotLabel, 2, 0);
FUnitsLabel = Qt::Label($LayoutWidget_5, "FUnitsLabel");
$layout11->addWidget(FUnitsLabel, 0, 0);
musrfit_tabs->insertTab( TabPage_2, "" );
TabPage_3 = Qt::Widget(musrfit_tabs, "TabPage_3");
my $LayoutWidget_6 = Qt::Widget(TabPage_3, '$LayoutWidget_6');
$LayoutWidget_6->setGeometry( Qt::Rect(7, 5, 540, 180) );
my $layout27 = Qt::HBoxLayout($LayoutWidget_6, 0, 6, '$layout27');
groupHist0 = Qt::GroupBox($LayoutWidget_6, "groupHist0");
groupHist0->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, groupHist0->sizePolicy()->hasHeightForWidth()) );
groupHist0->setMinimumSize( Qt::Size(0, 0) );
my $LayoutWidget_7 = Qt::Widget(groupHist0, '$LayoutWidget_7');
$LayoutWidget_7->setGeometry( Qt::Rect(5, 28, 100, 135) );
my $layout16_2 = Qt::VBoxLayout($LayoutWidget_7, 11, 0, '$layout16_2');
textLabel2 = Qt::Label($LayoutWidget_7, "textLabel2");
$layout16_2->addWidget(textLabel2);
textLabel2_2_2_3 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_3");
$layout16_2->addWidget(textLabel2_2_2_3);
textLabel2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2");
$layout16_2->addWidget(textLabel2_2_2);
textLabel2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2");
$layout16_2->addWidget(textLabel2_2_2_2);
textLabel2_2_2_2_2 = Qt::Label($LayoutWidget_7, "textLabel2_2_2_2_2");
$layout16_2->addWidget(textLabel2_2_2_2_2);
$layout27->addWidget(groupHist0);
groupHist1 = Qt::GroupBox($LayoutWidget_6, "groupHist1");
groupHist1->setFrameShadow( &Qt::GroupBox::Plain() );
my $LayoutWidget_8 = Qt::Widget(groupHist1, '$LayoutWidget_8');
$LayoutWidget_8->setGeometry( Qt::Rect(8, 17, 75, 150) );
my $layout18_2 = Qt::VBoxLayout($LayoutWidget_8, 0, 0, '$layout18_2');
t01 = Qt::LineEdit($LayoutWidget_8, "t01");
$layout18_2->addWidget(t01);
Bg11 = Qt::LineEdit($LayoutWidget_8, "Bg11");
$layout18_2->addWidget(Bg11);
Bg21 = Qt::LineEdit($LayoutWidget_8, "Bg21");
$layout18_2->addWidget(Bg21);
Data11 = Qt::LineEdit($LayoutWidget_8, "Data11");
$layout18_2->addWidget(Data11);
Data21 = Qt::LineEdit($LayoutWidget_8, "Data21");
$layout18_2->addWidget(Data21);
$layout27->addWidget(groupHist1);
groupHist2 = Qt::GroupBox($LayoutWidget_6, "groupHist2");
groupHist2->setEnabled( 1 );
groupHist2->setFrameShadow( &Qt::GroupBox::Plain() );
my $LayoutWidget_9 = Qt::Widget(groupHist2, '$LayoutWidget_9');
$LayoutWidget_9->setGeometry( Qt::Rect(8, 17, 75, 150) );
my $layout18_2_2 = Qt::VBoxLayout($LayoutWidget_9, 0, 0, '$layout18_2_2');
t02 = Qt::LineEdit($LayoutWidget_9, "t02");
$layout18_2_2->addWidget(t02);
Bg12 = Qt::LineEdit($LayoutWidget_9, "Bg12");
$layout18_2_2->addWidget(Bg12);
Bg22 = Qt::LineEdit($LayoutWidget_9, "Bg22");
$layout18_2_2->addWidget(Bg22);
Data12 = Qt::LineEdit($LayoutWidget_9, "Data12");
$layout18_2_2->addWidget(Data12);
Data22 = Qt::LineEdit($LayoutWidget_9, "Data22");
$layout18_2_2->addWidget(Data22);
$layout27->addWidget(groupHist2);
groupHist3 = Qt::GroupBox($LayoutWidget_6, "groupHist3");
groupHist3->setEnabled( 1 );
groupHist3->setFrameShadow( &Qt::GroupBox::Plain() );
my $LayoutWidget_10 = Qt::Widget(groupHist3, '$LayoutWidget_10');
$LayoutWidget_10->setGeometry( Qt::Rect(8, 17, 75, 150) );
my $layout18_3 = Qt::VBoxLayout($LayoutWidget_10, 0, 0, '$layout18_3');
t03 = Qt::LineEdit($LayoutWidget_10, "t03");
$layout18_3->addWidget(t03);
Bg13 = Qt::LineEdit($LayoutWidget_10, "Bg13");
$layout18_3->addWidget(Bg13);
Bg23 = Qt::LineEdit($LayoutWidget_10, "Bg23");
$layout18_3->addWidget(Bg23);
Data13 = Qt::LineEdit($LayoutWidget_10, "Data13");
$layout18_3->addWidget(Data13);
Data23 = Qt::LineEdit($LayoutWidget_10, "Data23");
$layout18_3->addWidget(Data23);
$layout27->addWidget(groupHist3);
groupHist4 = Qt::GroupBox($LayoutWidget_6, "groupHist4");
groupHist4->setEnabled( 1 );
groupHist4->setFrameShadow( &Qt::GroupBox::Plain() );
my $LayoutWidget_11 = Qt::Widget(groupHist4, '$LayoutWidget_11');
$LayoutWidget_11->setGeometry( Qt::Rect(8, 17, 75, 150) );
my $layout18_4 = Qt::VBoxLayout($LayoutWidget_11, 0, 0, '$layout18_4');
t04 = Qt::LineEdit($LayoutWidget_11, "t04");
$layout18_4->addWidget(t04);
Bg14 = Qt::LineEdit($LayoutWidget_11, "Bg14");
$layout18_4->addWidget(Bg14);
Bg24 = Qt::LineEdit($LayoutWidget_11, "Bg24");
$layout18_4->addWidget(Bg24);
Data14 = Qt::LineEdit($LayoutWidget_11, "Data14");
$layout18_4->addWidget(Data14);
Data24 = Qt::LineEdit($LayoutWidget_11, "Data24");
$layout18_4->addWidget(Data24);
$layout27->addWidget(groupHist4);
ShowT0 = Qt::PushButton(TabPage_3, "ShowT0");
ShowT0->setGeometry( Qt::Rect(435, 190, 111, 31) );
ShowT0->setAutoDefault( 0 );
ShowT0->setDefault( 1 );
musrfit_tabs->insertTab( TabPage_3, "" );
fileNewAction= Qt::Action(this, "fileNewAction"); fileNewAction= Qt::Action(this, "fileNewAction");
fileNewAction->setIconSet( Qt::IconSet($image1) ); fileNewAction->setIconSet( Qt::IconSet($image1) );
fileOpenAction= Qt::Action(this, "fileOpenAction"); fileOpenAction= Qt::Action(this, "fileOpenAction");
@ -1009,7 +1222,8 @@ sub NEW
Qt::Object::connect(fileChangeDirAction, SIGNAL "activated()", this, SLOT "fileChangeDir()"); Qt::Object::connect(fileChangeDirAction, SIGNAL "activated()", this, SLOT "fileChangeDir()");
Qt::Object::connect(musrfit_tabs, SIGNAL "selected(const QString&)", this, SLOT "TabChanged()"); Qt::Object::connect(musrfit_tabs, SIGNAL "selected(const QString&)", this, SLOT "TabChanged()");
Qt::Object::connect(go, SIGNAL "clicked()", this, SLOT "GoFit()"); Qt::Object::connect(go, SIGNAL "clicked()", this, SLOT "GoFit()");
Qt::Object::connect(InitParamTable, SIGNAL "valueChanged(int,int)", this, SLOT "UpdateMSRFileInitTable()"); Qt::Object::connect(TableUpdate, SIGNAL "clicked()", this, SLOT "CallMSRCreate()");
Qt::Object::connect(ShowT0, SIGNAL "clicked()", this, SLOT "ShowMuSRT0()");
setTabOrder(musrfit_tabs, TITLE); setTabOrder(musrfit_tabs, TITLE);
setTabOrder(TITLE, FILENAME); setTabOrder(TITLE, FILENAME);
@ -1059,6 +1273,7 @@ sub languageChange
{ {
setCaption(trUtf8("MuSRFit GUI") ); setCaption(trUtf8("MuSRFit GUI") );
setIconText(trUtf8("MuSRFitGUI") ); setIconText(trUtf8("MuSRFitGUI") );
textLabel2_2->setText( trUtf8("Bg1") );
TITLELabel->setText( trUtf8("Enter the label (defaul is run title from the first run)") ); TITLELabel->setText( trUtf8("Enter the label (defaul is run title from the first run)") );
TITLE->setText( trUtf8("","Title line for MSR file (optional)") ); TITLE->setText( trUtf8("","Title line for MSR file (optional)") );
Qt::ToolTip::add(TITLE, trUtf8("Title line for MSR file (optional)")); Qt::ToolTip::add(TITLE, trUtf8("Title line for MSR file (optional)"));
@ -1184,17 +1399,49 @@ sub languageChange
InitParamTable->horizontalHeader()->setLabel( 1, trUtf8("Error") ); InitParamTable->horizontalHeader()->setLabel( 1, trUtf8("Error") );
InitParamTable->horizontalHeader()->setLabel( 2, trUtf8("Min") ); InitParamTable->horizontalHeader()->setLabel( 2, trUtf8("Min") );
InitParamTable->horizontalHeader()->setLabel( 3, trUtf8("Max") ); InitParamTable->horizontalHeader()->setLabel( 3, trUtf8("Max") );
TableUpdate->setText( trUtf8("Update") );
musrfit_tabs->changeTab( InitializationPage, trUtf8("Initialization") ); musrfit_tabs->changeTab( InitializationPage, trUtf8("Initialization") );
musrfit_tabs->changeTab( FittingPage, trUtf8("MSR File") ); musrfit_tabs->changeTab( FittingPage, trUtf8("MSR File") );
ErrorCalc->setTitle( trUtf8("Error Calculation") );
HESSE->setText( trUtf8("Hesse") );
MINOS->setText( trUtf8("Minos") );
Minimization->setTitle( trUtf8("Minimization") ); Minimization->setTitle( trUtf8("Minimization") );
MINIMIZE->setText( trUtf8("Minimize") ); MINIMIZE->setText( trUtf8("Minimize") );
MIGRAD->setText( trUtf8("Migrad") ); MIGRAD->setText( trUtf8("Migrad") );
SIMPLEX->setText( trUtf8("Simplex") ); SIMPLEX->setText( trUtf8("Simplex") );
ErrorCalc->setTitle( trUtf8("Error Calculation") );
HESSE->setText( trUtf8("Hesse") );
MINOS->setText( trUtf8("Minos") );
go->setText( trUtf8("Fit") ); go->setText( trUtf8("Fit") );
musrfit_tabs->changeTab( TabPage, trUtf8("Fitting") ); musrfit_tabs->changeTab( TabPage, trUtf8("Fitting") );
FPlot->clear();
FPlot->insertItem( trUtf8("power") );
FPlot->insertItem( trUtf8("real") );
FPlot->insertItem( trUtf8("imag") );
FPlot->insertItem( trUtf8("real_and_imag") );
FPlot->insertItem( trUtf8("phase") );
FApodization->clear();
FApodization->insertItem( trUtf8("NONE") );
FApodization->insertItem( trUtf8("WEAK") );
FApodization->insertItem( trUtf8("MEDIUM") );
FApodization->insertItem( trUtf8("STRONG") );
FApodizationLabel->setText( trUtf8("Apodization") );
FUnits->clear();
FUnits->insertItem( trUtf8("MHz") );
FUnits->insertItem( trUtf8("Gauss") );
FUnits->insertItem( trUtf8("Mc/s") );
FPlotLabel->setText( trUtf8("Plot") );
FUnitsLabel->setText( trUtf8("Units") );
musrfit_tabs->changeTab( TabPage_2, trUtf8("Fourier") );
groupHist0->setTitle( undef );
textLabel2->setText( trUtf8("t0") );
textLabel2_2_2_3->setText( trUtf8("Bg1") );
textLabel2_2_2->setText( trUtf8("Bg2") );
textLabel2_2_2_2->setText( trUtf8("Data 1") );
textLabel2_2_2_2_2->setText( trUtf8("Data 2") );
groupHist1->setTitle( trUtf8("Hist1") );
groupHist2->setTitle( trUtf8("Hist2") );
groupHist3->setTitle( trUtf8("Hist3") );
groupHist4->setTitle( trUtf8("Hist4") );
ShowT0->setText( trUtf8("Show") );
musrfit_tabs->changeTab( TabPage_3, trUtf8("t0/Bg Bins") );
fileNewAction->setText( trUtf8("&New") ); fileNewAction->setText( trUtf8("&New") );
fileNewAction->setMenuText( trUtf8("&New") ); fileNewAction->setMenuText( trUtf8("&New") );
fileNewAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+N") ) ); fileNewAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+N") ) );
@ -1395,6 +1642,7 @@ sub CreateAllInput
# TODO: Need to deliver shared parameters also # TODO: Need to deliver shared parameters also
my %All=(); my %All=();
# From RUNS Tab
$All{"TITLE"}= TITLE->text; $All{"TITLE"}= TITLE->text;
$All{"FILENAME"}= FILENAME->text; $All{"FILENAME"}= FILENAME->text;
$All{"RunNumbers"} = RunNumbers->text; $All{"RunNumbers"} = RunNumbers->text;
@ -1409,6 +1657,11 @@ sub CreateAllInput
my @RUNS = split( /,/, $All{"RunNumbers"} ); my @RUNS = split( /,/, $All{"RunNumbers"} );
my @Hists = split(/,/, $All{"LRBF"} ); my @Hists = split(/,/, $All{"LRBF"} );
# From Fourier Tab
$All{"FUNITS"}= FUnits->currentText;
$All{"FAPODIZATION"}= FApodization->currentText;
$All{"FPLOT"}= FPlot->currentText;
# Construct fittypes that can be understood by MSR.pm # Construct fittypes that can be understood by MSR.pm
my %FTs=(0,"Exponential", my %FTs=(0,"Exponential",
1,"Gaussian", 1,"Gaussian",
@ -1488,7 +1741,9 @@ sub CreateAllInput
foreach my $Param (@Params) { foreach my $Param (@Params) {
my $Param_ORG = $Param; my $Param_ORG = $Param;
# TODO: I need to take care of single hist fits here # TODO: I need to take care of single hist fits here
if ( $All{"FitAsyType"} eq "SingleHist" ) { $Param=$Param.$Hists[0]; } if ( $All{"FitAsyType"} eq "SingleHist" ) {
$Param=$Param.$Hists[0];
}
if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "N0" && $Param ne "NBg" ) ){ if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "N0" && $Param ne "NBg" ) ){
$Param = join( "", $Param, "_", $Component); $Param = join( "", $Param, "_", $Component);
} }
@ -1599,6 +1854,32 @@ sub UpdateMSRFileInitTable
} }
return; return;
}
sub ActivateT0Hists
{
my %All=CreateAllInput();
my @Hists = split(/,/, $All{"LRBF"} );
my $HistBox = "";
for (my $iHist=1; $iHist<=4; $iHist++) {
$HistBox="groupHist$iHist";
my $HistBoxHandle = child($HistBox);
if ($iHist<=$#Hists+1) {
# Activate this histogram box
$HistBoxHandle->setHidden(0);
$HistBoxHandle->setEnabled(1);
$HistBoxHandle->setTitle("Hist # $Hists[$iHist-1]");
} else {
# Deactivate this histogram box
$HistBoxHandle->setHidden(1);
$HistBoxHandle->setEnabled(0);
}
}
# TODO: Set default values
} }
sub ActivateShComp sub ActivateShComp
@ -1850,6 +2131,8 @@ sub TabChanged
ActivateShComp(); ActivateShComp();
InitializeTab(); InitializeTab();
UpdateMSRFileInitTable(); UpdateMSRFileInitTable();
# And also setup T0 and Bg bins
ActivateT0Hists();
} }
@ -1879,9 +2162,11 @@ sub GoFit
} }
sub UpdeateTable sub ShowMuSRT0
{ {
print "MuSRFitform->UpdeateTable(): Not implemented yet.\n";
# Create MSR file and then run musrt0
} }
1; 1;

View File

@ -35,6 +35,22 @@
<property name="iconText"> <property name="iconText">
<string>MuSRFitGUI</string> <string>MuSRFitGUI</string>
</property> </property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="geometry">
<rect>
<x>13</x>
<y>78</y>
<width>55</width>
<height>19</height>
</rect>
</property>
<property name="text">
<string>Bg1</string>
</property>
</widget>
<widget class="QTabWidget"> <widget class="QTabWidget">
<property name="name"> <property name="name">
<cstring>musrfit_tabs</cstring> <cstring>musrfit_tabs</cstring>
@ -1446,9 +1462,9 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>5</x> <x>5</x>
<y>0</y> <y>5</y>
<width>545</width> <width>545</width>
<height>560</height> <height>325</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -1505,6 +1521,22 @@
<enum>SpreadSheet</enum> <enum>SpreadSheet</enum>
</property> </property>
</widget> </widget>
<widget class="QPushButton">
<property name="name">
<cstring>TableUpdate</cstring>
</property>
<property name="geometry">
<rect>
<x>435</x>
<y>335</y>
<width>115</width>
<height>28</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">
@ -1537,6 +1569,69 @@
<attribute name="title"> <attribute name="title">
<string>Fitting</string> <string>Fitting</string>
</attribute> </attribute>
<widget class="QButtonGroup">
<property name="name">
<cstring>ErrorCalc</cstring>
</property>
<property name="geometry">
<rect>
<x>223</x>
<y>11</y>
<width>211</width>
<height>125</height>
</rect>
</property>
<property name="title">
<string>Error Calculation</string>
</property>
<property name="alignment">
<set>AlignTop</set>
</property>
<property name="exclusive">
<bool>true</bool>
</property>
<property name="radioButtonExclusive">
<bool>true</bool>
</property>
<property name="selectedId" stdset="0">
<number>0</number>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>HESSE</cstring>
</property>
<property name="geometry">
<rect>
<x>19</x>
<y>30</y>
<width>69</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Hesse</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>MINOS</cstring>
</property>
<property name="geometry">
<rect>
<x>19</x>
<y>59</y>
<width>69</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Minos</string>
</property>
</widget>
</widget>
<widget class="QButtonGroup"> <widget class="QButtonGroup">
<property name="name"> <property name="name">
<cstring>Minimization</cstring> <cstring>Minimization</cstring>
@ -1613,68 +1708,21 @@
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="QTextEdit">
<property name="name"> <property name="name">
<cstring>ErrorCalc</cstring> <cstring>FitTextOutput</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>223</x> <x>5</x>
<y>11</y> <y>140</y>
<width>211</width> <width>545</width>
<height>125</height> <height>225</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="overwriteMode">
<string>Error Calculation</string>
</property>
<property name="alignment">
<set>AlignTop</set>
</property>
<property name="exclusive">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="radioButtonExclusive">
<bool>true</bool>
</property>
<property name="selectedId" stdset="0">
<number>0</number>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>HESSE</cstring>
</property>
<property name="geometry">
<rect>
<x>19</x>
<y>30</y>
<width>69</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Hesse</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>MINOS</cstring>
</property>
<property name="geometry">
<rect>
<x>19</x>
<y>59</y>
<width>69</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Minos</string>
</property>
</widget>
</widget> </widget>
<widget class="QPushButton"> <widget class="QPushButton">
<property name="name"> <property name="name">
@ -1698,19 +1746,535 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QTextEdit"> </widget>
<widget class="QWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
<attribute name="title">
<string>Fourier</string>
</attribute>
<widget class="QLayoutWidget">
<property name="name"> <property name="name">
<cstring>FitTextOutput</cstring> <cstring>layout11</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>5</x> <x>8</x>
<y>140</y> <y>18</y>
<width>545</width> <width>225</width>
<height>225</height> <height>92</height>
</rect> </rect>
</property> </property>
<property name="overwriteMode"> <grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QComboBox" row="2" column="1">
<item>
<property name="text">
<string>power</string>
</property>
</item>
<item>
<property name="text">
<string>real</string>
</property>
</item>
<item>
<property name="text">
<string>imag</string>
</property>
</item>
<item>
<property name="text">
<string>real_and_imag</string>
</property>
</item>
<item>
<property name="text">
<string>phase</string>
</property>
</item>
<property name="name">
<cstring>FPlot</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<item>
<property name="text">
<string>STRONG</string>
</property>
</item>
<item>
<property name="text">
<string>MEDIUM</string>
</property>
</item>
<item>
<property name="text">
<string>WEAK</string>
</property>
</item>
<item>
<property name="text">
<string>NONE</string>
</property>
</item>
<property name="name">
<cstring>FApodization</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>FApodizationLabel</cstring>
</property>
<property name="text">
<string>Apodization</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="1">
<item>
<property name="text">
<string>MHz</string>
</property>
</item>
<item>
<property name="text">
<string>Gauss</string>
</property>
</item>
<item>
<property name="text">
<string>Mc/s</string>
</property>
</item>
<property name="name">
<cstring>FUnits</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<property name="name">
<cstring>FPlotLabel</cstring>
</property>
<property name="text">
<string>Plot</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>FUnitsLabel</cstring>
</property>
<property name="text">
<string>Units</string>
</property>
</widget>
</grid>
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
<attribute name="title">
<string>t0/Bg Bins</string>
</attribute>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout27</cstring>
</property>
<property name="geometry">
<rect>
<x>7</x>
<y>5</y>
<width>540</width>
<height>180</height>
</rect>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>groupHist0</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="title">
<string></string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout16_2</cstring>
</property>
<property name="geometry">
<rect>
<x>5</x>
<y>28</y>
<width>100</width>
<height>135</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed_2</cstring>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
<string>t0</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2_2_3</cstring>
</property>
<property name="text">
<string>Bg1</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
<property name="text">
<string>Bg2</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2_2_2</cstring>
</property>
<property name="text">
<string>Data 1</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2_2_2_2</cstring>
</property>
<property name="text">
<string>Data 2</string>
</property>
</widget>
</vbox>
</widget>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupHist1</cstring>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="title">
<string>Hist1</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout18</cstring>
</property>
<property name="geometry">
<rect>
<x>8</x>
<y>17</y>
<width>75</width>
<height>150</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLineEdit">
<property name="name">
<cstring>t01</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg11</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg21</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data11</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data21</cstring>
</property>
</widget>
</vbox>
</widget>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupHist2</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="title">
<string>Hist2</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout18_2</cstring>
</property>
<property name="geometry">
<rect>
<x>8</x>
<y>17</y>
<width>75</width>
<height>150</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed_2</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLineEdit">
<property name="name">
<cstring>t02</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg12</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg22</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data12</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data22</cstring>
</property>
</widget>
</vbox>
</widget>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupHist3</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="title">
<string>Hist3</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout18_3</cstring>
</property>
<property name="geometry">
<rect>
<x>8</x>
<y>17</y>
<width>75</width>
<height>150</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed_2</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLineEdit">
<property name="name">
<cstring>t03</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg13</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg23</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data13</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data23</cstring>
</property>
</widget>
</vbox>
</widget>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupHist4</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="title">
<string>Hist4</string>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout18_4</cstring>
</property>
<property name="geometry">
<rect>
<x>8</x>
<y>17</y>
<width>75</width>
<height>150</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed_2</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLineEdit">
<property name="name">
<cstring>t04</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg14</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Bg24</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data14</cstring>
</property>
</widget>
<widget class="QLineEdit">
<property name="name">
<cstring>Data24</cstring>
</property>
</widget>
</vbox>
</widget>
</widget>
</hbox>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>ShowT0</cstring>
</property>
<property name="geometry">
<rect>
<x>435</x>
<y>190</y>
<width>111</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Show</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="default">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
@ -2245,10 +2809,16 @@
<slot>GoFit()</slot> <slot>GoFit()</slot>
</connection> </connection>
<connection> <connection>
<sender>InitParamTable</sender> <sender>TableUpdate</sender>
<signal>valueChanged(int,int)</signal> <signal>clicked()</signal>
<receiver>MuSRFitform</receiver> <receiver>MuSRFitform</receiver>
<slot>UpdateMSRFileInitTable()</slot> <slot>CallMSRCreate()</slot>
</connection>
<connection>
<sender>ShowT0</sender>
<signal>clicked()</signal>
<receiver>MuSRFitform</receiver>
<slot>ShowMuSRT0()</slot>
</connection> </connection>
</connections> </connections>
<tabstops> <tabstops>
@ -2304,11 +2874,12 @@
<slot>CreateAllInput()</slot> <slot>CreateAllInput()</slot>
<slot>CallMSRCreate()</slot> <slot>CallMSRCreate()</slot>
<slot>UpdateMSRFileInitTable()</slot> <slot>UpdateMSRFileInitTable()</slot>
<slot>ActivateT0Hists()</slot>
<slot>ActivateShComp()</slot> <slot>ActivateShComp()</slot>
<slot>InitializeTab()</slot> <slot>InitializeTab()</slot>
<slot>TabChanged()</slot> <slot>TabChanged()</slot>
<slot>GoFit()</slot> <slot>GoFit()</slot>
<slot>UpdeateTable()</slot> <slot>ShowMuSRT0()</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

View File

@ -161,6 +161,7 @@ void MuSRFitform::CreateAllInput()
{ {
# TODO: Need to deliver shared parameters also # TODO: Need to deliver shared parameters also
my %All=(); my %All=();
# From RUNS Tab
$All{"TITLE"}= TITLE->text; $All{"TITLE"}= TITLE->text;
$All{"FILENAME"}= FILENAME->text; $All{"FILENAME"}= FILENAME->text;
$All{"RunNumbers"} = RunNumbers->text; $All{"RunNumbers"} = RunNumbers->text;
@ -175,6 +176,11 @@ void MuSRFitform::CreateAllInput()
my @RUNS = split( /,/, $All{"RunNumbers"} ); my @RUNS = split( /,/, $All{"RunNumbers"} );
my @Hists = split(/,/, $All{"LRBF"} ); my @Hists = split(/,/, $All{"LRBF"} );
# From Fourier Tab
$All{"FUNITS"}= FUnits->currentText;
$All{"FAPODIZATION"}= FApodization->currentText;
$All{"FPLOT"}= FPlot->currentText;
# Construct fittypes that can be understood by MSR.pm # Construct fittypes that can be understood by MSR.pm
my %FTs=(0,"Exponential", my %FTs=(0,"Exponential",
1,"Gaussian", 1,"Gaussian",
@ -254,7 +260,9 @@ void MuSRFitform::CreateAllInput()
foreach my $Param (@Params) { foreach my $Param (@Params) {
my $Param_ORG = $Param; my $Param_ORG = $Param;
# TODO: I need to take care of single hist fits here # TODO: I need to take care of single hist fits here
if ( $All{"FitAsyType"} eq "SingleHist" ) { $Param=$Param.$Hists[0]; } if ( $All{"FitAsyType"} eq "SingleHist" ) {
$Param=$Param.$Hists[0];
}
if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "N0" && $Param ne "NBg" ) ){ if ( $#FitTypes != 0 && ( $Param ne "Alpha" && $Param ne "N0" && $Param ne "NBg" ) ){
$Param = join( "", $Param, "_", $Component); $Param = join( "", $Param, "_", $Component);
} }
@ -362,6 +370,29 @@ void MuSRFitform::UpdateMSRFileInitTable()
return; return;
} }
void MuSRFitform::ActivateT0Hists()
{
my %All=CreateAllInput();
my @Hists = split(/,/, $All{"LRBF"} );
my $HistBox = "";
for (my $iHist=1; $iHist<=4; $iHist++) {
$HistBox="groupHist$iHist";
my $HistBoxHandle = child($HistBox);
if ($iHist<=$#Hists+1) {
# Activate this histogram box
$HistBoxHandle->setHidden(0);
$HistBoxHandle->setEnabled(1);
$HistBoxHandle->setTitle("Hist # $Hists[$iHist-1]");
} else {
# Deactivate this histogram box
$HistBoxHandle->setHidden(1);
$HistBoxHandle->setEnabled(0);
}
}
# TODO: Set default values
}
void MuSRFitform::ActivateShComp() void MuSRFitform::ActivateShComp()
{ {
my %All=CreateAllInput(); my %All=CreateAllInput();
@ -606,6 +637,8 @@ void MuSRFitform::TabChanged()
ActivateShComp(); ActivateShComp();
InitializeTab(); InitializeTab();
UpdateMSRFileInitTable(); UpdateMSRFileInitTable();
# And also setup T0 and Bg bins
ActivateT0Hists();
} }
@ -633,11 +666,7 @@ void MuSRFitform::GoFit()
return; return;
} }
void MuSRFitform::ShowMuSRT0()
void MuSRFitform::UpdeateTable()
{ {
# Create MSR file and then run musrt0
} }