allensdk.brain_observatory.behavior.data_objects.base.writable_interfaces module

class allensdk.brain_observatory.behavior.data_objects.base.writable_interfaces.JsonWritableInterface[source]

Bases: abc.ABC

Marks a data object as writable to NWB

to_json(self) → dict[source]

Given an already populated DataObject, return the dict that when used with the from_json() classmethod would produce the same DataObject

Returns:
dict:

The JSON (in dict form) that would produce the DataObject.

class allensdk.brain_observatory.behavior.data_objects.base.writable_interfaces.NwbWritableInterface[source]

Bases: abc.ABC

Marks a data object as writable to NWB

to_nwb(self, nwbfile: pynwb.file.NWBFile) → pynwb.file.NWBFile[source]

Given an already populated DataObject, return an pyNWB file object that had had DataObject data added.

Parameters:
nwbfile : NWBFile

An NWB file object

Returns:
NWBFile

An NWB file object that has had data from the DataObject added to it.