Skip to content

Commit f08d6af

Browse files
committed
add better logging
1 parent eb88067 commit f08d6af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/trodes_to_nwb/convert_optogenetics.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def add_optogenetics(nwbfile: NWBFile, metadata: dict, device_metadata: List[dic
4646
return
4747

4848
# Add optogenetic experiment metadata
49-
49+
logger.info("Adding optogenetic experiment metadata")
5050
virus, virus_injection = make_virus_injecton(
5151
metadata.get("virus_injection"), device_metadata
5252
)
@@ -306,11 +306,12 @@ def add_optogenetic_epochs(
306306
file_dir : str, optional
307307
Directory appended to the file path given in the metadata. Default is empty string.
308308
"""
309-
309+
logger = logging.getLogger("convert")
310310
opto_epochs_metadata = metadata.get("fs_gui_yamls", [])
311311
if len(opto_epochs_metadata) == 0:
312-
print("No optogenetic epochs found in metadata.")
312+
logger.info("No optogenetic epochs found in metadata.")
313313
return
314+
logger.info(f"Adding {len(opto_epochs_metadata)} optogenetic epochs.")
314315

315316
from ndx_franklab_novela import FrankLabOptogeneticEpochsTable
316317

0 commit comments

Comments
 (0)