Resolutions Class

Resolutions are defined in a two stage process. Firstly, actual fitted parameters are defined. These are held in a ‘Parameter Class’ table (referring to data type). Then, these are grouped into the resolutions themselves using a multi-type table. Then the resolution parameters can be used to either define resolution as constant, data, or a function.

The constructor is called with the parameters and resolutions as input. The parameters are stored in the resolPars table whereas the resolutions are stored in the resolutions table and the allowed types are defined in the allowedTypes variable.

Note

  1. For constant only one parameter is supplied to multi-type table.

  2. For data, the name is supplied, along with name of the data in the data table.

  3. For function, the function name is supplied, along with up to three parameters (from the parameters table) which are then supplied to the function to calculate the resolution.

In each case, the Resolutions can either be added to or subtracted from the data.

Reference

class API.projectClass.resolutionsClass(parameters, startResolution)

Resolutions are defined in a two stage process. Firstly we define the actual fitted parameters. These are held in a ‘ParametersClass’ table. Then, we group these into the resolutions themselves using a multiTypeTable. So, we can then use the resolution parameters to either define resolution as constant, data or a function.

For constant only one parameter is supplied to multi type table.

For data the name is supplied, along with the name of the data in the data table.

For function, the function name is supplied, along with up to three parameters (from the parameters table) which are then supplied to the function to calculate the resolution.

addResolution(varargin)

Adds a new entry to the resolution table.

resolution.addResolution(‘New Row’); resolution.addResolution(‘New Row’, ‘constant’, ‘param_name’); resolution.addResolution(‘New Row’, ‘function’, ‘function_name’, ‘param_name’); resolution.addResolution(‘New Row’, ‘data’);

displayResolutionsObject()

Displays the resolution parameters and resolution table.

getNames()

Returns a N x 1 cell array of names of the resolutions in the object.

names = resolution.getNames();

removeResolution(row)

Removes a resolution entry from the table. Expects the index or array of indices of resolution(s) to remove.

resolution.removeResolution(2); resolution.removeResolution([1, 3]);

resolutionsClass(parameters, startResolution)

Creates a Resolutions object. The arguments should be an instance of the parameter class with the resolution parameters and a cell array with the first resolution entry

params = parametersClass({‘Resolution Param 1’, 0.01, 0.03, 0.05, false}); resolution = resolutionsClass(params , {‘Resolution 1’, ‘constant’, ‘Tails’});

setResolution(row, varargin)

Changes the value of a given resolution in the table. Expects the index or name of resolution and keyword/value pairs to set.

resolution.setResolution(1, ‘name’, ‘resolution 1’, ‘type’, ‘constant’, ‘value1’, ‘param_name’);

setResolutionName(row, name)

Sets the name of a given resolution in the table. Expects an index and the new name.

resolution.setResolutionName(1, ‘new_name’);

toStruct()

Converts the class parameters into a structure array.