Labelling example

[1]:
import sys
import os
from PyQt5.QtWidgets import QApplication
import nanotune as nt
from nanotune.labelling.labellingtool import LabellingTool
from nanotune.labelling.manipulate_labels import correct_label, print_label
Logging hadn't been started.
Activating auto-logging. Current session state plus future input saved.
Filename       : /Users/jana/.qcodes/logs/command_history.log
Mode           : append
Output logging : True
Raw input log  : False
Timestamping   : True
State          : active
Qcodes Logfile : /Users/jana/.qcodes/logs/210810-3670-qcodes.log
[2]:
nt_root = os.path.dirname(os.path.dirname(os.path.abspath(nt.__file__)))
db_tuning = os.path.join(nt_root, 'data', 'tuning')
[3]:
app = QApplication(sys.argv)
Gui = LabellingTool(experiment_id=1, db_name='dot_tuning_sequences.db', db_folder=db_tuning, start_over=True)
_ = app.exec_()
[ ]:

[ ]:

Print label

[4]:
print_label(1203, 'device_characterization.db', db_folder=db_tuning)
Dataset 1203 in device_characterization.db:
good pinchoff.
../_images/examples_labelling_example_7_1.png

Correct or change label

[5]:
correct_label(1203, 'device_characterization.db', 'pinchoff', 0, db_tuning)
print('Print the incorrect label just set: \n')
print_label(1203, 'device_characterization.db', db_folder=db_tuning)
correct_label(1203, 'device_characterization.db', 'pinchoff', 1, db_tuning)
print('\n Print label after correcting it: \n')
print_label(1203, 'device_characterization.db', db_folder=db_tuning, plot_data=False)
Print the incorrect label just set:

Dataset 1203 in device_characterization.db:
poor pinchoff.

 Print label after correcting it:

Dataset 1203 in device_characterization.db:
good pinchoff.
../_images/examples_labelling_example_9_1.png
[ ]: