Stage 02 - Processing¶
This stage prepares the data for analysis. The user can select the required processing steps depending on the data and analysis objectives.
Input¶
Simultaneous neural activity recordings from electrodes/pixels, spatially arranged on a grid.
A neo.Block and Segment object containing an AnalogSignal object containing all signal channels (additional AnalogSignal objects are ignored) with
array_annotations:
x_coordsandy_coordsspecifying the integer position on the channel grid;annotations:
spatial_scalespecifying the distance between electrodes/pixels asquantities.Quantityobject.
should pass check_input.py
Output¶
The same structured
neo.Blockobject containing anAnalogSignalobject. The channel signals inAnalogSignalare processed by the specified blocks and parameters.The respective block parameters are added as metadata to the annotations of the
AnalogSignal.The output
neo.Blockis stored in{output_path}/{profile}/stage02_processing/processed_data.{NEO_FORMAT}The intermediate results and plots of each processing block are stored in the
{output_path}/{profile}/stage02_processing/{block_name}/
Usage¶
In this stage, all blocks can be selected and arranged in arbitrary order (choose any). The execution order is specified by the config parameter BLOCK_ORDER. All blocks, generally, have the same output data representation as their input, just transforming the AnalogSignal and adding metadata, without adding data objects.
When the block order is changed in-between runs, it may happen that not all the necessary blocks are re-executed correctly, because of Snakemake’s time-stamp-based re-execution mechanism. Therefore, to be sure all blocks are re-executed, you can set RERUN_MODE is set to True. However, when you are not changing the block order, setting it to False prevents unnecessary reruns.
Blocks¶
Utility Blocks (fixed)¶
Check whether the input data representation adheres to the stage's requirements. |
|
Plot an example signal trace before and after application of some processing steps. |
Processing Blocks (choose any)¶
Subtract the background of the input data by subtracting the mean of each channel. |
|
Detrend the signal in each channel by order 0 (constant) or 1 (linear). |
|
Filter between a highpass and a lowpass frequency using a butterworth filter. |
|
Estimate the logarithmic multi-unit activity (MUA) by averaging the power in a given frequency range. |
|
Divide the signal in each channel by their max/mean/median value. |
|
Replace the data signal value with their corresponding Hilbert phase. |
|
Select a region of interest (ROI) by thresholding the intensity signal. |
|
Downsample the input data by combining and averaging neighboring channels. |
|
Subsample the input data to a target rate by selecting only every n-th sample point. |
|
Z-score the signal of each channel. |