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

Dialog for creating FOURIER blocks in msr files. More...

#include <PGetFourierBlockDialog.h>

Inheritance diagram for PGetFourierBlockDialog:
Collaboration diagram for PGetFourierBlockDialog:

Public Member Functions

 PGetFourierBlockDialog (const QString helpUrl)
 Constructs the FOURIER block dialog.
 
QString getFourierBlock ()
 Returns the generated FOURIER block string.
 

Private Slots

void checkPhaseParameter ()
 Validates the phase parameter input.
 
void fillFourierBlock ()
 Builds the FOURIER block string from dialog inputs.
 
void helpContent ()
 Opens the online help for FOURIER blocks.
 

Private Attributes

QString fFourierBlock
 Generated msr-file FOURIER block string.
 
QString fHelpUrl
 URL to the online documentation for FOURIER blocks.
 

Detailed Description

Dialog for creating FOURIER blocks in msr files.

This dialog collects all parameters needed to generate a FOURIER block for muon spin rotation data analysis. The Fourier transform converts time-domain asymmetry data into the frequency domain, revealing oscillation frequencies corresponding to internal magnetic fields.

Fourier Block Parameters:
  • Units: Gauss, Tesla, MHz, or Mc/s (megacycles per second)
  • Fourier power: Zero-padding power for FFT (2^n points)
  • Apodization: Window function (none, weak, medium, strong)
  • Plot type: real, imag, real_and_imag, power, or phase
  • Phase: Initial phase value or parameter reference (parXX)
  • Phase correction range: Frequency range for phase optimization
  • Range: Frequency range for display
Generated Output Format:
The dialog generates msr-file formatted text blocks such as:
###############################################################
FOURIER
units Gauss
fourier_power 10
apodization strong
plot power
phase par3
range_for_phase_correction 50 80
range 0 500
Phase Parameter Formats:
The phase can be specified in two ways:
  • Direct value: An integer representing an initial phase angle
  • Parameter reference: "parXX" where XX is a fit parameter number that will be used as the phase during fitting
See also
PGetPlotBlockDialog For creating PLOT blocks

Definition at line 95 of file PGetFourierBlockDialog.h.

Constructor & Destructor Documentation

◆ PGetFourierBlockDialog()

PGetFourierBlockDialog::PGetFourierBlockDialog ( const QString helpUrl)

Constructs the FOURIER block dialog.

Initializes the dialog UI and sets up input validators for all numeric fields. The dialog is created as modal.

Input Validators:
  • Integer validators: Fourier power (zero-padding exponent)
  • Double validators: Phase correction range (low/high), frequency range (low/high)
Signal Connections:
The phase parameter input is connected to validation on focus loss to ensure proper format (integer or parXX).
Parameters
helpUrlURL to the online documentation for FOURIER blocks.

Definition at line 72 of file PGetFourierBlockDialog.cpp.

Member Function Documentation

◆ checkPhaseParameter

void PGetFourierBlockDialog::checkPhaseParameter ( )
privateslot

Validates the phase parameter input.

Checks that the phase entry is either a plain integer or follows the "parXX" format where XX is a parameter number.

Checks if the phase parameter is either a plain integer number or has the format "parXX" where XX is a parameter number referencing a fit parameter from the FITPARAMETER block.

Validation Rules:
  • Empty input is allowed (phase parameter will be omitted)
  • Plain integer values are accepted (e.g., "45", "90")
  • Parameter references must follow the format "parXX" (e.g., "par3", "par12")

If validation fails, the input is cleared and an error dialog is shown, returning focus to the phase input field for correction.

Definition at line 104 of file PGetFourierBlockDialog.cpp.

◆ fillFourierBlock

void PGetFourierBlockDialog::fillFourierBlock ( )
privateslot

Builds the FOURIER block string from dialog inputs.

Generates the FOURIER block string from dialog inputs.

Collects all user-entered values and formats them into a valid msr-file FOURIER block.

Transfers the data from all dialog widgets into a valid msr-file FOURIER block string. The method collects:

  • Required parameters: units, apodization, plot type
  • Optional parameters: fourier_power, phase, range_for_phase_correction, range

Optional parameters are only included if their corresponding input fields contain valid data. The generated block is stored in fFourierBlock for retrieval via getFourierBlock().

Generated Block Structure:
###############################################################
FOURIER
units <Gauss|Tesla|MHz|Mc/s>
fourier_power <n> (optional)
apodization <none|weak|medium|strong>
plot <real|imag|real_and_imag|power|phase>
phase <value|parXX> (optional)
range_for_phase_correction <low> <high> (optional)
range <low> <high> (optional)

Definition at line 163 of file PGetFourierBlockDialog.cpp.

◆ getFourierBlock()

QString PGetFourierBlockDialog::getFourierBlock ( )
inline

Returns the generated FOURIER block string.

Returns
Formatted msr-file FOURIER block string ready for insertion into an msr file.

Definition at line 107 of file PGetFourierBlockDialog.h.

◆ helpContent

void PGetFourierBlockDialog::helpContent ( )
privateslot

Opens the online help for FOURIER blocks.

Opens the online help documentation for FOURIER 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 193 of file PGetFourierBlockDialog.cpp.

Member Data Documentation

◆ fFourierBlock

QString PGetFourierBlockDialog::fFourierBlock
private

Generated msr-file FOURIER block string.

Definition at line 130 of file PGetFourierBlockDialog.h.

◆ fHelpUrl

QString PGetFourierBlockDialog::fHelpUrl
private

URL to the online documentation for FOURIER blocks.

Definition at line 131 of file PGetFourierBlockDialog.h.


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