_images/CRIkit2_Logo.png







API Reference

This is not an exhaustive list of classes and functions, but rather those most likely to be of interest to users and developer. See Index and Module Index for a full list.

crikit.cri: Coherent Raman Imagery (CRI) classes and functions

Classes

cri.kk.KramersKronig([cars_amp_offset, …])

Retrieve the real and imaginary components of coherent Raman data via the Kramers-Kronig (KK) relation.

cri.error_correction.PhaseErrCorrectALS([…])

Phase error correction using alternating least squares (ALS)

cri.error_correction.ScaleErrCorrectSG([…])

Scale error correction using Savitky-Golay

Functions

cri.algorithms.kk.kkrelation(bg, cri[, …])

Retrieve the real and imaginary components of a CRI spectra(um) via the Kramers-Kronig (KK) relation.

cri.algorithms.kk.hilbertfft(y[, …])

Compute the one-dimensional Hilbert Transform.

crikit.data: Data container classes

Classes

data.frequency.Frequency([data, calib, …])

Frequency [,wavelength, and waevnumber] class

data.replicate.Replicate([data, calib, …])

Replicate class

data.spectrum.Spectrum([data, freq, label, …])

Spectrum class

data.spectra.Spectra([data, freq, label, …])

Spectra class

data.hsi.Hsi([data, freq, x, y, x_rep, …])

Hyperspectral imagery class

crikit.io: Input/Output (IO) functions

Functions

io.csv_nist.csv_nist_import_data(pth, …[, …])

Import dataset(s) from HDF file

io.hdf5.hdf_import_data(pth, filename, dset_list)

Import dataset(s) from HDF file

io.meta_configs.special_nist_bcars1_sample_scan()

Return import attributes particular to the “BCARS 1” system at NIST

io.meta_configs.special_nist_bcars2()

Return import attributes particular to the “BCARS 2” system at NIST

io.meta_process.meta_process(rosetta, …)

Uses a conversion dict (rosetta) to process the meta data in output_cls_instance

io.meta_process.rosetta_query(key, rosetta, …)

Return the highest-priority value

crikit.measurement: Measurement classes

Classes

measurement.fftspatialnoise.FFTSignalMetric(img_shp)

FFT Spatial Noise Metric (Ratio - 1)

measurement.peakamps.MeasurePeak(f1)

Meausure peak amplitude.

measurement.peakamps.MeasurePeakAdd(f1, f2)

Meausure the addition of two peaks (f1 + f2).

measurement.peakamps.MeasurePeakBWTroughs(pk, …)

Meausure the amplitude of a peak between troughs.

measurement.peakamps.MeasurePeakMinus(f1, f2)

Meausure the difference (subtraction) of two peaks (f1 - f2).

measurement.peakamps.MeasurePeakDivide(f1, f2)

Meausure the ratio (division) of two peaks.

measurement.peakamps.MeasurePeakMultiply(f1, f2)

Meausure the multiplication of two peak.

measurement.peakamps.MeasurePeakSummation

measurement.peakfind.PeakFinder(noise_sigma)

Find peaks and shoulders of a signal.

crikit.preprocess: Preprocessing classes and functions

Classes

preprocess.algorithms.als.AlsCvxopt([…])

preprocess.algorithms.anscombe.anscombe_inverse_exact_unbiased(fsignal)

Applies an exact, unbiased inverse of the Anscombe variance-stabilizing transformation assuming a mixed Poisson-Gaussian noise model as:

preprocess.algorithms.anscombe.gen_anscombe_forward(…)

Applies the generalized Anscombe variance-stabilization transform assuming a mixed Poisson-Gaussian noise model as:

preprocess.algorithms.anscombe.gen_anscombe_inverse_closed_form(…)

Applies a closed-form approximation of the exact unbiased inverse of the generalized Anscombe variance-stabilizing transformation assuming a mixed Poisson-Gaussian noise model as:

preprocess.algorithms.anscombe.gen_anscombe_inverse_exact_unbiased(…)

Applies an exact, unbiased inverse of the generalized Anscombe variance-stabilizing transformation assuming a mixed Poisson-Gaussian noise model as:

preprocess.algorithms.arpls.ArPlsCvxopt([…])

preprocess.crop.ZeroColumn([first_or_last, …])

Set first or last column that is not all 0’s to 0.

preprocess.crop.ZeroRow([first_or_last, …])

Set first or last row that is not all 0’s to 0.

preprocess.denoise.SVDDecompose([rng])

Compute the SVD of a signal (just wraps numpy.linalg.svd) i.e., decompose the input into components.

preprocess.denoise.SVDRecompose([rng])

Reconstruct the original data using the SVD components.

preprocess.standardize.Anscombe(gauss_std[, …])

Implement the generalized forward Anscombe transformation.

preprocess.standardize.AnscombeInverse(gauss_std)

Applies an exact, unbiased inverse of the generalized Anscombe variance-stabilizing transformation assuming a mixed Poisson-Gaussian noise model as:

preprocess.subtract_baseline.SubtractBaselineALS([…])

Subtract baseline using asymmetric least squares algorithm

preprocess.subtract_dark.SubtractDark(dark)

preprocess.subtract_mean.SubtractMeanOverRange([rng])

crikit.utils: Utility functions

Classes

utils.breadcrumb.BCPre([offset])

Container that describes processing steps (ie it contains “breadcrumbs”)

Functions

utils.general.arange_nonzero(start, stop[, …])

Similar to numpy arange but only returns non-zero elements

utils.general.expand_1d_to_ndim(data, ndim)

Make 1D array into ndim dimensions

utils.general.expand_1d_to_ndim_data(data, …)

Make 1D data array equal in dimensions to data_to_match

utils.general.find_nearest(np_vec[, to_find])

Given a vector and a value (or list/vector of values), find the index and value of the closest match

utils.general.lin_from_row_col(row, col, sh)

Convert a col and row counter to 1D linear count

utils.general.mean_nd_to_1d(data[, axis])

Take the mean of an nd array, except axis, returning a 1D array

utils.general.np_fcn_nd_to_1d(fcn, data[, axis])

Take in an n-dimensional array and return a 1D version operated on by fcn.

utils.general.row_col_from_lin(ct, sh)

Convert a 1D counter into a col and row counter

utils.general.std_nd_to_1d(data[, axis])

Take the mean of an nd array, except axis, returning a 1D array