def write_partners(self): annotations = cremi.Annotations(offset=self.offset) syncounter = itertools.count(1) for partner in self.get_partners(): preid = next(syncounter) annotations.add_annotation( preid, "presynaptic_site", tuple(p * r for p, r in zip(partner[0], (40.0, 4.0, 4.0))), ) annotations.add_comment( preid, "preness: " + str(partner[2]) + ", postness: " + str(partner[3]) + ", size: " + str(partner[4]), ) postid = next(syncounter) annotations.add_annotation( postid, "postsynaptic_site", tuple(p * r for p, r in zip(partner[1], (40.0, 4.0, 4.0))), ) annotations.add_comment( postid, "preness: " + str(partner[5]) + ", postness: " + str(partner[6]) + ", size: " + str(partner[7]), ) annotations.set_pre_post_partners(preid, postid) self.cremi_file.write_annotations(annotations)
def write_partners(self): annotations = cremi.Annotations(offset=self.offset) syncounter = itertools.count(1) for partner in self.get_partners(): preid = syncounter.next() annotations.add_annotation( preid, 'presynaptic_site', tuple(p * r for p, r in zip(partner[0], (40., 4., 4.)))) annotations.add_comment(preid, ', size: ' + str(partner[2])) postid = syncounter.next() annotations.add_annotation( postid, 'postsynaptic_site', tuple(p * r for p, r in zip(partner[1], (40., 4., 4.)))) annotations.add_comment(postid, 'size: ' + str(partner[3])) annotations.set_pre_post_partners(preid, postid) self.cremi_file.write_annotations(annotations)