common_dio.py
DIOEvents
¶
Bases: SpyglassIngestion, Imported
Source code in src/spyglass/common/common_dio.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
generate_entries_from_nwb_object(nwb_obj, base_key=None)
¶
Generate entries from nwb object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nwb_obj
|
NWBFile
|
The NWB file object. |
required |
base_key
|
dict
|
The base key to use for the entries, by default None |
None
|
Returns:
| Type | Description |
|---|---|
Dict[SpyglassIngestion, List[dict]]
|
A dictionary with the table class as the key and a list of entries as the value. |
Source code in src/spyglass/common/common_dio.py
make(key)
¶
plot_all_dio_events(return_fig=False)
¶
Plot all DIO events in the session.
Examples:
restr1 = {'nwb_file_name': 'arthur20220314_.nwb'} restr2 = {'nwb_file_name': 'arthur20220316_.nwb'} (DIOEvents & restr1).plot_all_dio_events() (DIOEvents & [restr1, restr2]).plot_all_dio_events()