diff --git a/src/external/MuSRFitGUI/MSR.pm b/src/external/MuSRFitGUI/MSR.pm index 08f1ae23..4d80834e 100755 --- a/src/external/MuSRFitGUI/MSR.pm +++ b/src/external/MuSRFitGUI/MSR.pm @@ -1226,6 +1226,145 @@ sub PrepParamTable { } +######################## +# ExportParams +# Function return a tab separated table of parameters for the fit +# input should be +# %All +######################## +sub ExportParams { + my $erradd = "d"; + my $minadd = "_min"; + my $maxadd = "_max"; + +# First assume nothing is shared + my $Shared = 0; + + my $TABLE=""; + + my %All = %{$_[0]}; + my @RUNS = (); + if ($All{"RUNSType"}) { + @RUNS = split( /,/, $All{"RunFiles"} ); + } else { + @RUNS = split( /,/, $All{"RunNumbers"} ); + } + my @Hists = split( /,/, $All{"LRBF"} ); + + my @FitTypes =(); + foreach my $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) { + if ( $FitType ne "None" ) { push( @FitTypes, $FitType ); } + } +# Get theory block to determine the size of the table + my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes); +# For now the line below does not work. Why? +# my $Paramcomp_ref=$All{"Paramcomp_ref"}; + my @Paramcomp = @$Paramcomp_ref; + my $Full_T_Block= $All{"Full_T_Block"}; + +# Extract parameter block form the MSR file +# my $FILENAME=$All{"FILENAME"}; +# open (MSRF,q{<},"$FILENAME.msr" ); +# my @lines = ; +# close(IFILE); +# my $FPBlock_ref=MSR::ExtractParamBlk(@lines); +# my @FPBloc = @$FPBlock_ref; + +# Then loop over expected parameters and extract their values and error bar + my $PCount =0; + my $iRun =0; + my $value =0; + my $error = 0; + my $minvalue = 0; + my $maxvalue = 0; + my $Component=1; + + foreach my $RUN (@RUNS) { + my $line="$RUN"; + $iRun++; + $Component=1; + if ($All{"FitAsyType"} eq "Asymmetry") { + foreach my $FitType (@FitTypes) { + my $Parameters=$Paramcomp[$Component-1]; + my @Params = split( /\s+/, $Parameters ); + if ( $Component == 1 ) { + unshift( @Params, "Alpha" ); + } + +# This is the counter for parameters of this component + my $NP=1; + $Shared = 0; +# Change state/label of parameters + foreach my $Param (@Params) { + my $Param_ORG = $Param; + if ( $#FitTypes != 0 && ( $Param ne "Alpha" ) ){ + $Param = join( "", $Param, "_", "$Component" ); + } + + $Shared = $All{"Sh_$Param"}; + if ( $Shared!=1 || $iRun == 1 ) { +# It there are multiple runs index the parameters accordingly + $Param=$Param."_".$iRun; +# Check if this parameter has been initialized befor. (should be) + $value = $All{"$Param"}; + $error = $All{"$erradd$Param"}; + + $line=join("\t",$line,$value,$error); + $PCount++; + } + $NP++; + } + $Component++; + } + } + elsif ($All{"FitAsyType"} eq "SingleHist") { +# For a single histogram fit we basically need to repeat this for each hist + foreach my $Hist (@Hists) { + $Component=1; + foreach my $FitType (@FitTypes) { + my $Parameters=$Paramcomp[$Component-1]; + my @Params = split( /\s+/, $Parameters ); + if ( $Component == 1 ) { + unshift( @Params, ( "N0", "NBg" ) ); + } + +# This is the counter for parameters of this component + my $NP=1; + $Shared = 0; +# Change state/label of parameters + foreach my $Param (@Params) { + my $Param_ORG = $Param; + $Param=$Param.$Hist; + if ( $#FitTypes != 0 && ( $Param_ORG ne "N0" && $Param_ORG ne "NBg" ) ){ + $Param = join( "", $Param, "_", "$Component" ); + } + + $Shared = $All{"Sh_$Param"}; + if ( $Shared!=1 || $iRun == 1 ) { +# It there are multiple runs index the parameters accordingly + $Param=$Param."_".$iRun; +# Check if this parameter has been initialized befor. (should be) + $value = $All{"$Param"}; + $error = $All{"$erradd$Param"}; + $minvalue = $All{"$Param$minadd"}; + $maxvalue = $All{"$Param$maxadd"}; + + $values=join("\t",$Param,$value,$error,$minvalue,$maxvalue,$RUN); + $ParTable{$PCount}=$values; + $PCount++; + } + $NP++; + } + $Component++; + } + } + } + $TABLE=$TABLE."$line\n" + } + return $TABLE; +} + + ######################## # RUNFileNameAuto # Function return the RUN_Line for a given RUN diff --git a/src/external/MuSRFitGUI/MuSRFit.pl b/src/external/MuSRFitGUI/MuSRFit.pl index 33c44c59..7f9c438e 100755 --- a/src/external/MuSRFitGUI/MuSRFit.pl +++ b/src/external/MuSRFitGUI/MuSRFit.pl @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'MuSRFit.ui' # -# Created: Thu Sep 10 08:22:47 2009 +# Created: Sun Sep 13 23:09:01 2009 # by: The PerlQt User Interface Compiler (puic) # # WARNING! All changes made in this file will be lost! @@ -19,6 +19,8 @@ use Qt::slots fileChangeDir => [], filePrint => [], fileExit => [], + parametersExport => [], + parametersAppend => [], editUndo => [], editRedo => [], editCut => [], @@ -179,6 +181,7 @@ use Qt::attributes qw( ShowT0 MenuBar fileMenu + Parameters editMenu Options helpMenu @@ -206,6 +209,8 @@ use Qt::attributes qw( Action_2 Action_3 optionsnew_itemAction + parametersExport_AsAction + parametersAppend_ToAction ); @@ -1513,6 +1518,8 @@ sub NEW Action_2= Qt::Action(this, "Action_2"); Action_3= Qt::Action(this, "Action_3"); optionsnew_itemAction= Qt::Action(this, "optionsnew_itemAction"); + parametersExport_AsAction= Qt::Action(this, "parametersExport_AsAction"); + parametersAppend_ToAction= Qt::Action(this, "parametersAppend_ToAction"); toolBar = Qt::ToolBar("", this, &DockTop); @@ -1538,6 +1545,11 @@ sub NEW fileExitAction->addTo( fileMenu ); MenuBar->insertItem( "", fileMenu, 2 ); + Parameters = Qt::PopupMenu( this ); + parametersExport_AsAction->addTo( Parameters ); + parametersAppend_ToAction->addTo( Parameters ); + MenuBar->insertItem( "", Parameters, 3 ); + editMenu = Qt::PopupMenu( this ); editUndoAction->addTo( editMenu ); editRedoAction->addTo( editMenu ); @@ -1545,21 +1557,21 @@ sub NEW editCutAction->addTo( editMenu ); editCopyAction->addTo( editMenu ); editPasteAction->addTo( editMenu ); - MenuBar->insertItem( "", editMenu, 3 ); + MenuBar->insertItem( "", editMenu, 4 ); Options = Qt::PopupMenu( this ); FileExistCheck->addTo( Options ); ManualFile->addTo( Options ); - MenuBar->insertItem( "", Options, 4 ); + MenuBar->insertItem( "", Options, 5 ); helpMenu = Qt::PopupMenu( this ); helpContentsAction->addTo( helpMenu ); helpIndexAction->addTo( helpMenu ); helpMenu->insertSeparator(); helpAboutAction->addTo( helpMenu ); - MenuBar->insertItem( "", helpMenu, 5 ); + MenuBar->insertItem( "", helpMenu, 6 ); - MenuBar->insertSeparator( 6 ); + MenuBar->insertSeparator( 7 ); languageChange(); my $resize = Qt::Size(579, 501); @@ -1590,6 +1602,8 @@ sub NEW Qt::Object::connect(PlotMSR_2, SIGNAL "pressed()", this, SLOT "GoPlot()"); Qt::Object::connect(Browse, SIGNAL "clicked()", this, SLOT "fileBrowse()"); Qt::Object::connect(BeamLine, SIGNAL "activated(int)", this, SLOT "T0Update()"); + Qt::Object::connect(parametersExport_AsAction, SIGNAL "activated()", this, SLOT "parametersExport()"); + Qt::Object::connect(parametersAppend_ToAction, SIGNAL "activated()", this, SLOT "parametersAppend()"); setTabOrder(musrfit_tabs, RunNumbers); setTabOrder(RunNumbers, BeamLine); @@ -1883,8 +1897,8 @@ sub languageChange fileOpenAction->setText( trUtf8("&Open MSR...") ); fileOpenAction->setMenuText( trUtf8("&Open MSR...") ); fileOpenAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+O") ) ); - fileSaveAction->setText( trUtf8("&Save MSR") ); - fileSaveAction->setMenuText( trUtf8("&Save MSR") ); + fileSaveAction->setText( trUtf8("&Save MSR...") ); + fileSaveAction->setMenuText( trUtf8("&Save MSR...") ); fileSaveAction->setStatusTip( trUtf8("&Save MSR") ); fileSaveAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+S") ) ); fileSaveAsAction->setText( trUtf8("Save MSR &As...") ); @@ -1939,11 +1953,16 @@ sub languageChange Action_3->setText( trUtf8("Unnamed") ); optionsnew_itemAction->setText( trUtf8("new item") ); optionsnew_itemAction->setMenuText( trUtf8("new item") ); + parametersExport_AsAction->setText( trUtf8("&Export As...") ); + parametersExport_AsAction->setMenuText( trUtf8("&Export As...") ); + parametersAppend_ToAction->setText( trUtf8("&Append To...") ); + parametersAppend_ToAction->setMenuText( trUtf8("&Append To...") ); toolBar->setLabel( trUtf8("Tools") ); MenuBar->findItem( 2 )->setText( trUtf8("&File") ); - MenuBar->findItem( 3 )->setText( trUtf8("&Edit") ); - MenuBar->findItem( 4 )->setText( trUtf8("Options") ); - MenuBar->findItem( 5 )->setText( trUtf8("&Help") ); + MenuBar->findItem( 3 )->setText( trUtf8("Parameters") ); + MenuBar->findItem( 4 )->setText( trUtf8("&Edit") ); + MenuBar->findItem( 5 )->setText( trUtf8("Options") ); + MenuBar->findItem( 6 )->setText( trUtf8("&Help") ); } @@ -2018,6 +2037,54 @@ sub fileExit } +sub parametersExport +{ + + my %All=CreateAllInput(); + my $FILENAME=$All{"FILENAME"}.".dat"; + my $file=Qt::FileDialog::getSaveFileName( + "$FILENAME", + "Data Files (*.dat)", + this, + "export file dialog", + "Choose a filename to export to"); + +# If the user gave a filename the copy to it + if ($file ne "") { + my $Text = MSR::ExportParams(\%All); + print $Text; + } + +} + +sub parametersAppend +{ + + my %All=CreateAllInput(); + my $FILENAME=$All{"FILENAME"}.".dat"; + my $file=Qt::FileDialog::getOpneFileName( + "./", + "Data Files (*.dat)", + this, + "append file dialog", + "Choose a filename to append to"); + +# If the user gave a filename the copy to it + if ($file ne "") { + if (-e $FILENAME) { + my $Text = MSR::ExportParams(\%All); + print $Text; + } else { + if ($file ne "") { + my $Warning = "Warning: No data file found yet!"; + my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); + } + } + } + MSR::ExportParams(\%All); + +} + sub editUndo { print "MuSRFitform->editUndo(): Not implemented yet.\n"; @@ -2168,7 +2235,7 @@ sub CreateAllInput $All{"Paramcomp_ref"}=$Paramcomp_ref; my @Paramcomp = @$Paramcomp_ref; -# TODO: Read initial values of paramets from tabel +# Read initial values of paramets from tabel my $erradd = "d"; my $minadd = "_min"; my $maxadd = "_max"; diff --git a/src/external/MuSRFitGUI/MuSRFit.ui b/src/external/MuSRFitGUI/MuSRFit.ui index 4ae50faf..678dcea4 100755 --- a/src/external/MuSRFitGUI/MuSRFit.ui +++ b/src/external/MuSRFitGUI/MuSRFit.ui @@ -22,8 +22,8 @@ - 21 - 227 + 23 + 246 @@ -3905,6 +3905,10 @@ + + + + @@ -3986,10 +3990,10 @@ image3 - &Save MSR + &Save MSR... - &Save MSR + &Save MSR... &Save MSR @@ -4308,6 +4312,28 @@ new item + + + parametersExport_AsAction + + + &Export As... + + + &Export As... + + + + + parametersAppend_ToAction + + + &Append To... + + + &Append To... + + @@ -4483,6 +4509,18 @@ MuSRFitform T0Update() + + parametersExport_AsAction + activated() + MuSRFitform + parametersExport() + + + parametersAppend_ToAction + activated() + MuSRFitform + parametersAppend() + musrfit_tabs @@ -4573,6 +4611,8 @@ fileChangeDir() filePrint() fileExit() + parametersExport() + parametersAppend() editUndo() editRedo() editCut() diff --git a/src/external/MuSRFitGUI/MuSRFit.ui.h b/src/external/MuSRFitGUI/MuSRFit.ui.h index 5d7fdfa6..01b95cc9 100755 --- a/src/external/MuSRFitGUI/MuSRFit.ui.h +++ b/src/external/MuSRFitGUI/MuSRFit.ui.h @@ -93,6 +93,51 @@ void Form1::fileExit() Qt::Application::exit( 0 ); } +void Form1::parametersExport() +{ + my %All=CreateAllInput(); + my $FILENAME=$All{"FILENAME"}.".dat"; + my $file=Qt::FileDialog::getSaveFileName( + "$FILENAME", + "Data Files (*.dat)", + this, + "export file dialog", + "Choose a filename to export to"); + +# If the user gave a filename the copy to it + if ($file ne "") { + my $Text = MSR::ExportParams(\%All); + print $Text; + } +} + + +void Form1::parametersAppend() +{ + my %All=CreateAllInput(); + my $FILENAME=$All{"FILENAME"}.".dat"; + my $file=Qt::FileDialog::getOpneFileName( + "./", + "Data Files (*.dat)", + this, + "append file dialog", + "Choose a filename to append to"); + +# If the user gave a filename the copy to it + if ($file ne "") { + if (-e $FILENAME) { + my $Text = MSR::ExportParams(\%All); + print $Text; + } else { + if ($file ne "") { + my $Warning = "Warning: No data file found yet!"; + my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); + } + } + } + MSR::ExportParams(\%All); +} + void Form1::editUndo() { @@ -247,7 +292,7 @@ void MuSRFitform::CreateAllInput() $All{"Paramcomp_ref"}=$Paramcomp_ref; my @Paramcomp = @$Paramcomp_ref; -# TODO: Read initial values of paramets from tabel +# Read initial values of paramets from tabel my $erradd = "d"; my $minadd = "_min"; my $maxadd = "_max"; diff --git a/src/external/MuSRFitGUI/devel/MSR.pm b/src/external/MuSRFitGUI/devel/MSR.pm index 08f1ae23..4d80834e 100755 --- a/src/external/MuSRFitGUI/devel/MSR.pm +++ b/src/external/MuSRFitGUI/devel/MSR.pm @@ -1226,6 +1226,145 @@ sub PrepParamTable { } +######################## +# ExportParams +# Function return a tab separated table of parameters for the fit +# input should be +# %All +######################## +sub ExportParams { + my $erradd = "d"; + my $minadd = "_min"; + my $maxadd = "_max"; + +# First assume nothing is shared + my $Shared = 0; + + my $TABLE=""; + + my %All = %{$_[0]}; + my @RUNS = (); + if ($All{"RUNSType"}) { + @RUNS = split( /,/, $All{"RunFiles"} ); + } else { + @RUNS = split( /,/, $All{"RunNumbers"} ); + } + my @Hists = split( /,/, $All{"LRBF"} ); + + my @FitTypes =(); + foreach my $FitType ($All{"FitType1"}, $All{"FitType2"}, $All{"FitType3"}) { + if ( $FitType ne "None" ) { push( @FitTypes, $FitType ); } + } +# Get theory block to determine the size of the table + my ($Full_T_Block,$Paramcomp_ref)= MSR::CreateTheory(@FitTypes); +# For now the line below does not work. Why? +# my $Paramcomp_ref=$All{"Paramcomp_ref"}; + my @Paramcomp = @$Paramcomp_ref; + my $Full_T_Block= $All{"Full_T_Block"}; + +# Extract parameter block form the MSR file +# my $FILENAME=$All{"FILENAME"}; +# open (MSRF,q{<},"$FILENAME.msr" ); +# my @lines = ; +# close(IFILE); +# my $FPBlock_ref=MSR::ExtractParamBlk(@lines); +# my @FPBloc = @$FPBlock_ref; + +# Then loop over expected parameters and extract their values and error bar + my $PCount =0; + my $iRun =0; + my $value =0; + my $error = 0; + my $minvalue = 0; + my $maxvalue = 0; + my $Component=1; + + foreach my $RUN (@RUNS) { + my $line="$RUN"; + $iRun++; + $Component=1; + if ($All{"FitAsyType"} eq "Asymmetry") { + foreach my $FitType (@FitTypes) { + my $Parameters=$Paramcomp[$Component-1]; + my @Params = split( /\s+/, $Parameters ); + if ( $Component == 1 ) { + unshift( @Params, "Alpha" ); + } + +# This is the counter for parameters of this component + my $NP=1; + $Shared = 0; +# Change state/label of parameters + foreach my $Param (@Params) { + my $Param_ORG = $Param; + if ( $#FitTypes != 0 && ( $Param ne "Alpha" ) ){ + $Param = join( "", $Param, "_", "$Component" ); + } + + $Shared = $All{"Sh_$Param"}; + if ( $Shared!=1 || $iRun == 1 ) { +# It there are multiple runs index the parameters accordingly + $Param=$Param."_".$iRun; +# Check if this parameter has been initialized befor. (should be) + $value = $All{"$Param"}; + $error = $All{"$erradd$Param"}; + + $line=join("\t",$line,$value,$error); + $PCount++; + } + $NP++; + } + $Component++; + } + } + elsif ($All{"FitAsyType"} eq "SingleHist") { +# For a single histogram fit we basically need to repeat this for each hist + foreach my $Hist (@Hists) { + $Component=1; + foreach my $FitType (@FitTypes) { + my $Parameters=$Paramcomp[$Component-1]; + my @Params = split( /\s+/, $Parameters ); + if ( $Component == 1 ) { + unshift( @Params, ( "N0", "NBg" ) ); + } + +# This is the counter for parameters of this component + my $NP=1; + $Shared = 0; +# Change state/label of parameters + foreach my $Param (@Params) { + my $Param_ORG = $Param; + $Param=$Param.$Hist; + if ( $#FitTypes != 0 && ( $Param_ORG ne "N0" && $Param_ORG ne "NBg" ) ){ + $Param = join( "", $Param, "_", "$Component" ); + } + + $Shared = $All{"Sh_$Param"}; + if ( $Shared!=1 || $iRun == 1 ) { +# It there are multiple runs index the parameters accordingly + $Param=$Param."_".$iRun; +# Check if this parameter has been initialized befor. (should be) + $value = $All{"$Param"}; + $error = $All{"$erradd$Param"}; + $minvalue = $All{"$Param$minadd"}; + $maxvalue = $All{"$Param$maxadd"}; + + $values=join("\t",$Param,$value,$error,$minvalue,$maxvalue,$RUN); + $ParTable{$PCount}=$values; + $PCount++; + } + $NP++; + } + $Component++; + } + } + } + $TABLE=$TABLE."$line\n" + } + return $TABLE; +} + + ######################## # RUNFileNameAuto # Function return the RUN_Line for a given RUN diff --git a/src/external/MuSRFitGUI/devel/MuSRFit.pl b/src/external/MuSRFitGUI/devel/MuSRFit.pl index fc01f355..2e7eb760 100755 --- a/src/external/MuSRFitGUI/devel/MuSRFit.pl +++ b/src/external/MuSRFitGUI/devel/MuSRFit.pl @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'MuSRFit.ui' # -# Created: Fri Sep 11 15:56:45 2009 +# Created: Sun Sep 13 23:02:53 2009 # by: The PerlQt User Interface Compiler (puic) # # WARNING! All changes made in this file will be lost! @@ -585,7 +585,7 @@ sub NEW setName("MuSRFitform" ); } setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) ); - setMinimumSize(Qt::Size(21, 251) ); + setMinimumSize(Qt::Size(23, 246) ); setIcon($image0 ); setCentralWidget(Qt::Widget(this, "qt_central_widget")); @@ -2208,16 +2208,8 @@ sub parametersExport # If the user gave a filename the copy to it if ($file ne "") { -# TODO: check if the extension is correct, or add it. - if (-e $FILENAME) { -# my $cmd="cp $FILENAME $file"; -# my $pid=system($cmd); - } else { - if ($file ne "") { -# my $Warning = "Warning: No MSR file found yet!"; -# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); - } - } + my $Text = MSR::ExportParams(\%All); + print $Text; } } @@ -2227,8 +2219,8 @@ sub parametersAppend my %All=CreateAllInput(); my $FILENAME=$All{"FILENAME"}.".dat"; - my $file=Qt::FileDialog::getSaveFileName( - "$FILENAME", + my $file=Qt::FileDialog::getOpneFileName( + "./", "Data Files (*.dat)", this, "append file dialog", @@ -2236,17 +2228,17 @@ sub parametersAppend # If the user gave a filename the copy to it if ($file ne "") { -# TODO: check if the extension is correct, or add it. if (-e $FILENAME) { -# my $cmd="cp $FILENAME $file"; -# my $pid=system($cmd); + my $Text = MSR::ExportParams(\%All); + print $Text; } else { if ($file ne "") { -# my $Warning = "Warning: No MSR file found yet!"; -# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); + my $Warning = "Warning: No data file found yet!"; + my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); } } } + MSR::ExportParams(\%All); } diff --git a/src/external/MuSRFitGUI/devel/MuSRFit.ui b/src/external/MuSRFitGUI/devel/MuSRFit.ui index f64f954f..9db41c1e 100755 --- a/src/external/MuSRFitGUI/devel/MuSRFit.ui +++ b/src/external/MuSRFitGUI/devel/MuSRFit.ui @@ -22,8 +22,8 @@ - 21 - 251 + 23 + 246 diff --git a/src/external/MuSRFitGUI/devel/MuSRFit.ui.h b/src/external/MuSRFitGUI/devel/MuSRFit.ui.h index 1138f98c..c664e47c 100755 --- a/src/external/MuSRFitGUI/devel/MuSRFit.ui.h +++ b/src/external/MuSRFitGUI/devel/MuSRFit.ui.h @@ -106,16 +106,8 @@ void Form1::parametersExport() # If the user gave a filename the copy to it if ($file ne "") { -# TODO: check if the extension is correct, or add it. - if (-e $FILENAME) { -# my $cmd="cp $FILENAME $file"; -# my $pid=system($cmd); - } else { - if ($file ne "") { -# my $Warning = "Warning: No MSR file found yet!"; -# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); - } - } + my $Text = MSR::ExportParams(\%All); + print $Text; } } @@ -124,8 +116,8 @@ void Form1::parametersAppend() { my %All=CreateAllInput(); my $FILENAME=$All{"FILENAME"}.".dat"; - my $file=Qt::FileDialog::getSaveFileName( - "$FILENAME", + my $file=Qt::FileDialog::getOpneFileName( + "./", "Data Files (*.dat)", this, "append file dialog", @@ -133,17 +125,17 @@ void Form1::parametersAppend() # If the user gave a filename the copy to it if ($file ne "") { -# TODO: check if the extension is correct, or add it. if (-e $FILENAME) { -# my $cmd="cp $FILENAME $file"; -# my $pid=system($cmd); + my $Text = MSR::ExportParams(\%All); + print $Text; } else { if ($file ne "") { -# my $Warning = "Warning: No MSR file found yet!"; -# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); + my $Warning = "Warning: No data file found yet!"; + my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning); } } } + MSR::ExportParams(\%All); }