def move_experiment_nodes(node): ''' Some nodes were originally stored directly under the animal node or in a subgroup called behavior_experiments. These nodes are moved to the experiments folder and the behavior_experiments subgroup is deleted. ''' from cns.data.h5_utils import get_or_append_node if node._v_name == 'behavior_experiments': newparent = get_or_append_node(node._v_parent, 'experiments') for child in node: child._f_move(newparent=newparent) print 'Moved to experiments: ' + child._v_name node._f_remove() elif node._v_name.startswith('Animal'): newparent = get_or_append_node(node, 'experiments') for child in node: if 'date' in child._v_name: print 'Moved to experiments: ' + child._v_name child._f_move(newparent=newparent)
def _create_channel(self, name, dtype): contact_node = get_or_append_node(self.store_node, 'contact') return FileChannel(node=contact_node, name=name, dtype=dtype)
def _response_ts_default(self): node = get_or_append_node(self.store_node, 'contact') return FileTimeseries(node=node, name='response_ts')
def _all_poke_epoch_default(self): node = get_or_append_node(self.store_node, 'contact') return FileEpoch(node=node, name='all_poke_epoch')