nmrglue.linesh

Functions for fitting and simulating arbitrary dimensional lineshapes commonly found in NMR experiments

This module is imported as nmrglue.linesh and can be called as such

User Functions

These are the functions the majority of users will use from the linesh module.

fit_spectrum(spectrum, lineshapes, params, ...)

Fit a NMR spectrum by regions which contain one or more peaks.

fit_NDregion(region, lineshapes, params, amps)

Fit a N-dimensional region.

sim_NDregion(shape, lineshapes, params, amps)

Simulate an N-dimensional region with one or more peaks.

add_to_table(rec, columns, column_names)

Add (append) multiple columns to a records array.

pack_table(pbest, abest, iers, rec, ...[, ...])

Pack fitting parameters into table

unpack_table(rec, param_columns, amp_column)

Unpack initial fitting parameters from a table.

estimate_scales(spectrum, centers, box_width)

Estimate scale parameter for peaks in a spectrum.

Developer Functions

These functions are typically not used directly by users. Developers who want fine control over lineshape fitting may be interested in these functions.

make_slist(l, t_sizes)

Create a list of tuples of given sizes from a list

split_list(l, N)

Split list l into N sublists of equal size

calc_errors(region, ls_classes, p, cov, ...)

Calcuate the parameter errors from the standard errors of the estimate.

s_NDregion(p, shape, ls_classes, n_peaks)

Simulate an N-dimensional region with one or more peaks.

s_single_NDregion(p, shape, ls_classes)

Simulate an N-dimensional region with a single peak.

err_NDregion(p, region, shape, ls_classes, ...)

Error function for an N-dimensional region, called by f_NDregion()

f_NDregion(region, ls_classes, p0, p_bounds, ...)

Fit an N-dimensional regions containing one or more peaks.