You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to track down exposure times information for experiments where we tested low vs high exposure times - there are some weirdnesses I don't fully understand. But to avoid it getting lost, this is the code used to extract them and confirm that the files are being read correctly.
import os
dirlist = os.listdir(os.curdir)
dirlist.sort()
for sub_dir in dirlist:
if '__' in sub_dir:
exposure_dict = {'Alexa 647':[],'Alexa 568':[], '488 long':[],'Alexa 488':[],'HOECHST 33342':[],'Brightfield CP':[]}
print("subdir", sub_dir)
with open(sub_dir + "/Images/Index.idx.xml", "r") as xmlfile:
lines = xmlfile.readlines()
name = False
exp = False
for line in lines:
if 'Oreintation' in line:
name = False
exp = False
if "<ChannelName>" in line:
name = line[line.find("<ChannelName>") + 13: line.rfind("<")]
if '<ExposureTime Unit="s">' in line:
exp = line[line.find('Unit') + 9 : line.rfind("<")]
if name:
exposure_dict[name].append(exp)
for k,v in exposure_dict.items():
exp_list = list(set(v))
exp_count_list = []
for exp in exp_list:
exp_count_list.append(len([x for x in v if x==exp]))
print(k,exp_list)
We are trying to track down exposure times information for experiments where we tested low vs high exposure times - there are some weirdnesses I don't fully understand. But to avoid it getting lost, this is the code used to extract them and confirm that the files are being read correctly.
Results for plates currently in figure
The text was updated successfully, but these errors were encountered: