CLASS ndi.calc.stimulus.tuningcurve
TUNINGCURVE - a tuningcurve demonstration of an ndi.calculator object
TUNINGCURVE_OBJ = TUNINGCURVE(SESSION)
Creates a TUNINGCURVE ndi.calculator object
Superclasses
ndi.calculator, ndi.app, ndi.documentservice, ndi.app.appdoc, ndi.mock.ctest
Properties
Property | Description |
---|---|
fast_start | |
session | |
name | |
doc_types | |
doc_document_types | |
doc_session | |
base_scope |
Methods
Method | Description |
---|---|
add_appdoc | Load data from an application document |
appdoc_description | return documentation for the type of document that is created by this calculator. |
are_input_parameters_equivalent | are two sets of input parameters equivalent? |
best_value | calculate the stimulus with the "best" response |
best_value_empirical | find the best response value for a given stimulus property |
calc_path | CALC_PATH return the path to the ndi.calculator object |
calculate | perform the calculator for ndi.calc.example.tuningcurve |
clean_mock_docs | remove mock/test documents |
clear_appdoc | remove an ndi.app.appdoc document from a session database |
compare_mock_docs | compare an expected calculation answer with an actual answer |
default_parameters_query | what queries should be used to search for input parameters if none are provided? |
default_scope | default scope types for ndi.mock.ctest object |
default_search_for_input_parameters | default parameters for searching for inputs |
defaultstruct_appdoc | return a default appdoc structure for a given APPDOC type |
doc2struct | create an ndi.document from an input structure and input parameters |
doc_about | --------------------------------------------------------------------------------------------- |
docfiletext | return the text in the requested documentation file |
find_appdoc | find an ndi.app.appdoc document in the session database |
generate_mock_docs | generate tests for ndi.calc.* objects |
graphical_edit_calculator | create and control a GUI to graphically edit an NDI calculator instance |
is_valid_dependency_input | is a potential dependency input actually valid for this calculator? |
isequal_appdoc_struct | are two APPDOC data structures the same (equal)? |
isvalid_appdoc_struct | is an input structure a valid descriptor for an APPDOC? |
load_mock_expected_output | load expected NDI document answer for a calculation |
loaddata_appdoc | Load data from an application document |
mock_expected_filename | file of expected NDI document answer for a calculation |
mock_path | return the path to the stored mock example output documents |
newdocument | return a new database document of type ndi.document based on an app |
parameter_default | return the default parameter code for a given calculator_type |
parameter_examples | return the parameter code examples for a given calculator_type |
plot | provide a diagnostic plot to show the results of the calculator |
plot_parameters | provide a diagnostic plot to show the results of the calculator, if appropriate |
property_value_array | find all values of a stimulus property |
run | run calculator on all possible inputs that match some parameters |
search_for_calculator_docs | search for previous calculators |
search_for_input_parameters | search for valid inputs to the calculator |
searchquery | return a search query for an ndi.document related to this app |
struct2doc | create an ndi.document from an input structure and input parameters |
test | perform a test of an ndi.calculator object |
tuningcurve | a tuningcurve demonstration of an ndi.calculator object |
varappname | return the name of the application for use in variable creation |
version_url | return the app version and url |
write_mock_expected_output | write |
Methods help
add_appdoc - Load data from an application document
[...] = ADD_APPDOC(NDI_APPDOC_OBJ, APPDOC_TYPE, ...
APPDOC_STRUCT, DOCEXISTSACTION, [additional arguments])
Creates a new ndi.document that is based on the type APPDOC_TYPE with creation data
specified by APPDOC_STRUCT. [additional inputs] are used to find or specify the
NDI_document in the database. They are passed to the function FIND_APPDOC,
so see help FIND_APPDOC for the documentation for each app.
The DOC is returned as a cell array of NDI_DOCUMENTs (should have 1 entry but could have more than
1 if the document already exists).
If APPDOC_STRUCT is empty, then default values are used. If it is a character array, then it is
assumed to be a filename of a tab-separated-value text file. If it is an ndi.document, then it
is assumed to be an ndi.document and it will be converted to the parameters using DOC2STRUCT.
This function also takes a string DOCEXISTSACTION that describes what it should do
in the event that the document fitting the [additional inputs] already exists:
DOCEXISTACTION value | Description
----------------------------------------------------------------------------------
'Error' | An error is generating indicating the document exists.
'NoAction' | The existing document is left alone. The existing ndi.document
| is returned in DOC.
'Replace' | Replace the document; note that this deletes all NDI_DOCUMENTS
| that depend on the original.
'ReplaceIfDifferent' | Conditionally replace the document, but only if the
| the data structures that define the document are not equal.
Help for ndi.calc.stimulus.tuningcurve/add_appdoc is inherited from superclass ndi.app.appdoc
appdoc_description - return documentation for the type of document that is created by this calculator.
TEXT = APP_DOC_DESCRIPTION(NDI_CALCULATOR_OBJ)
Returns the help information for the document type for an NDI
calculator object.
Help for ndi.calc.stimulus.tuningcurve/appdoc_description is inherited from superclass ndi.calculator
are_input_parameters_equivalent - are two sets of input parameters equivalent?
B = ARE_INPUT_PARAMETERS_EQUIVALENT(NDI_CALCULATOR_OBJ, INPUT_PARAMETERS1, INPUT_PARAMETERS2)
Are two sets of input parameters equivalent? This function is used by
SEARCH_FOR_CALCULATOR_DOCS to determine whether potential documents
were actually generated by identical input parameters.
In the base class, the structures are first re-organized so that all one-dimensional
substructures are columns and then compared with vlt.data.eqlen(INPUT_PARAMETERS1, INPUT_PARAMETERS2).
It is necessary to "columnize" the substructures because Matlab does not not necessarily preserve that
orientation when data is written to or read from JSON.
Help for ndi.calc.stimulus.tuningcurve/are_input_parameters_equivalent is inherited from superclass ndi.calculator
best_value - calculate the stimulus with the "best" response
[N,V,PROPERTY_VALUE] = ndi.calc.stimulus.tuningcurve.best_value(NDI_CALC_STIMULUS_TUNINGCURVE, ALGORITHM, ...
STIM_RESPONSE_DOC, PROPERTY)
Given an ndi.document of type STIMULUS_RESPONSE_SCALAR, return the stimulus presentation number N with
the "best" response, as determined by ALGORITHM, for any stimulus that has the property PROPERTY.
N is the stimulus number that meets the criteria. V is the best response value. PROPERTY_VALUE
is the value of the PROPERTY of stimulus N.
The algorithms known are:
-------------------------------------------------------------------------------------
'empirical_maximum' | Use the stimulus with the empirically largest mean value.
best_value_empirical - find the best response value for a given stimulus property
[N, V, PROPERTY_VALUE] = ndi.calc.stimulus.tuningcurve.best_value_empirical(NDI_CALC_STIMULUS_TUNINGCURVE_OBJ, STIM_RESPONSE_DOC, PROPERTY)
Given an ndi.document of type STIMULUS_RESPONSE_SCALAR, return the stimulus presentation number N with
largest mean response for any stimulus that has the property PROPERTY. If the value is complex-valued,
then the largest absolute value is used.
N is the stimulus number that meets the criteria. V is the best response value. PROPERTY_VALUE
is the value of the PROPERTY of stimulus N.
If this function cannot find a stimulus presentation document for the STIM_RESPONSE_DOC, it produces
an error.
calc_path - CALC_PATH return the path to the ndi.calculator object
P = CALC_PATH(CTEST_OBJ)
Return the path of an ndi.calculator object.
Help for ndi.calc.stimulus.tuningcurve/calc_path is inherited from superclass ndi.mock.ctest
calculate - perform the calculator for ndi.calc.example.tuningcurve
DOC = CALCULATE(NDI_CALCULATOR_OBJ, PARAMETERS)
Creates a tuningcurve_calc document given input parameters.
The document that is created tuningcurve
by the input parameters.
check inputs
clean_mock_docs - remove mock/test documents
Help for ndi.calc.stimulus.tuningcurve/clean_mock_docs is inherited from superclass ndi.mock.ctest
clear_appdoc - remove an ndi.app.appdoc document from a session database
B = CLEAR_APPDOC(NDI_APPDOC_OBJ, APPDOC_TYPE, [additional inputs])
Deletes the app document of style DOC_NAME from the database.
[additional inputs] are used to find the NDI_document in the database.
They are passed to the function FIND_APPDOC, so see help FIND_APPDOC for the documentation
for each app.
B is 1 if the document is found, and 0 otherwise.
Help for ndi.calc.stimulus.tuningcurve/clear_appdoc is inherited from superclass ndi.app.appdoc
compare_mock_docs - compare an expected calculation answer with an actual answer
[B, ERRORMSG] = COMPARE_MOCK_DOCS(CTEST_OBJ, EXPECTED_DOC, ACTUAL_DOC, SCOPE)
Given an NDI document with the expected answer to a calculation (EXPECTED_DOC),
the ACTUAL_DOC computed, and the SCOPE (a string: 'standard', 'low_noise','high_noise'),
this function computes whether the ACTUAL_DOC is within an allowed tolerance of
EXPECTED_DOC.
B is 1 if the differences in the documents are within the tolerance of the class.
Otherwise, B is 0.
If B is 0, ERRORMSG is a string that indicates where the ACTUAL_DOC is out of tolerance.
In this abstract class, B is always 1 and ERRORMSG is always an empty string.
Developer's note: this method should be overridden in each calculator object.
Help for ndi.calc.stimulus.tuningcurve/compare_mock_docs is inherited from superclass ndi.mock.ctest
default_parameters_query - what queries should be used to search for input parameters if none are provided?
QUERY = DEFAULT_PARAMETERS_QUERY(NDI_CALCULATOR_OBJ, PARAMETERS_SPECIFICATION)
When one calls SEARCH_FOR_INPUT_PARAMETERS, it is possible to specify a 'query' structure to
select particular documents to be placed into the parameters 'depends_on' specification.
If one does not provide any 'query' structure, then the default values here are used.
The function returns:
|-----------------------|----------------------------------------------|
| query | A structure with 'name' and 'query' fields |
| | that describes a search to be performed to |
| | identify inputs for the 'depends_on' field |
| | in the PARAMETERS output. |
|-----------------------|-----------------------------------------------
For the ndi.calc.stimulus.tuningcurve_calc class, this first checks to see if
fixed dependencies are already specified. If not, then it looks for
documents of type 'stimulus_response_scalar' with 'response_type' fields
the contain 'mean' or 'F1'.
default_scope - default scope types for ndi.mock.ctest object
BASE_SCOPE = ndi.mock.ctest.default_scope();
Return a default base_scope structure for an ndi.mock.ctest object.
Help for ndi.calc.stimulus.tuningcurve.default_scope is inherited from superclass ndi.mock.ctest
default_search_for_input_parameters - default parameters for searching for inputs
PARAMETERS = DEFAULT_SEARCH_FOR_INPUT_PARAMETERS(NDI_CALCULATOR_OBJ)
Returns a list of the default search parameters for finding appropriate inputs
to the calculator. For tuningcurve_calc, there is no appropriate default parameters
so this search will yield empty.
defaultstruct_appdoc - return a default appdoc structure for a given APPDOC type
APPDOC_STRUCT = DEFAULTSTRUCT_APPDOC(NDI_APPDOC_OBJ, APPDOC_TYPE)
Return the default data structure for a given APPDOC_TYPE of an ndi.app.appdoc object.
In the base class, the blank version of the ndi.document is read in and the
default structure is built from the ndi.document's class property list.
Help for ndi.calc.stimulus.tuningcurve/defaultstruct_appdoc is inherited from superclass ndi.app.appdoc
doc2struct - create an ndi.document from an input structure and input parameters
DOC = STRUCT2DOC(NDI_APPDOC_OBJ, SESSION, APPDOC_TYPE, APPDOC_STRUCT, [additional parameters]
Create an ndi.document from a data structure APPDOC_STRUCT. The ndi.document is created
according to the APPDOC_TYPE of the NDI_APPDOC_OBJ.
In the base class, this uses the property info in the ndi.document to load the data structure.
Help for ndi.calc.stimulus.tuningcurve/doc2struct is inherited from superclass ndi.app.appdoc
doc_about - ---------------------------------------------------------------------------------------------
NDI_CALCULATOR: TUNINGCURVE_CALC
----------------------------------------------------------------------------------------------
------------------------
| TUNINGCURVE_CALC -- ABOUT |
------------------------
TUNINGCURVE_CALC is a demonstration document. It simply produces the 'answer' that
is provided in the input parameters. Each TUNINGCURVE_CALC document 'depends_on' an
NDI daq system.
Definition: apps/tuningcurve_calc.json
docfiletext - return the text in the requested documentation file
TEXT = ndi.calculator.docfiletext(CALCULATOR_TYPE, DOC_TYPE)
Returns the text of the documentation files.
CALCULATOR_TYPE should be the full object name of the calculator of interest.
(for example: 'ndi.calc.stimulus.tuningcurve' or 'ndi.calc.vis.contrasttuning')
DOC_TYPE should be the type of document requested ('general', 'output', 'searching for inputs')
Example:
text = ndi.calculator.docfiletext('ndi.calc.stimulus.tuningcurve','general');
Help for ndi.calc.stimulus.tuningcurve.docfiletext is inherited from superclass ndi.calculator
find_appdoc - find an ndi.app.appdoc document in the session database
DOC = FIND_APPDOC(NDI_APPDOC_OBJ, APPDOC_TYPE, [additional inputs])
Using search criteria that is supported by [additional inputs], FIND_APPDOC
searches the database for the ndi.document object DOC that is
described by APPDOC_TYPE.
DOC is always a cell array of all matching NDI_DOCUMENTs.
In this superclass, empty is always returned. Subclasses should override
this function to search for each document type.
The documentation for subclasses should be in the overriden function
APPDOC_DESCRIPTION.
Help for ndi.calc.stimulus.tuningcurve/find_appdoc is inherited from superclass ndi.app.appdoc
generate_mock_docs - generate tests for ndi.calc. objects*
[DOCS, DOC_OUTPUT, DOC_EXPECTED_OUTPUT] = GENERATE_MOCK_DOCS(CSTEST_OBJ,...
SCOPE, NUMBER_OF_TESTS)
SCOPE should be one of 'standard', 'low_noise', or 'high_noise'.
'standard' performs tests on specific hard-coded inputs.
'low_noise' performs tests on specific hard-coded inputs with small amounts
of noise added.
'high_noise' performs tests on specific hard-coded inputs with large amounts
of noise added.
NUMBER_OF_TESTS is the number of tests to generate.
Help for ndi.calc.stimulus.tuningcurve/generate_mock_docs is inherited from superclass ndi.mock.ctest
graphical_edit_calculator - create and control a GUI to graphically edit an NDI calculator instance
GRAPHICAL_EDIT_CALCULATOR(...)
Creates and controls a graphical user interface for creating an instance of
an ndi.calculator object.
Usage by the user:
GRAPHICAL_EDIT_CALCULATOR('command','NEW','type','ndi.calc.TYPE','filename',filename,'name',name)
or
GRAPHICAL_EDIT_CALCULATOR('command','EDIT','filename',filename)
Help for ndi.calc.stimulus.tuningcurve.graphical_edit_calculator is inherited from superclass ndi.calculator
is_valid_dependency_input - is a potential dependency input actually valid for this calculator?
B = IS_VALID_DEPENDENCY_INPUT(NDI_CALCULATOR_OBJ, NAME, VALUE)
Tests whether a potential input to a calculator is valid.
The potential dependency name is provided in NAME and its base id is
provided in VALUE.
The base class behavior of this function is simply to return true, but it
can be overriden if additional criteria beyond an ndi.query are needed to
assess if a document is an appropriate input for the calculator.
isequal_appdoc_struct - are two APPDOC data structures the same (equal)?
B = ISEQUAL_APPDOC_STRUCT(NDI_APPDOC_OBJ, APPDOC_TYPE, APPDOC_STRUCT1, APPDOC_STRUCT2)
Returns 1 if the structures APPDOC_STRUCT1 and APPDOC_STRUCT2 are valid and equal. This is true if
APPDOC_STRUCT2
true if APPDOC_STRUCT1 and APPDOC_STRUCT2 have the same field names and same values and same sizes. That is,
B is vlt.data.eqlen(APPDOC_STRUCT1, APPDOC_STRUCT2).
Help for ndi.calc.stimulus.tuningcurve/isequal_appdoc_struct is inherited from superclass ndi.calculator
isvalid_appdoc_struct - is an input structure a valid descriptor for an APPDOC?
[B,ERRORMSG] = ISVALID_APPDOC_STRUCT(NDI_APPDOC_OBJ, APPDOC_TYPE, APPDOC_STRUCT)
Examines APPDOC_STRUCT and determines whether it is a valid input for creating an
ndi.document described by APPDOC_TYPE. B is 1 if it is valid and 0 otherwise.
In the base class, B is always 0 with ERRORMSG 'Base class always returns invalid.'
Help for ndi.calc.stimulus.tuningcurve/isvalid_appdoc_struct is inherited from superclass ndi.app.appdoc
load_mock_expected_output - load expected NDI document answer for a calculation
DOC = LOAD_MOCK_EXPECTED_OUTPUT(CTEST_OBJ, N)
Load the Nth stored ndi.document that contains the expected answer for the
Nth standard mock test.
Help for ndi.calc.stimulus.tuningcurve/load_mock_expected_output is inherited from superclass ndi.mock.ctest
loaddata_appdoc - Load data from an application document
[...] = LOADDATA_APPDOC(NDI_APPDOC_OBJ, APPDOC_TYPE, [additional arguments])
Loads the data from app document of style DOC_NAME from the database.
[additional inputs] are used to find the NDI_document in the database.
They are passed to the function FIND_APPDOC, so see help FIND_APPDOC for the documentation
for each app.
In the base class, this always returns empty. This function should be overridden by each
subclass.
The documentation for subclasses should be in the overridden function APPDOC_DESCRIPTION.
Help for ndi.calc.stimulus.tuningcurve/loaddata_appdoc is inherited from superclass ndi.app.appdoc
mock_expected_filename - file of expected NDI document answer for a calculation
FNAME = MOCK_EXPECTED_FILENAME(CTEST_OBJ, N)
Return the filename for the Nth stored ndi.document that contains the expected
answer for the Nth standard mock test.
Help for ndi.calc.stimulus.tuningcurve/mock_expected_filename is inherited from superclass ndi.mock.ctest
mock_path - return the path to the stored mock example output documents
MP = MOCK_PATH(CTEST_OBJ)
Returns the path to the mock document example outputs.
The returned path ends in a file separator.
Help for ndi.calc.stimulus.tuningcurve/mock_path is inherited from superclass ndi.mock.ctest
newdocument - return a new database document of type ndi.document based on an app
NDI_DOCUMENT_OBJ = NEWDOCUMENT(NDI_APP_OBJ)
Creates a blank ndi.document object of type 'app'. The 'app.name' field
is filled out with the name of NDI_APP_OBJ.VARAPPNAME().
Help for ndi.calc.stimulus.tuningcurve/newdocument is inherited from superclass ndi.app
parameter_default - return the default parameter code for a given calculator_type
[CONTENTS] = ndi.calculator.parameter_examples(CALCULATOR_TYPE)
Return the default parameter code CONTENTS for a given CALCULATOR_TYPE. CONTENTS is a
character string.
Example:
[contents] = ndi.calculator.parameter_default('ndi.calc.stimulus.tuningcurve');
Help for ndi.calc.stimulus.tuningcurve.parameter_default is inherited from superclass ndi.calculator
parameter_examples - return the parameter code examples for a given calculator_type
[NAMES, CONTENTS] = ndi.calculator.parameter_examples(CALCULATOR_TYPE)
Return the example NAMES and parameter example code CONTENTS for a given CALCULATOR_TYPE.
NAMES is a cell array of strings with the code example names. CONTENTS is a cell array of strings with
the contents of the code examples.
Example:
[names,contents] = ndi.calculator.parameter_examples('ndi.calc.stimulus.tuningcurve');
Help for ndi.calc.stimulus.tuningcurve.parameter_examples is inherited from superclass ndi.calculator
plot - provide a diagnostic plot to show the results of the calculator
H=PLOT(NDI_CALCULATOR_OBJ, DOC_OR_PARAMETERS, ...)
Produce a plot of the tuning curve.
Handles to the figure, the axes, and any objects created are returned in H.
This function takes additional input arguments as name/value pairs.
See ndi.calculator.plot_parameters for a description of those parameters.
plot_parameters - provide a diagnostic plot to show the results of the calculator, if appropriate
PLOT(NDI_CALCULATOR_OBJ, DOC_OR_PARAMETERS, ...)
Produce a diagnostic plot that can indicate to a reader whether or not
the calculator has been performed in a manner that makes sense with
its input data. Useful for debugging / validating a calculator.
By default, this plot is made in the current axes.
This function takes additional input arguments as name/value pairs:
|---------------------------|--------------------------------------|
| Parameter (default) | Description |
|---------------------------|--------------------------------------|
| newfigure (0) | 0/1 Should we make a new figure? |
| holdstate (0) | 0/1 Should we preserve the 'hold' |
| | state of the current axes? |
| suppress_x_label (0) | 0/1 Should we suppress the x label? |
| suppress_y_label (0) | 0/1 Should we suppress the y label? |
| suppress_z_label (0) | 0/1 Should we suppress the z label? |
| suppress_title (0) | 0/1 Should we suppress the title? |
|---------------------------|--------------------------------------|
Help for ndi.calc.stimulus.tuningcurve.plot_parameters is inherited from superclass ndi.calculator
property_value_array - find all values of a stimulus property
[PVA] = ndi.calc.stimulus.tuningcurve.property_value_array(NDI_CALC_STIMULUS_TUNINGCURVE_OBJ, STIM_RESPONSE_DOC, PROPERTY)
Given an ndi.document of type STIMULUS_RESPONSE_SCALAR, return all values of the parameter PROPERTY that were
used in the stimulus.
Values will be returned in a cell array.
If this function cannot find a stimulus presentation document for the STIM_RESPONSE_DOC, it produces
an error.
run - run calculator on all possible inputs that match some parameters
DOCS = RUN(NDI_CALCULATOR_OBJ, DOCEXISTSACTION, PARAMETERS)
DOCEXISTSACTION can be 'Error', 'NoAction', 'Replace', or 'ReplaceIfDifferent'
For calculators, 'ReplaceIfDifferent' is equivalent to 'NoAction' because
the input parameters define the calculator.
Step 1: set up input parameters; they can either be completely specified by
the caller, or defaults can be used
Help for ndi.calc.stimulus.tuningcurve/run is inherited from superclass ndi.calculator
search_for_calculator_docs - search for previous calculators
[DOCS] = SEARCH_FOR_CALCULATOR_DOCS(NDI_CALCULATOR_OBJ, PARAMETERS)
Performs a search to find all previously-created calculator
documents that this mini-app creates.
PARAMETERS is a structure with the following fields
|------------------------|----------------------------------|
| Fieldname | Description |
|-----------------------------------------------------------|
| input_parameters | A structure of input parameters |
| | needed by the calculator. |
| depends_on | A structure with fields 'name' |
| | and 'value' that indicates any |
| | exact matches that should be |
| | satisfied. |
|------------------------|----------------------------------|
in the abstract class, this returns empty
Help for ndi.calc.stimulus.tuningcurve/search_for_calculator_docs is inherited from superclass ndi.calculator
search_for_input_parameters - search for valid inputs to the calculator
PARAMETERS = SEARCH_FOR_INPUT_PARAMETERS(NDI_CALCULATOR_OBJ, PARAMETERS_SPECIFICATION)
Identifies all possible sets of specific input PARAMETERS that can be
used as inputs to the calculator. PARAMETERS is a cell array of parameter
structures with fields 'input_parameters' and 'depends_on'.
PARAMETERS_SPECIFICATION is a structure with the following fields:
|----------------------------------------------------------------------|
| input_parameters | A structure of fixed input parameters needed |
| | by the calculator. Should not depend on |
| | values in other documents. |
| depends_on | A structure with 'name' and 'value' fields |
| | that lists specific inputs that should be |
| | used for the 'depends_on' field in the |
| | PARAMETERS output. |
| query | A structure with 'name' and 'query' fields |
| | that describes a search to be performed to |
| | identify inputs for the 'depends_on' field |
| | in the PARAMETERS output. |
|-----------------------|-----------------------------------------------
Help for ndi.calc.stimulus.tuningcurve/search_for_input_parameters is inherited from superclass ndi.calculator
searchquery - return a search query for an ndi.document related to this app
C = SEARCHQUERY(NDI_APP_OBJ)
Returns a cell array of strings that allow the creation or searching of an
ndi.database document for this app with field 'app' that has subfield 'name' equal
to the app's VARAPPNAME.
Help for ndi.calc.stimulus.tuningcurve/searchquery is inherited from superclass ndi.app
struct2doc - create an ndi.document from an input structure and input parameters
DOC = STRUCT2DOC(NDI_APPDOC_OBJ, APPDOC_TYPE, APPDOC_STRUCT, [additional parameters]
Create an ndi.document from a data structure APPDOC_STRUCT. The ndi.document is created
according to the APPDOC_TYPE of the NDI_APPDOC_OBJ.
In the base class, this always returns empty. It must be overridden in subclasses.
The documentation for overriden functions should be in the function APPDOC_DESCRIPTION.
Help for ndi.calc.stimulus.tuningcurve/struct2doc is inherited from superclass ndi.app.appdoc
test - perform a test of an ndi.calculator object
[B, ERRORMSG] = test(CTEST_OBJ, SCOPE, NUMBER_OF_TESTS, PLOT_IT)
Perform tests of the calculator for a certain SCOPE.
B is a NUMBER_OF_TESTS x NUMBER_OF_TESTS array of whether the comparisons
of the expected output of test i and actual output of test j are equal.
Generally, b(i,i) should be 1 for all tests, and b(i,j) for i~=j should
be 0, although results might be close enough for some comparisons to be
equal even if there are no errors.
ERRORMSG{i,j} is any error message given if the comparison between the
expected outcome of test i and the actual outcome of test j.
B_EXPECTED is the result of the comparisons between the expected
outcome of test i and the expected outcome of test j. Some tests
might have the same expected outcome, which can be useful for
interpreting the results in B.
SCOPE should be one of 'standard', 'low_noise', or 'high_noise'.
'standard' performs tests on specific hard-coded inputs.
'low_noise' performs tests on specific hard-coded inputs with small amounts
of noise added.
'high_noise' performs tests on specific hard-coded inputs with large amounts
of noise added.
NUMBER_OF_TESTS indicates the number of tests to perform.
PLOT_IT indicates (0/1) whether or not the results should be plotted.
Step 1: generate_mock_docs
Help for ndi.calc.stimulus.tuningcurve/test is inherited from superclass ndi.mock.ctest
tuningcurve - a tuningcurve demonstration of an ndi.calculator object
TUNINGCURVE_OBJ = TUNINGCURVE(SESSION)
Creates a TUNINGCURVE ndi.calculator object
Documentation for ndi.calc.stimulus.tuningcurve/tuningcurve
doc ndi.calc.stimulus.tuningcurve
varappname - return the name of the application for use in variable creation
AN = VARAPPNAME(NDI_APP_OBJ)
Returns the name of the app modified for use as a variable name, either as
a Matlab variable or a name in a document.
Help for ndi.calc.stimulus.tuningcurve/varappname is inherited from superclass ndi.app
version_url - return the app version and url
[V, URL] = VERSION_URL(NDI_APP_OBJ)
Return the version and url for the current app. In the base class,
it is assumed that GIT is used and is available from the command line
and the version and url are read from the git directory.
Developers should override this method in their own class if they use a
different version control system.
Help for ndi.calc.stimulus.tuningcurve/version_url is inherited from superclass ndi.app
write_mock_expected_output - write
B = WRITE_MOCK_EXPECTED_OUTPUT(CTEST_OBJ, NUMBER, DOC)
Set the expected mock document for mock calculation NUMBER to
be the ndi.document DOC.
This function will not overwrite an existing expected mock document.
It must be deleted manually to ensure programmer really wants to overwrite it.
Help for ndi.calc.stimulus.tuningcurve/write_mock_expected_output is inherited from superclass ndi.mock.ctest