Creating a feature extractor
Here are some basic rules for creating a simple extractor:
Create a new extractor for any new feature you want to compute.
The feature extractor must have the following 3 input parameters, 1.
analysis
is an instance of theAnalysis.m
class. It is not regularly used yet in current feature extractor functions; however, it is likely required for future expansions of the analysis functionality. 2.epochGroup
is an instance of theEpochGroup.m
class. It defines a group of epochs and facilitates adding new features to an existing epochGroup. 3.analysisParameter
is a Matlab structure containing the parameters which are used in the feature extractor.When creating your own feature extractor, always make sure to add comments that describe the role of each analysis parameter and its default value.
Finally, consider the visualization of the feature. Ideally specify plotting parameters, such as the x-axis, the axis labels and the title of the plot in the feature extractor function.
With these guidelines, let us create a simpleExtractor
function which computes the average neuronal response in each epoch and adds it to theepochGroup
instance.
Then, compute the average response of each epoch and save it to the epochGroup
instance
The second example is thepsthExtractor.m
from ourLightStepAnalysis
, explained in the previous section. Let us focus on the line epochGroup.createFeature.
The PSTH feature contains all the required attributes to plot the results as a simple line plot, and can, therefore be easily used to visualize the PSTH. How to do this will be explained in next section - visualizing your results.
Last updated