From a089cf264c85f9a8ee4e8f1602f9d9b12616ab6e Mon Sep 17 00:00:00 2001 From: hugoval <76450221+yudgugger@users.noreply.github.com> Date: Wed, 22 May 2024 17:27:19 +0200 Subject: [PATCH] Update README.md --- doc/README.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/doc/README.md b/doc/README.md index 72955bbc..644e7bd9 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1579,7 +1579,83 @@ User parameters:
-The measurement parameters are extracted from the SSPFM measurement sheet, and each of the raw SSPFM measurement files is subsequently analyzed within the multi_script
function. The single_script
function analyzes a single raw SSPFM data file by following these steps: measurements are extracted from the file and calibrated if necessary. They are then segmented and processed into PFM data for each segment. The PFM phase signal is analyzed using the phase_offset_determination
function of the utils/nanoloop/phase.py
script, both in On Field and Off Field conditions. During this analysis, a phase offset is determined, and the two main peaks are identified and recentered within the phase measurement range. For instance, if the phase value range extends from -180 to 180°, and the two peaks are spaced by 180°, a phase offset will be calculated to position them at -90 and 90°, respectively. This minimizes phase switching across all measurements. Ideally, the phase offsets determined in On and Off Field conditions should be close. The average offset corresponding to the entire measurement file is determined using the mean_phase_offset
function of the utils/nanoloop/phase.py
script. The phase evolution with respect to the measurement file is generated using the generate_graph_offset
function. It should be noted that the case of unipolar phase data (a single peak on the phase histogram) can be handled by the script functions. Typically, this script is used before the first step of processing SSPFM measurements in order to enter a phase offset value to apply to measurement before the treatment processing.
+The measurement parameters are extracted from the SSPFM measurement sheet, and each of the raw SSPFM measurement files is subsequently analyzed within the multi_script
function. The single_script
function analyzes a single raw SSPFM data file by following these steps: measurements are extracted from the file and calibrated if necessary. They are then segmented and processed into PFM data for each segment. The PFM phase signal is analyzed using the phase_offset_determination
function of the utils/nanoloop/phase.py
script, both in On Field and Off Field conditions. During this analysis, a phase offset is determined, and the two main peaks are identified and recentered within the phase measurement range. For instance, if the phase value range extends from -180 to 180°, and the two peaks are spaced by 180°, a phase offset will be calculated to position them at -90 and 90°, respectively. This minimizes phase switching across all measurements. Ideally, the phase offsets determined in On and Off Field conditions should be close. The average offset corresponding to the entire measurement file is determined using the mean_phase_offset
function of the utils/nanoloop/phase.py
script. The phase evolution with respect to the measurement file is generated using the generate_graph_offset
function. It should be noted that the case of unipolar phase data (a single peak on the phase histogram) can be handled by the script functions. Typically, this script is used before the first step of processing SSPFM measurements in order to generate the file containing the phase offset value to apply to measurement before the treatment processing.
+
+• For a deeper understanding of script workflow, please refer to the relevant section in the documentation: IV) - First step of data analysis +
+ +#### VIII.2.c) Figures + +
+
+ Histogram of phase values for On Field measurements, after applying the phase offset determined by the script toolbox/phase_offset_analyzer.py
(figure generated with refocused_phase_histo
function of utils/nanoloop/plot_phase.py
script). Both On and Off Field phase histogram figure are plotted.
+
+
+ Graph showing the evolution of the phase offset determined by the script toolbox/phase_offset_analyzer.py
as a function of the index of the raw SSPFM measurement files (figure generated with generate_graph_offset
function of toolbox/phase_offset_analyzer.py
script).
+
+The script can be executed directly using the executable file: toolbox/phase_inversion_analyzer.py
or through the graphical user interface: gui/phase_inversion_analyzer.py
. This script automatically finds if the sign of the phase gradient with the writing voltage for each mode (On and Off Field) and if a phase inversion occurs between the two modes. This can be useful for determining if the electrostatic component is predominant in the On Field mode.
+
+User parameters: +
+ +``` + default_seg_params = {'cut seg [%]': {'start': 5, 'end': 5}, + 'mode': 'max', + 'filter type': 'None', + 'filter freq 1': 1e3, + 'filter freq 2': 3e3, + 'filter ord': 4} + default_fit_params = {'fit pha': False, + 'detect peak': False, + 'sens peak detect': 1.5} + default_pha_params = {'phase_file_path': '', + 'offset': 0} + default_user_parameters = {'dir path in': '', + 'dir path out': '', + 'range file': 'None', + 'extension': 'spm', + 'seg pars': default_seg_params, + 'fit pars': default_fit_params, + 'pha pars': default_pha_params, + 'verbose': True, + 'show plots': True, + 'save': True} +``` + +
+• File Management: The user specifies the input folder containing all the raw SSPFM measurement files, as well as the csv measurement sheet Additionally, the range of file indices to analyze, extension, and an output folder to save the analysis results can be provided.
+• Segment parameters: Parameters used for segment processing.
+• Fit parameteres: Parameters used for SHO fitting.
+• Pha parameteres: Parameters used for pre-offset phase treatment.
+• Save and plot parameters: Pertaining to the management of display and the preservation of outcomes. Phase offset values can be saved in a txt file. This file can be opened with map readers.
+
+• For a deeper understanding of the user parameters, please refer to the relevant section in the documentation: IV) - First step of data analysis +
+ +#### VIII.2.b) Workflow + +
+
+
+ Workflow: Phase offset analyzer (left: global, right: single script)
+
+The measurement parameters are extracted from the SSPFM measurement sheet, and each of the raw SSPFM measurement files is subsequently analyzed within the multi_script
function. The single_script
function analyzes a single raw SSPFM data file by following these steps: measurements are extracted from the file and phase offset is applied if necessary. A list of phase offsets for each file can be applied with the phase_file_path
parameter, containing the path of a file generated with the phase offset generator script, otherwise, a value can be specified with the offset
parameter. They are then segmented and processed into PFM data for each segment. For each mode (On and Off Field), the sign of the phase signal gradient with the writing voltage is determined using the phase_bias_grad
function from the nanoloop/phase script. The two values are compared to determine if a phase inversion has occurred between the On and Off Field modes. Typically, this script is used before the second step of processing SSPFM measurements in order to generate the file containing the boolean value of the main electrostatic parameter to apply to the measurement before the treatment processing.