diff --git a/caiman/source_extraction/cnmf/initialization.py b/caiman/source_extraction/cnmf/initialization.py index 67bf0bcfb..2849b2a2c 100644 --- a/caiman/source_extraction/cnmf/initialization.py +++ b/caiman/source_extraction/cnmf/initialization.py @@ -148,7 +148,7 @@ def initialize_components(Y, K=30, gSig=[5, 5], gSiz=None, ssub=1, tsub=1, nIter min_corr=0.8, min_pnr=10, seed_method='auto', ring_size_factor=1.5, center_psf=False, ssub_B=2, init_iter=2, remove_baseline = True, SC_kernel='heat', SC_sigma=1, SC_thr=0, SC_normalize=True, SC_use_NN=False, - SC_nnn=20, lambda_gnmf=1, l1_ratio:float=0.0): + SC_nnn=20, lambda_gnmf=1, snmf_l1_ratio:float=0.0): """ Initialize components. This function initializes the spatial footprints, temporal components, and background which are then further refined by the CNMF iterations. There are four @@ -256,7 +256,7 @@ def initialize_components(Y, K=30, gSig=[5, 5], gSiz=None, ssub=1, tsub=1, nIter init_iter: int, optional number of iterations for 1-photon imaging initialization - l1_ratio: float + snmf_l1_ratio: float Used only by sparse NMF, passed to NMF call Returns: @@ -337,7 +337,7 @@ def initialize_components(Y, K=30, gSig=[5, 5], gSiz=None, ssub=1, tsub=1, nIter elif method == 'sparse_nmf': Ain, Cin, _, b_in, f_in = sparseNMF( Y_ds, nr=K, nb=nb, max_iter_snmf=max_iter_snmf, alpha=alpha_snmf, - sigma_smooth=sigma_smooth_snmf, remove_baseline=remove_baseline, perc_baseline=perc_baseline_snmf, l1_ratio=l1_ratio) + sigma_smooth=sigma_smooth_snmf, remove_baseline=remove_baseline, perc_baseline=perc_baseline_snmf, l1_ratio=snmf_l1_ratio) elif method == 'compressed_nmf': Ain, Cin, _, b_in, f_in = compressedNMF( diff --git a/caiman/source_extraction/cnmf/params.py b/caiman/source_extraction/cnmf/params.py index cc4f2926c..36c9996bb 100644 --- a/caiman/source_extraction/cnmf/params.py +++ b/caiman/source_extraction/cnmf/params.py @@ -719,7 +719,7 @@ def __init__(self, fnames=None, dims=None, dxy=(1, 1), 'init_iter': init_iter, 'kernel': None, # user specified template for greedyROI 'lambda_gnmf': 1, # regularization weight for graph NMF - 'l1_ratio': 0.0, + 'snmf_l1_ratio': 0.0, # L1 ratio, used by sparse nmf mode only 'maxIter': 5, # number of HALS iterations 'max_iter_snmf': 500, 'method_init': method_init, # can be greedy_roi, corr_pnr sparse_nmf, local_NMF