LISE-B26 / pylabcontrol

pylabcontrol: Laboratory Equipment Control for Scientific Experiments.
GNU General Public License v3.0
9 stars 9 forks source link

issue with script iterators #163

Closed emmarosenfeld closed 4 years ago

emmarosenfeld commented 4 years ago

when running a script iterator (currently autofocus -> findNV -> esr -> daq timetrace -> findNV), the code crashes at the last transition (daq_timetrace to find_nv) with the following message:


image

emmarosenfeld commented 4 years ago

ER 20191017: problem was after we added the start time of the daq timetrace script as a field in self.data. The code in script_iterator was checking the length of everything in self.data, which throws an error if the field is one float. Added the line:

ER 20191017

                        if (isinstance(self.data[key], float) and isinstance(data[key], float) and self.data[key] != data[key]) or \
                                len(self.data[key]) != len(data[key]):

in order to overcome this issue