Skip to content

Commit

Permalink
Notebooks: set default logging level to logging.WARNING, add a blurb.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgunn committed Jan 14, 2025
1 parent 52dfd57 commit 4e0437f
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion caiman/source_extraction/cnmf/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def sparseNMF(Y_ds, nr, max_iter_snmf=200, alpha=0.5, sigma_smooth=(.5, .5, .5),
d = np.prod(dims)
yr = np.reshape(m1, [T, d], order='F')

logger.debug(f"Running SparseNMF with alpha_W={alpha} and l1_ratio={l1_ratio}")
logger.info(f"Running SparseNMF with alpha_W={alpha} and l1_ratio={l1_ratio}")
mdl = NMF(n_components=nr,
verbose=False,
init='nndsvd',
Expand Down
3 changes: 2 additions & 1 deletion demos/notebooks/demo_OnACID_mesoscope.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"logger.setLevel(logging.INFO)\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
" handler = logging.FileHandler(logfile)\n",
Expand Down
3 changes: 2 additions & 1 deletion demos/notebooks/demo_Ring_CNN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"logger.setLevel(logging.INFO)\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
" handler = logging.FileHandler(logfile)\n",
Expand Down
3 changes: 2 additions & 1 deletion demos/notebooks/demo_VST.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"logger.setLevel(logging.INFO)\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
" handler = logging.FileHandler(logfile)\n",
Expand Down
3 changes: 2 additions & 1 deletion demos/notebooks/demo_caiman_cnmf_3D.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"logger.setLevel(logging.INFO)\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
" handler = logging.FileHandler(logfile)\n",
Expand Down
3 changes: 2 additions & 1 deletion demos/notebooks/demo_dendritic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"else:\n",
" log_file = None\n",
"logger = logging.getLogger('caiman')\n",
"logger.setLevel(logging.INFO)\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if log_file is not None:\n",
" handler = logging.FileHandler(log_file)\n",
Expand Down
3 changes: 2 additions & 1 deletion demos/notebooks/demo_motion_correction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"logger.setLevel(logging.INFO)\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
" handler = logging.FileHandler(logfile)\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_online_3D.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_online_cnmfE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"# set up logging\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_pipeline_cnmfE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"# set up logging\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_pipeline_voltage_imaging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.ERROR)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_realtime_cnmfE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down
1 change: 1 addition & 0 deletions demos/notebooks/demo_seeded_CNMF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"\n",
"logfile = None # Replace with a path if you want to log to a file\n",
"logger = logging.getLogger('caiman')\n",
"# Set to logging.INFO if you want much output, potentially much more output\n",
"logger.setLevel(logging.WARNING)\n",
"logfmt = logging.Formatter('%(relativeCreated)12d [%(filename)s:%(funcName)20s():%(lineno)s] [%(process)d] %(message)s')\n",
"if logfile is not None:\n",
Expand Down

0 comments on commit 4e0437f

Please sign in to comment.