musredit 1.0.0
Loading...
Searching...
No Matches
PGetNonMusrRunBlockDialog Class Reference

Dialog for creating non-muSR type RUN blocks in msr files. More...

#include <PGetNonMusrRunBlockDialog.h>

Inheritance diagram for PGetNonMusrRunBlockDialog:
Collaboration diagram for PGetNonMusrRunBlockDialog:

Public Member Functions

 PGetNonMusrRunBlockDialog (const QString helpUrl="")
 Constructs the non-muSR RUN block dialog.
 
RUN Block Generators

Methods to generate formatted msr-file text for each parameter.

QString getRunHeaderInfo ()
 Generates the RUN header line.
 
QString getMap (bool &valid)
 Generates the parameter map line.
 
QString getXYData (bool &valid)
 Generates the xy-data specification line.
 
QString getFitRange (bool &valid)
 Generates the fit range specification line.
 

Private Slots

void helpContent ()
 Opens the online help for non-muSR RUN blocks.
 

Private Attributes

QString fHelpUrl
 URL to the online documentation for non-muSR RUN blocks.
 

Detailed Description

Dialog for creating non-muSR type RUN blocks in msr files.

This dialog collects all parameters needed to generate a non-muSR RUN block for fitting generic x-y data. Unlike muon spin rotation data, non-muSR data is typically used for fitting arbitrary datasets such as magnetization curves, susceptibility data, or other experimental measurements.

RUN Block Parameters:
  • Run file name, beamline, institute, and file format (typically DB)
  • Parameter map (mapping to FITPARAMETER block)
  • X-Y data column specifications
  • Fit range
Generated Output Format:
The dialog generates msr-file formatted text blocks such as:
RUN datafile BEAMLINE PSI DB (name beamline institute data-file-format)
map 1 2 3
xy-data 1 2
fit 0.0 100.0
Supported File Formats:
  • DB: Generic database format (default)
  • ASCII: Plain text column data
  • Other formats as supported by musrfit
See also
PGetAsymmetryRunBlockDialog For muSR asymmetry fitting
PGetSingleHistoRunBlockDialog For single histogram muSR fitting

Definition at line 85 of file PGetNonMusrRunBlockDialog.h.

Constructor & Destructor Documentation

◆ PGetNonMusrRunBlockDialog()

PGetNonMusrRunBlockDialog::PGetNonMusrRunBlockDialog ( const QString helpUrl = "")

Constructs the non-muSR RUN block dialog.

Initializes the dialog UI and sets up input validators for numeric fields. The dialog is created as modal. The file format combo box is automatically set to "DB" (database format) as the default, which is the most common format for non-muSR data.

Input Validators:
  • Double validators: fit range start and end values
Parameters
helpUrlURL to the online documentation for non-muSR RUN blocks. Defaults to empty string if not provided.

Definition at line 67 of file PGetNonMusrRunBlockDialog.cpp.

Member Function Documentation

◆ getFitRange()

QString PGetNonMusrRunBlockDialog::getFitRange ( bool & valid)

Generates the fit range specification line.

Generates the fit range specification line for the non-muSR block.

Parameters
[out]validSet to true if a fit range was provided, false if using defaults.
Returns
Formatted fit range string for the msr file.

Creates the "fit" line specifying the x-value range over which the fit will be performed. If no fit range is provided by the user, a default range of [0.0, 10.0] is returned.

Parameters
[out]validSet to true if both fit range values are provided by the user, false if using the default range.
Returns
Formatted fit range string, e.g.: "fit 0.5 99.5\\n" Returns default "fit 0.0 10.0\\n" if values are missing.

Definition at line 185 of file PGetNonMusrRunBlockDialog.cpp.

◆ getMap()

QString PGetNonMusrRunBlockDialog::getMap ( bool & valid)

Generates the parameter map line.

Generates the parameter map line for the non-muSR block.

Parameters
[out]validSet to true if the map contains only valid characters.
Returns
Formatted map string for the msr file.

The map line defines the mapping between theory function parameters and the fit parameters defined in the FITPARAMETER block. The method validates that the map contains only space-separated integers.

Parameters
[out]validSet to true if the map contains only digits and spaces, false if invalid characters are found.
Returns
Formatted map string, e.g.: "map 1 2 3\\n"

Definition at line 124 of file PGetNonMusrRunBlockDialog.cpp.

◆ getRunHeaderInfo()

QString PGetNonMusrRunBlockDialog::getRunHeaderInfo ( )

Generates the RUN header line.

Generates the RUN header line for the non-muSR block.

Returns
Formatted RUN header string with file name, beamline, institute, and format.

Creates the first line of the RUN block containing the run file name, beamline identifier, institute name, and data file format. The beamline is converted to uppercase.

Returns
Formatted RUN header string, e.g.: "RUN datafile BEAMLINE PSI DB (name beamline institute data-file-format)\\n"

Definition at line 99 of file PGetNonMusrRunBlockDialog.cpp.

◆ getXYData()

QString PGetNonMusrRunBlockDialog::getXYData ( bool & valid)

Generates the xy-data specification line.

Generates the xy-data specification line for the non-muSR block.

Parameters
[out]validSet to true if both x and y data columns are specified.
Returns
Formatted xy-data string for the msr file.

Creates the "xy-data" line specifying which columns in the data file contain the x (independent variable) and y (dependent variable) values. Both columns must be specified for the line to be valid.

Parameters
[out]validSet to true if both x and y data column numbers are provided, false if either is missing.
Returns
Formatted xy-data string, e.g.: "xy-data 1 2\\n" Returns empty string if either x or y data is not specified.

Definition at line 155 of file PGetNonMusrRunBlockDialog.cpp.

◆ helpContent

void PGetNonMusrRunBlockDialog::helpContent ( )
privateslot

Opens the online help for non-muSR RUN blocks.

Opens the online help documentation for non-muSR RUN blocks.

Attempts to open the help URL in the system's default web browser using QDesktopServices. If the URL is empty, displays an informational message. If the browser fails to open, displays an error message with a clickable link.

Definition at line 210 of file PGetNonMusrRunBlockDialog.cpp.

Member Data Documentation

◆ fHelpUrl

QString PGetNonMusrRunBlockDialog::fHelpUrl
private

URL to the online documentation for non-muSR RUN blocks.

Definition at line 131 of file PGetNonMusrRunBlockDialog.h.


The documentation for this class was generated from the following files: