Corrspecengine: Difference between revisions
Jump to navigation
Jump to search
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
Line 1: | Line 1: | ||
===Purpose=== | ===Purpose=== | ||
This function is the primary calculational engine for the function corrspec. It calculates the correlation maps and related matrices corrected for previously determined pure variables. | This function is the primary calculational engine for the function corrspec. It calculates the correlation maps and related matrices corrected for previously determined pure variables. | ||
===Synopsis=== | ===Synopsis=== | ||
:matrix = corrspecengine(data_x,data_y,purvar_index,offset, matrix_options); | :matrix = corrspecengine(data_x,data_y,purvar_index,offset, matrix_options); | ||
===Description=== | ===Description=== | ||
Calculates the matrices (weigh matrix, dispersion matrix and max matrix) needed for corrspec corrected for previously determined pure variables. | Calculates the matrices (weigh matrix, dispersion matrix and max matrix) needed for corrspec corrected for previously determined pure variables. | ||
====INPUTS==== | ====INPUTS==== | ||
* '''data_x''' : (2-way array class "double" or "dataset") x-matrix for dispersion matrix. | * '''data_x''' : (2-way array class "double" or "dataset") x-matrix for dispersion matrix. | ||
* '''data_y''' : (2-way array class "double" or "dataset") y-matrix for dispersion matrix. | * '''data_y''' : (2-way array class "double" or "dataset") y-matrix for dispersion matrix. | ||
* '''purvar_index''' : indices of maximum value in purity_values, i.e. the index of the pure variables. First column for x data, second column for y data. Empty when no pure variables have been chosen yet. When base_x is a single number n, the program calculates the first n pure purity_indices. | * '''purvar_index''' : indices of maximum value in purity_values, i.e. the index of the pure variables. First column for x data, second column for y data. Empty when no pure variables have been chosen yet. When base_x is a single number n, the program calculates the first n pure purity_indices. | ||
* '''offset''' : noise correction factor. One element defines offset for both x and y, two elements separately for x and y. | * '''offset''' : noise correction factor. One element defines offset for both x and y, two elements separately for x and y. | ||
* '''max''' : if not given, only weight matrix will be calculated, otherwise it contains 2 elements: the options the dispersion_matrix and the max_matrix: | * '''max''' : if not given, only weight matrix will be calculated, otherwise it contains 2 elements: the options the dispersion_matrix and the max_matrix: | ||
* '''1''': standardized, offset corrected | * '''1''': standardized, offset corrected | ||
* '''2''': length sqrt(nrows), offset corrected | * '''2''': length sqrt(nrows), offset corrected | ||
* '''3''': purity about mean, offset corrected | * '''3''': purity about mean, offset corrected | ||
* '''4''': purity about origin, offset corrected | * '''4''': purity about origin, offset corrected | ||
* '''5''': asynchronous, offset corrected | * '''5''': asynchronous, offset corrected | ||
====OUTPUTS==== | ====OUTPUTS==== | ||
* '''matrix''' : cell array with either one or three matrices, with size [ncols_y ncols_x] (ncols_y represents number of spectra in''' '''y, etc.). | * '''matrix''' : cell array with either one or three matrices, with size [ncols_y ncols_x] (ncols_y represents number of spectra in''' '''y, etc.). | ||
* '''matrix{1}''': weight_matrix, matrix used to correct for''' '''previously selected pure variables. | * '''matrix{1}''': weight_matrix, matrix used to correct for''' '''previously selected pure variables. | ||
* '''matrix{2}''': dispersion_matrix, matrix of interest,''' '''generally correlation matrix, corrected for''' '''previously selected pure variables. | * '''matrix{2}''': dispersion_matrix, matrix of interest,''' '''generally correlation matrix, corrected for''' '''previously selected pure variables. | ||
* '''matrix{3}''': max_matrix, matrix from which pure variables''' '''are chosen, generally a co-purity matrix ''' '''corrected for previously selected pure variables. | * '''matrix{3}''': max_matrix, matrix from which pure variables''' '''are chosen, generally a co-purity matrix ''' '''corrected for previously selected pure variables. | ||
===See Also=== | ===See Also=== | ||
[[corrspec]], [[dispmat]] | [[corrspec]], [[dispmat]] |
Revision as of 14:24, 3 September 2008
Purpose
This function is the primary calculational engine for the function corrspec. It calculates the correlation maps and related matrices corrected for previously determined pure variables.
Synopsis
- matrix = corrspecengine(data_x,data_y,purvar_index,offset, matrix_options);
Description
Calculates the matrices (weigh matrix, dispersion matrix and max matrix) needed for corrspec corrected for previously determined pure variables.
INPUTS
- data_x : (2-way array class "double" or "dataset") x-matrix for dispersion matrix.
- data_y : (2-way array class "double" or "dataset") y-matrix for dispersion matrix.
- purvar_index : indices of maximum value in purity_values, i.e. the index of the pure variables. First column for x data, second column for y data. Empty when no pure variables have been chosen yet. When base_x is a single number n, the program calculates the first n pure purity_indices.
- offset : noise correction factor. One element defines offset for both x and y, two elements separately for x and y.
- max : if not given, only weight matrix will be calculated, otherwise it contains 2 elements: the options the dispersion_matrix and the max_matrix:
- 1: standardized, offset corrected
- 2: length sqrt(nrows), offset corrected
- 3: purity about mean, offset corrected
- 4: purity about origin, offset corrected
- 5: asynchronous, offset corrected
OUTPUTS
- matrix : cell array with either one or three matrices, with size [ncols_y ncols_x] (ncols_y represents number of spectra in y, etc.).
- matrix{1}: weight_matrix, matrix used to correct for previously selected pure variables.
- matrix{2}: dispersion_matrix, matrix of interest, generally correlation matrix, corrected for previously selected pure variables.
- matrix{3}: max_matrix, matrix from which pure variables are chosen, generally a co-purity matrix corrected for previously selected pure variables.