## cdline

cdline — Critical dimension measurement

## Functions

GwyInventory * | gwy_cdlines ()
const gchar * | gwy_cdline_get_name ()
const gchar * | gwy_cdline_get_definition ()
const gchar * | gwy_cdline_get_param_name ()
GwyUnit * | gwy_cdline_get_param_units ()
gint | gwy_cdline_get_param_power_x ()
gint | gwy_cdline_get_param_power_y ()
gint | gwy_cdline_get_n_params ()
void | gwy_cdline_fit ()
gdouble | gwy_cdline_get_value ()

## Types and Values

struct | GwyCDLine
struct | GwyCDLineClass

## Object Hierarchy

        GObject
        ╰── GwyResource
            ╰── GwyCDLine

## Includes

    #include <libgwyddion/gwyddion.h>

## Description

## Functions

### gwy_cdlines()

    GwyInventory *
    gwy_cdlines (void);

Gets inventory with all the critical dimension evaluators.

#### Returns

Critical dimension evaluator inventory.

### gwy_cdline_get_name()

    const gchar *
    gwy_cdline_get_name (GwyCDLine *cdline);

Return cdline name (its unique identifier).

#### Parameters

cdline | A critical dimension evaluator. |

#### Returns

The cdline name.

### gwy_cdline_get_definition()

    const gchar *
    gwy_cdline_get_definition (GwyCDLine *cdline);

Gets the name of the image file with critical dimension evaluator description.

#### Parameters

cdline | A critical dimension evaluator. |

#### Returns

The cdline function definition.

### gwy_cdline_get_param_name()

    const gchar *
    gwy_cdline_get_param_name (GwyCDLine *cdline,
                               gint i);

Returns the name of a critical dimension evaluator parameter.

The name may contain Pango markup.

#### Parameters

cdline | A NL evaluator function cdline. |
i | Parameter index. |

#### Returns

The name of `i` -th parameter.

### gwy_cdline_get_param_units()

    GwyUnit *
    gwy_cdline_get_param_units (GwyCDLine *cdline,
                                gint i,
                                GwyUnit *unit_x,
                                GwyUnit *unit_y);

Derives the SI unit of a critical dimension parameter from the units of abscissa and ordinate.

#### Parameters

cdline | A critical dimension evaluator. |
i | Parameter index. |
unit_x | SI unit of abscissa. |
unit_y | SI unit of ordinate. |

#### Returns

A newly created GwyUnit with the units of the `i` -th parameter. If the units are not representable as GwyUnit, the result is unitless (i.e. it will be presented as a mere number).

### gwy_cdline_get_param_power_x()

    gint
    gwy_cdline_get_param_power_x (GwyCDLine *cdline,
                                  gint i);

Gets the power of abscissa units in a critical dimension fitting parameter.

Usually it is easier to let `gwy_cdline_get_param_units()` derive the parameter units.

#### Parameters

cdline | A critical dimension evaluator. |
i | Parameter index. |

#### Returns

The power of abscissa in the parameter.

### gwy_cdline_get_param_power_y()

    gint
    gwy_cdline_get_param_power_y (GwyCDLine *cdline,
                                  gint i);

Gets the power of ordinate units in a critical dimension parameter.

Usually it is easier to let `gwy_cdline_get_param_units()` derive the parameter units.

#### Parameters

cdline | A critical dimension evaluator. |
i | Parameter index. |

#### Returns

The power of ordinate in the parameter.

### gwy_cdline_get_n_params()

    gint
    gwy_cdline_get_n_params (GwyCDLine *cdline);

Return the number of parameters of `cdline` .

#### Parameters

cdline | A critical dimension evaluator. |

#### Returns

The number of function parameters.

### gwy_cdline_fit()

    void
    gwy_cdline_fit (GwyCDLine *cdline,
                    gint n_dat,
                    const gdouble *x,
                    const gdouble *y,
                    gdouble *params,
                    gdouble *err);

Performs a critical dimension evaulation (fit).

#### Parameters

cdline | A critical dimension evaluator. |
n_dat | The number of data points (number of items in `x` and `y` ). |
x | Abscissa points. |
y | Ordinate points. |
params | Array to store fitted parameter values to. |
err | Array to store parameter errros to, may be `NULL`. |

### gwy_cdline_get_value()

    gdouble
    gwy_cdline_get_value (GwyCDLine *cdline,
                          gdouble x,
                          const gdouble *params,
                          gboolean *fres);

Calculates critical dimension function value in a single point with given parameters.

#### Parameters

cdline | A critical dimension evaluator. |
x | The point to compute value at. |
params | Evaluator parameter values. |
fres | Set to `TRUE` if succeeds, `FALSE` on failure. |

#### Returns

The function value.

## Types and Values

### struct GwyCDLine

    struct GwyCDLine;

### struct GwyCDLineClass

    struct GwyCDLineClass {
        GwyResourceClass parent_class;
    };