## MFM

MFM — Magnetic force microscopy

## Functions

void | gwy_data_field_mfm_perpendicular_stray_field ()
void | gwy_data_field_mfm_perpendicular_stray_field_angle_correction ()
void | gwy_data_field_mfm_perpendicular_medium_force ()
void | gwy_data_field_mfm_shift_z ()
gdouble | gwy_data_field_mfm_find_shift_z ()
void | gwy_data_field_mfm_parallel_medium ()
void | gwy_data_field_mfm_current_line ()

## Types and Values

enum | GwyMFMProbeType
enum | GwyMFMComponentType
enum | GwyMFMGradientType

## Includes

    #include <libprocess/gwyprocess.h>

## Description

## Functions

### gwy_data_field_mfm_perpendicular_stray_field ()

    void
    gwy_data_field_mfm_perpendicular_stray_field
                                   (GwyDataField *mfield,
                                    GwyDataField *out,
                                    gdouble height,
                                    gdouble thickness,
                                    gdouble sigma,
                                    gboolean walls,
                                    gdouble wall_delta);

Calculates stray field for perpendicular media, based on a mask showing the magnetisation orientation.

#### Parameters

mfield | Mask representing the magnetisation orientation. |
out | Target data field to put the result to. It will be resized to match `mfield` . |
height | Height above the surface. |
thickness | Film thickness. |
sigma | Magnetic charge. |
walls | Include domain walls. |
wall_delta | Domain wall thickness |

Since: 2.51

### gwy_data_field_mfm_perpendicular_stray_field_angle_correction ()

    void
    gwy_data_field_mfm_perpendicular_stray_field_angle_correction
                                   (GwyDataField *field,
                                    gdouble angle,
                                    GwyOrientation orientation);

Performs correction of magnetic data for cantilever tilt.

#### Parameters

field | Field to be processed. It will be changed by the correction. |
out | Cantilever angle in degrees. |
orientation | Cantilever orientation with respect of the data. |

Since: 2.54

### gwy_data_field_mfm_perpendicular_medium_force ()

    void
    gwy_data_field_mfm_perpendicular_medium_force
                                   (GwyDataField *hz,
                                    GwyDataField *fz,
                                    GwyMFMProbeType type,
                                    gdouble mtip,
                                    gdouble bx,
                                    gdouble by,
                                    gdouble length);

Calculates force as evaluated from z-component of the magnetic field for a given probe type.

#### Parameters

hz | Data field contaning the Z-component of the magnetic H field. |
fz | Target data field to put the result to. It will be resized to match `hz` . |
type | Probe type. |
mtip | Probe magnetic moment. |
bx | x size for parallelpiped probe. |
by | y size for parallelpiped probe. |
length | length (z size) for parallelpiped probe. |

Since: 2.51

### gwy_data_field_mfm_shift_z ()

    void
    gwy_data_field_mfm_shift_z (GwyDataField *dfield,
                                GwyDataField *out,
                                gdouble zdiff);

Shifts magnetic field to a different lift height above the surface.

Positive `zdiff` means away from the measured surface and blurring the data. Negative `zdiff` means shifting towards (or within) the measured surface and sharpening the data. For negative `zdiff` the result grows exponentially and is generally not very useful.

#### Parameters

dfield | Data field containing magnetic field component. |
out | Target data field to put the result to. |
zdiff | The shift distance in physical units. |

Since: 2.51

### gwy_data_field_mfm_find_shift_z ()

    gdouble
    gwy_data_field_mfm_find_shift_z (GwyDataField *dfield,
                                     GwyDataField *shifted,
                                     gdouble zdiffmin,
                                     gdouble zdiffmax);

Estimates the height difference between two magnetic field images.

See `gwy_data_field_mfm_shift_z()` for the sign convention. It is generally only meaningful to estimate the shift whe `shifted` was measured at larger lift height than `dfield` .

#### Parameters

dfield | Data field containing magnetic field component. |
shifted | Data field containing magnetic field component measured at a different lift height. |
zdiffmin | Start of shift scan range. |
zdiffmax | Start of shift scan range. |

#### Returns

The estimated shift between `shifted` and `dfield` .

Since: 2.51

### gwy_data_field_mfm_parallel_medium ()

    void
    gwy_data_field_mfm_parallel_medium (GwyDataField *hfield,
                                        gdouble height,
                                        gdouble size_a,
                                        gdouble size_b,
                                        gdouble size_c,
                                        gdouble magnetisation,
                                        gdouble thickness,
                                        GwyMFMComponentType component);

Calculates magnetic field or its derivatives above a simple medium consisting of stripes of left and right direction magnetisation. Results are added to the `hfield` array, so it should be cleared if function is run only once.

#### Parameters

hfield | Resulting array. |
height | Height above surface. |
size_a | Left direction oriented area width. |
size_b | Right direction orientated area width. |
size_c | Gap size. |
magnetisation | Remanent magnetisation. |
thickness | Film thickness. |
component | Component to output. |

Since: 2.51

### gwy_data_field_mfm_current_line ()

    void
    gwy_data_field_mfm_current_line (GwyDataField *hfield,
                                     gdouble height,
                                     gdouble width,
                                     gdouble position,
                                     gdouble current,
                                     GwyMFMComponentType component);

Calculates magnetic field or its derivatives above a flat current line (stripe). Results are added to the `hfield` array, so it should be cleared if function is run only once.

#### Parameters

hfield | Resulting array. |
height | Height above surface. |
width | Current line width. |
position | Current line x position in the resulting array. |
current | Curent passing through the line. |
component | Component to output. |

Since: 2.51

## Types and Values

### enum GwyMFMProbeType

Type of probe for calculation of force in magnetic field microscopy.

#### Members

GWY_MFM_PROBE_CHARGE | Magnetic point charge probe. |
GWY_MFM_PROBE_BAR | Finite rectangular bar. |

Since: 2.51

### enum GwyMFMComponentType

Type of field component calculated in magnetic field microscopy.

#### Members

GWY_MFM_COMPONENT_HX | X-component of magnetic field H. |
GWY_MFM_COMPONENT_HY | Y-component of magnetic field H. |
GWY_MFM_COMPONENT_HZ | Z-component of magnetic field H. |
GWY_MFM_COMPONENT_DHZ_DZ | Z-derivative of Z-component of magnetic field H. |
GWY_MFM_COMPONENT_D2HZ_DZ2 | Second Z-derivative of Z-component of magnetic field H. |

Since: 2.51

### enum GwyMFMGradientType

#### Members

GWY_MFM_GRADIENT_FORCE |  |
GWY_MFM_GRADIENT_MFM |  |
GWY_MFM_GRADIENT_MFM_AREA |  |