33=====
44
55
6- Two main programs are provided: ``labview2nwb `` and ``nwb_metadata_editor ``.
6+ Three main programs are provided: ``labview2nwb ``, `` metadata2nwb `` and ``nwb_metadata_editor ``.
77
88``labview2nwb `` imports Labview data to the NWB format.
99You need to provide it the path to the NWB file to create,
@@ -19,6 +19,17 @@ By default the import process will start by running a simple graphical editor,
1919allowing you to input metadata required or recommended by the NWB format,
2020but that is not available within the Labview data folder.
2121
22+ ``metadata2nwb `` creates a minimal NWB file by loading metadata describing
23+ an experiment from a YAML file. You need to provide it the path to the NWB file
24+ to create, the path to the metadata YAML file and optionally a user.
25+ The user must be mentioned in the metadata file. If there is only one user in the file,
26+ you don't need to specify them when running this. An example for a metadata YAML file
27+ can be found on the `PySilverLabNWB Github directory `__. Metadata YAML files are intended
28+ to be created, read and modified by users to quickly set up a new NWB file without
29+ having to go via the metadata editor.
30+
31+ __ https://github.com/SilverLabUCL/PySilverLabNWB/blob/master/tests/data/meta_two_users.yaml
32+
2233``nwb_metadata_editor `` runs the metadata editor in standalone mode.
2334It is useful for setting up details of new researchers or new experiments,
2435that can then be used quickly when importing experiment data.
@@ -28,16 +39,23 @@ Python library usage
2839====================
2940
3041The main class is ``silverlabnwb.NwbFile `` defined in ``nwb_file.py ``.
31- All its methods are documented with docstrings.
42+ All its methods are documented with docstrings. There are two entry points,
43+ ``import_labview_folder `` and ``create_from_metadata ``, which mirror the first
44+ two command line tools described above.
3245
3346Quick examples::
3447
3548 from silverlabnwb import NwbFile
3649
37- # Write a new file
50+ # Write a new file from a LabView folder
3851 with NwbFile(nwb_path, mode='w') as nwb:
3952 nwb.import_labview_folder(labview_path)
4053
54+ # Write a new file from metadata
55+ with NwbFile(nwb_path, mode='w') as nwb:
56+ nwb.create_from_metadata(metadata_path, user)
57+
4158 # Read an existing file
4259 with NwbFile(nwb_path) as nwb:
4360 print('Opened NWB with ID {}'.format(nwb['/identifier']))
61+
0 commit comments