MFM: Gwyddion Library Reference Manual

## MFM MFM — Magnetic force microscopy |

## Functions

void | gwy_field_mfm_perpendicular_stray_field ()
void | gwy_field_mfm_perpendicular_stray_field_angle_correction ()
void | gwy_field_mfm_perpendicular_medium_force ()
void | gwy_field_mfm_shift_z ()
gdouble | gwy_field_mfm_find_shift_z ()
void | gwy_field_mfm_parallel_medium ()
void | gwy_field_mfm_current_line ()

## Types and Values

enum | GwyMFMProbeType
enum | GwyMFMComponentType
enum | GwyMFMGradientType

## Includes

    #include <libgwyddion/gwyddion.h>

## Description

## Functions

### gwy_field_mfm_perpendicular_stray_field()

    void
    gwy_field_mfm_perpendicular_stray_field
                                   (GwyField *mfield,
                                    GwyField *out,
                                    gdouble height,
                                    gdouble thickness,
                                    gboolean walls,
                                    gdouble wall_delta);

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

The input field would often be filled with only two different values, -`sigma` and +`sigma` , depending on the domain orientation. However, it is not a requirement.

#### Parameters

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

### gwy_field_mfm_perpendicular_stray_field_angle_correction()

    void
    gwy_field_mfm_perpendicular_stray_field_angle_correction
                                   (GwyField *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. |
angle | Cantilever angle in degrees. |
orientation | Cantilever orientation with respect of the data. |

### gwy_field_mfm_perpendicular_medium_force()

    void
    gwy_field_mfm_perpendicular_medium_force
                                   (GwyField *hz,
                                    GwyField *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. |

### gwy_field_mfm_shift_z()

    void
    gwy_field_mfm_shift_z (GwyField *dfield,
                           GwyField *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. |

### gwy_field_mfm_find_shift_z()

    gdouble
    gwy_field_mfm_find_shift_z (GwyField *dfield,
                                GwyField *shifted,
                                gdouble zdiffmin,
                                gdouble zdiffmax);

Estimates the height difference between two magnetic field images.

See `gwy_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` .

### gwy_field_mfm_parallel_medium()

    void
    gwy_field_mfm_parallel_medium (GwyField *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. |

### gwy_field_mfm_current_line()

    void
    gwy_field_mfm_current_line (GwyField *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. |

## 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. |

### 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. |

### enum GwyMFMGradientType

#### Members

GWY_MFM_GRADIENT_FORCE |  |
GWY_MFM_GRADIENT_MFM |  |
GWY_MFM_GRADIENT_MFM_AREA |  |