How to use the qcodes.DataSet function in qcodes

To help you get started, we’ve selected a few qcodes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github QuTech-Delft / qtt / qtt / logviewer.py View on Github external
def updateLogs(self):
        pass

        model=self._treemodel
        dd=findfilesR(qcodes.DataSet.default_io.base_location, '.*dat')        
        print(dd)
        
        logs=dict()        
        for i, d in enumerate(dd):
            tag= os.path.basename(d)
            datetag, logtag,_=d.split('/')[-3:]
            if not datetag in logs:
                logs[datetag]=dict()
            logs[datetag][logtag]=d

        for i, datetag in enumerate(sorted(logs.keys())[::-1]):             
            parent1 = QtGui.QStandardItem(datetag)
            for j, logtag in enumerate(logs[datetag]):
                child1 = QtGui.QStandardItem(logtag)
                child2 = QtGui.QStandardItem('info about plot')
                child3 = QtGui.QStandardItem(os.path.join(datetag, logtag) )
github QuTech-Delft / qtt / examples / tno_toymodel.py View on Github external
plotQ.update()
        time.sleep(.1)


#%%
if 0:
    scanjob = dict({'sweepdata': dict({'gate': 'R', 'start': -420, 'end': 220, 'step': 2.5}), 'delay': .01})
    data = scan1D(scanjob, station, location='testsweep4')
    plotQ.add(data.amplitude)

    #%%
    plotQ.add(np.array(data.amplitude) + .2)

    #%%

    datax = qc.DataSet('testsweep3', mode=qcodes.DataMode.LOCAL)

    fig = qc.MatPlot(datax.amplitude)

    import pmatlab
    pmatlab.tilefigs([fig.fig], [2, 2])


#%%
if __name__ == '__main__':

    scanjob = dict({'sweepdata': dict({'gate': 'R', 'start': 220, 'end': -220, 'step': 3.5}), 'delay': .01})
    data = scan1D(scanjob, station, location=None, qcodesplot=plotQ)
    print(data)


if __name__ == '__main__':
github QuTech-Delft / qtt / src / qtt / data.py View on Github external
def write_data(mfile: str, data):
    """ Write data to specified file """
    ext = _data_extension()
    if ext is not None:
        if not mfile.endswith(ext):
            mfile = mfile + '.' + ext
    if isinstance(data, qcodes.DataSet):
        data = qtt.utilities.tools.stripDataset(data)

    with open(mfile, 'wb') as fid:
        pickle.dump(data, fid)
github QuTech-Delft / qtt / scripts / 1dot_script_batch.py View on Github external
from qtt.scans import scan2D, scan1D, onedotHiresScan
from qtt.legacy import getODbalancepoint
from qtt.reports import generateOneDotReport
from qtt.tools import stripDataset
from qtt.scans import wait_bg_finish

import pyqtgraph
from qtt.scans import scanPinchValue
from qtt.data import saveExperimentData, loadExperimentData
if __name__ == '__main__':
    app = pyqtgraph.mkQApp()

if __name__ == '__main__':
    #from qcodes.data.hdf5_format import HDF5FormatMetadata as MyFormatter
    from qcodes.data.gnuplot_format import GNUPlotFormat as MyFormatter
    qcodes.DataSet.default_formatter = MyFormatter()

#%% Load configuration

if __name__ == '__main__':

    if platform.node() == 'TUD205521' and 1:
        import stationV2 as msetup
        from stationV2 import sample
        awg1 = None
        virtualAWG = None
        def simulation():
            ''' Funny ... '''
            return False
    else:
        #import virtualV2 as msetup
        #from virtualV2 import sample
github QuTech-Delft / qtt / src / qtt / data.py View on Github external
def get_latest_dataset():
    """ Return latest dataset that was created """
    return getattr(qcodes.DataSet._latest, None)