Skip to content

update background CaliAli

function obj=update_background_CaliAli(obj, use_parallel,F)

Description

update_background_CaliAli - Updates background estimation in multiple batches.

This function refines the background estimation in a CNMF pipeline by processing the data in multiple batches. It ensures efficient memory usage and robust background modeling by iteratively aggregating and normalizing results from each batch. The final background components are used to improve neuronal activity extraction.

Function Inputs:
Parameter Name Type Description
obj CNMF object The CNMF object containing spatial and temporal components.
use_parallel Boolean Boolean flag indicating whether to use parallel processing.
F Array Optional array specifying batch sizes for processing. If not provided, it is determined using get_batch_size(obj).
Function Outputs:
Parameter Name Type Description
obj CNMF object Updated CNMF object with refined background components.
Example usage:
obj = update_background_CaliAli(obj, true);