def update_files(self): self.files = defaultdict(list) for f in os.walk(self.path).next()[2]: if '.tif' in f: well, site = io.get_well_site(f) channel = self.info['wells'][well] self.files[channel] += [os.path.join(self.path, f)]
def test_nuclei_stitch(well=(('A2',),0)): io.initialize_paths('20150716', subset='stitched/', lasagna_dir='/Volumes/blainey_lab/David/lasagna/') dict_20X = defaultdict(list) [dict_20X[io.get_well_site(f)].append(f) for f in io.DIR['stacks'] if '20X' in f] test_files = dict_20X[well] print '(well, site) found', dict_20X.keys() print 'from', well, 'loading', test_files data = {f: io.read_stack(f, memmap=False) for f in test_files} offsets = process.register_images(data.values()) C = io.compose_stacks([io.offset_stack(d, offset) for d, offset in zip(data.values(), offsets)]) return data, offsets, C
def test_nuclei_stitch(well=(('A2', ), 0)): io.initialize_paths('20150716', subset='stitched/', lasagna_dir='/Volumes/blainey_lab/David/lasagna/') dict_20X = defaultdict(list) [ dict_20X[io.get_well_site(f)].append(f) for f in io.DIR['stacks'] if '20X' in f ] test_files = dict_20X[well] print '(well, site) found', dict_20X.keys() print 'from', well, 'loading', test_files data = {f: io.read_stack(f, memmap=False) for f in test_files} offsets = process.register_images(data.values()) C = io.compose_stacks( [io.offset(d, offset) for d, offset in zip(data.values(), offsets)]) return data, offsets, C