The functionality provided by the fitnmr package can be divided into several categories:

Spectrum reading, plotting, and analysis

Spectra in the NMRPipe file format can be read with read_nmrpipe. Those spectra can be plotted with contour_pipe. The noise level within a spectrum (or any numeric vector) can be calculated with noise_estimate.

Low-level fitting and plotting

The core fitting procedure consists of a two-step process: First, the fit input is created with make_fit_input. Second, the fit is executed with perform_fit. Prior to running the fit, constraints can be added to the fit with either update_fit_bounds or limit_omega0_by_r2.

Before or after a fit has been performed, you can extract the raw, starting, or fit spectral intensities with get_spec_int. Furthermore, there are convenience plotting functions for plotting 1D (plot_fit_1d) or 2D (plot_fit_2d) fits.

The make_fit_input function takes many different parameters. To make a new fit from an existing fit, possibly with a different set of spectra or otherwise modified fitting parameters, param_list_to_arg_list can be helpful in generating a list of parameters for make_fit_input.

Modifying parameter lists for fits

In fitnmr, a "parameter list" is a named list data structure that has all the information necessary to describe a set of peaks and interdependencies between the parameters for those peaks. It containins three elements: start_list (or also fit_list after a fit has been performed), group_list, and comb_list. Fitting constraints can also be stored in lower_list and upper_list. Each of those is itself a named list of arrays corresponding to different parameters, namely omega0, r2, m0, p0, p1, and omega0_comb. To help manage the values stored in those lists (particularly omega0 and omega0_comb), there are several convenience functions to select particular subsets, including omega0_param_idx and coupling_param_idx. Once a subset is made, the parameters can be read or changed using param_values.

NMRPipe simulation and processing

ppm_to_pts, whz_to_pts, write_nmrdraw_peak_tab, sim_time_nd, nmr_pipe

Postprocessing and assignment

height_assign, read_nmrdraw_peak_tab