diff --git a/main.py b/main.py index 9b7eff8a257f5c045d12753e68437b85107fec45..a23f46c1a397e48195f712648cf8dcd298a4ded2 100644 --- a/main.py +++ b/main.py @@ -1,45 +1,57 @@ import sys +from datetime import datetime +from pylablib.devices import Thorlabs + +from pymeasure.experiment import unique_filename +from pymeasure.experiment import Results +from pymeasure.display.Qt import QtWidgets import logging -from time import sleep -from PyQt5 import QtCore, QtWidgets -from pymeasure.log import console_log -from pymeasure.experiment import Results, Worker -from src.classes.plotter import Plotter -from src.classes.procedures.x_sweep import X_Sweep -from src.classes.ui import UI +from src.classes.ui import UIWindown +from src.classes.controltab import ControlTab +from src.procedures import B_Sweep, X_Sweep, Y_Sweep -log = logging.getLogger(__name__) +log = logging.getLogger('') log.addHandler(logging.NullHandler()) -if __name__ == "__main__": - console_log(log) - - app = QtWidgets.QApplication(sys.argv) - ui = UI() - ui.show() - - log.info("Constructing a RandomProcedure") - procedure = X_Sweep() - procedure.iterations = 10 +class MainWindow(UIWindown): + def __init__(self): + super().__init__( + procedure_class=[B_Sweep, X_Sweep, Y_Sweep], + inputs=[ + ['acq_time', 'freq', 'b_min', 'b_max', 'b_step', 'x', 'y'], + ['acq_time', 'freq', 'x_min', 'x_max', 'x_step', 'y', 'field'], + ['acq_time', 'freq', 'y_min', 'y_max', 'y_step', 'x', 'field'] + ], + displays=['acq_time', 'freq'], + x_axis='X Position', + y_axis='Voltage', + widget_list=tuple([ControlTab("Manual control")]), + directory_input=True + ) + self.setWindowTitle('Mini MOKE') + self.directory = 'data' + try: + for device in Thorlabs.list_kinesis_devices(): + log.info(f"Thorlab device connected: {device[1]} with serial number: {device[0]}") + except: + pass + + def queue(self, procedure=None): + direc = self.directory + '/' + datetime.now().strftime('%Y-%m') + + if procedure is None: + procedure = self.make_procedure() + + file = unique_filename(direc, procedure.name+"_") + results = Results(procedure, file) + experiment = self.new_experiment(results) + + self.manager.queue(experiment) - data_filename = 'random.csv' - log.info("Constructing the Results with a data file: %s" % data_filename) - results = Results(procedure, data_filename) - - log.info("Constructing the Plotter") - plotter = Plotter(results, parent=ui) - ui.add_plot_widget(plotter.widget) - # plotter.start() - log.info("Started the Plotter") - - # log.info("Constructing the Worker") - # worker = Worker(results) - # worker.start() - # log.info("Started the Worker") - - # log.info("Joining with the worker in at most 10 hours") - # worker.join(timeout=36000) - # log.info("Finished the measurement") +if __name__ == "__main__": + app = QtWidgets.QApplication(sys.argv) + window = MainWindow() + window.show() sys.exit(app.exec()) \ No newline at end of file diff --git a/random.csv b/random.csv deleted file mode 100644 index 254400d5d2b7f5bd365c3f900fae7987f3a7f961..0000000000000000000000000000000000000000 --- a/random.csv +++ /dev/null @@ -1,1328 +0,0 @@ -#Procedure: <src.classes.procedures.x_sweep.X_Sweep> -#Parameters: -# Delay Time: 0.2 s -# Loop Iterations: 100 -# Random Seed: 12345 -#Data: -Iteration,Voltage,Position,Magnetic Field -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -87,0.5449931310755057,8.7,29.706949993416732 -88,0.30909728483054266,8.8,192.78508776547298 -89,0.14188685277642832,8.9,211.28700481823068 -90,0.3327329429771452,9.0,250.745007711819 -91,0.5855772249151071,9.1,197.28690835306298 -92,0.6434458000354423,9.2,76.69818273581429 -93,0.9996331766185877,9.3,296.49854657784937 -94,0.632514644398319,9.4,120.94771452059011 -95,0.6673179563076772,9.5,74.02802740513636 -96,0.489509914173043,9.6,40.012724492615106 -97,0.7475009569809801,9.7,273.20472507346614 -98,0.5564191505853678,9.8,261.595044217762 -99,0.7722454935101297,9.9,137.98309935016275 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -10,0.6689547663930134,1.0,27.18779266843827 -11,0.08045924005172145,1.1,179.0903800207461 -12,0.9895029735998028,1.2,280.9922240277464 -13,0.899771607576651,1.3,266.73986015417745 -14,0.8850675246062539,1.4,121.1447816395899 -15,0.3681223568694908,1.5,70.76079587365449 -16,0.32789357023807475,1.6,71.0658116428908 -17,0.09348445208374823,1.7,281.97549076384786 -18,0.24716357127975663,1.8,176.951370004418 -19,0.5462523427512509,1.9,247.11472223866264 -20,0.7134741840429463,2.0,293.9687966757388 -21,0.09496089844272393,2.1,26.235196573599705 -22,0.5945517356106983,2.2,107.85284697708096 -23,0.503202858770723,2.3,41.972647772178085 -24,0.06418766957200861,2.4,31.821476871669717 -25,0.26982476891830365,2.5,118.23103444835537 -26,0.6415720624385138,2.6,139.33168193063702 -27,0.852148688755559,2.7,172.42747776615096 -28,0.8117396110721272,2.8,270.5952009842157 -29,0.7176612602173438,2.9,271.06006490861705 -30,0.4284936685665546,3.0,291.88261388482726 -31,0.5217973071158181,3.1,255.5554495324336 -32,0.036968080154673455,3.2,258.3046455746243 -33,0.39068664865502944,3.3,235.35776830843324 -34,0.08748454403379335,3.4,35.77347849574157 -35,0.12715107691482497,3.5,140.42088297524518 -36,0.20466182226830454,3.6,190.4964982963918 -37,0.2874232794715713,3.7,82.58923922320143 -38,0.3233251766687406,3.8,239.27695964596987 -39,0.9241503148111141,3.9,173.9273672765853 -40,0.7729217626727798,4.0,143.11723838388244 -41,0.4004447009118143,4.1,260.723315810255 -42,0.8675776430855793,4.2,259.261971662615 -43,0.8343923656410915,4.3,223.57458907333964 -44,0.4798457385189261,4.4,172.1191305670745 -45,0.8033569738782999,4.5,188.15438154157948 -46,0.297724515777823,4.6,143.86258629149415 -47,0.04965961546493736,4.7,290.2293333712981 -48,0.9803298005867266,4.8,24.669627947475124 -49,0.530565156095688,4.9,60.367236307282404 -50,0.8854282971684467,5.0,178.15703776272304 -51,0.4487383921507093,5.1,29.2626482465442 -52,0.9011321670135918,5.2,202.73319438086352 -53,0.2686708641131985,5.3,285.97363459056874 -54,0.007269717948942933,5.4,299.9477680795302 -55,0.8512236459901898,5.5,95.65328377806013 -56,0.35028238789930544,5.6,192.93069772031325 -57,0.4642612176122606,5.7,148.8030486814116 -58,0.4196564826434048,5.8,22.121737101857885 -59,0.9067463199959744,5.9,179.63170880971515 -60,0.555221782276848,6.0,166.43894330661047 -61,0.08667808076761907,6.1,17.560922575054416 -62,0.9913917588427866,6.2,277.0649728374667 -63,0.5183327556959347,6.3,258.97473047566376 -64,0.5305740148114836,6.4,59.439959479512815 -65,0.871678700629197,6.5,0.8755841497742889 -66,0.2114289945893364,6.6,161.89838714257493 -67,0.8013584459918834,6.7,193.23222965082073 -68,0.6415062536691598,6.8,95.14286452407681 -69,0.5293057668509065,6.9,139.11797510052054 -70,0.4038310908392325,7.0,168.93346755915968 -71,0.016613577591615858,7.1,268.06630543556423 -72,0.23676379842924689,7.2,57.783659500946335 -73,0.5868400967935739,7.3,269.3253274448916 -74,0.09291516302985936,7.4,281.3429497483519 -75,0.9361752134942518,7.5,117.75683078318637 -76,0.8082236294174889,7.6,94.28111665453484 -77,0.9986725197589653,7.7,252.4722704432262 -78,0.43210166120731797,7.8,292.88290337304016 -79,0.9109114761612153,7.9,1.3699074935879518 -80,0.07754165092949217,8.0,12.527946510459175 -81,0.8130067665015891,8.1,169.54003295411422 -82,0.5375930738089547,8.2,25.981262170966247 -83,0.46048844991062565,8.3,70.85054784921012 -84,0.43484423935490857,8.4,23.182154783808862 -85,0.3988805881499561,8.5,40.37748754434682 -86,0.1518166306499581,8.6,158.8160436387803 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 -0,0.45697818440486826,0.0,219.26556350247787 -1,0.4293074483607703,0.1,135.51507641501877 -2,0.11134793367233986,0.2,180.7878174005853 -3,0.4033699392617659,0.3,33.865126323970415 -4,0.06577890775332551,0.4,197.02676434735332 -5,0.7258880867140706,0.5,184.52198608244467 -6,0.8642889856630329,0.6,294.46336214221986 -7,0.53416775234496,0.7,66.75644457406948 -8,0.7658927771488983,0.8,21.405146147299405 -9,0.06433776241281686,0.9,94.83264092267812 diff --git a/src/classes/dac.py b/src/classes/dac.py new file mode 100644 index 0000000000000000000000000000000000000000..63bfa2ae32a02d81d31fcd71c918ea27af66ac90 --- /dev/null +++ b/src/classes/dac.py @@ -0,0 +1,38 @@ +import nidaqmx +import logging + +log = logging.getLogger(__name__) +log.addHandler(logging.NullHandler()) + +class DAC(): + def __init__(self, addr): + self.type = addr[:2] + self.setup = False + + if self.type=="ao": + try: + nidaqmx.Task().ao_channels.add_ao_voltage_chan("Dev1/"+addr) + self.setup = True + except: + log.info("Seems like the DAC is inaccessible") + elif self.type=="ai": + try: + nidaqmx.Task().ai_channels.add_ai_voltage_chan("Dev1/"+addr) + self.setup = True + except: + log.info("Seems like the DAC is inaccessible") + + def read(self): + if self.setup: + if self.type=="ai": + return nidaqmx.Task().read() + else: + print("Cannot read from a analog output") + return -1 + + def write(self, value): + if self.setup: + if self.type=="ao": + nidaqmx.Task().write(value) + else: + print("Cannot write to a analog input") \ No newline at end of file diff --git a/src/classes/plotter.py b/src/classes/plotter.py deleted file mode 100644 index 044cb434df2eed65982587e1a08315eea3f0afc9..0000000000000000000000000000000000000000 --- a/src/classes/plotter.py +++ /dev/null @@ -1,56 +0,0 @@ -import sys -from time import sleep - -import pyqtgraph as pg -from PyQt5 import QtCore -from pymeasure.display.Qt import QtWidgets -from pymeasure.thread import StoppableThread -from pymeasure.display.widgets import PlotWidget -from pymeasure.display.curves import ResultsCurve - -class PlotUI(QtWidgets.QWidget): - def __init__(self, plotter, refresh_time=0.1, linewidth=1, parent=None): - super().__init__(parent) - self.plotter = plotter - self.refresh_time = refresh_time - columns = plotter.results.procedure.DATA_COLUMNS - - self.main = QtWidgets.QWidget(self) - - self.plot_widget = PlotWidget("Plotter", columns, refresh_time=self.refresh_time, - check_status=False, linewidth=linewidth) - self.plot = self.plot_widget.plot - - self.curve = ResultsCurve(plotter.results, columns[0], columns[1], - pen=pg.mkPen(color=pg.intColor(0), width=linewidth), - antialias=False) - self.plot.addItem(self.curve) - - self.plot_widget.updated.connect(self.check_stop) - - def quit(self, evt=None): - self.close() - self.plotter.stop() - - def check_stop(self): - """ Checks if the Plotter should stop and exits the Qt main loop if so - """ - if self.plotter.should_stop(): - QtCore.QCoreApplication.instance().quit() - - -class Plotter(StoppableThread): - def __init__(self, results, refresh_time=0.1, linewidth=1, parent=None): - super().__init__() - self.results = results - self.refresh_time = refresh_time - self.linewidth = linewidth - self.parent = parent - self.widget = PlotUI(self, self.refresh_time, self.linewidth, self.parent) - - def run(self): - self.widget = PlotUI(self, self.refresh_time, self.linewidth, self.parent) - - def wait_for_close(self, check_time=0.1): - while not self.should_stop(): - sleep(check_time) diff --git a/src/classes/procedures/x_sweep.py b/src/classes/procedures/x_sweep.py deleted file mode 100644 index 234bc9518b08ccb006664ce8b413e387b473d929..0000000000000000000000000000000000000000 --- a/src/classes/procedures/x_sweep.py +++ /dev/null @@ -1,37 +0,0 @@ -import random -import logging -from time import sleep -from pymeasure.experiment import Procedure -from pymeasure.experiment import IntegerParameter, FloatParameter, Parameter - -log = logging.getLogger(__name__) -log.addHandler(logging.NullHandler()) - -class X_Sweep(Procedure): - - iterations = IntegerParameter('Loop Iterations') - delay = FloatParameter('Delay Time', units='s', default=0.2) - seed = Parameter('Random Seed', default='12345') - - DATA_COLUMNS = ['Iteration', 'Voltage', 'Position', 'Magnetic Field'] - - def startup(self): - log.info("Setting the seed of the random number generator") - random.seed(self.seed) - - def execute(self): - log.info("Starting the loop of %d iterations" % self.iterations) - for i in range(self.iterations): - data = { - 'Iteration': i, - 'Position': i/10, - 'Voltage': random.random(), - 'Magnetic Field': random.random()*300 - } - self.emit('results', data) - log.debug("Emitting results: %s" % data) - self.emit('progress', 100 * i / self.iterations) - sleep(self.delay) - if self.should_stop(): - log.warning("Caught the stop flag in the procedure") - break diff --git a/src/classes/stage.py b/src/classes/stage.py index a20594dda5b94204e0fa9621a2e42c5f758af13f..352329a1046a76ebe4c3797f35f703381caf03f3 100644 --- a/src/classes/stage.py +++ b/src/classes/stage.py @@ -4,15 +4,20 @@ import configparser class Stage(): config_file = "src/configs/stage_config.ini" + open = False def __init__(self): - self.motor_x = Thorlabs.KinesisMotor("80855672") - self.motor_y = Thorlabs.KinesisMotor("80855670") - self.motor_z = Thorlabs.KinesisMotor("80855667") - self.motor_x.close() - self.motor_y.close() - self.motor_z.close() - self.open = False + try: + self.motor_x = Thorlabs.KinesisMotor("80855672") + self.motor_y = Thorlabs.KinesisMotor("80855670") + self.motor_z = Thorlabs.KinesisMotor("80855667") + self.motor_x.close() + self.motor_y.close() + self.motor_z.close() + self.open = True + except: + self.open = False + self.min_step = 46694 / 10 self.open = False diff --git a/src/classes/ui.py b/src/classes/ui.py index 92391865914e595f08e2304d222f126af555b36a..cdab31ecdaf4751fb0c47989dc0abc2c8ed9cdc0 100644 --- a/src/classes/ui.py +++ b/src/classes/ui.py @@ -1,54 +1,592 @@ -from PyQt5 import QtCore, QtWidgets -from PyQt5.QtWidgets import QMenu, QStatusBar +# +# This file is part of the PyMeasure package. +# +# Copyright (c) 2013-2022 PyMeasure Developers +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# + +import logging + +import os +import platform +import subprocess + import pyqtgraph as pg -from pymeasure.display.curves import ResultsCurve -from pymeasure.display.Qt import QtWidgets -from .widgets.directory import DirectoryLineEdit +from pymeasure.display.browser import BrowserItem +from pymeasure.display.manager import Manager, Experiment +from pymeasure.display.Qt import QtCore, QtWidgets, QtGui +from pymeasure.display.widgets import ( + PlotWidget, + BrowserWidget, + InputsWidget, + LogWidget, + ResultsDialog, + SequencerWidget, + DirectoryLineEdit, + EstimatorWidget, +) +from pymeasure.experiment import Results, Procedure + +log = logging.getLogger(__name__) +log.addHandler(logging.NullHandler()) + +class UIWindowBase(QtWidgets.QMainWindow): + """ + Base class for GUI experiment management . + + The ManagedWindowBase provides an interface for inputting experiment + parameters, running several experiments + (:class:`~pymeasure.experiment.procedure.Procedure`), plotting + result curves, and listing the experiments conducted during a session. + + The ManagedWindowBase uses a Manager to control Workers in a Queue, + and provides a simple interface. + The :meth:`~pymeasure.display.windows.managed_window.ManagedWindowBase.queue` method must be + overridden by the child class. + + The ManagedWindowBase allow user to define a set of widget that display information about the + experiment. The information displayed may include: plots, tabular view, logging information,... + + This class is not intended to be used directy, but it should be subclassed to provide some + appropriate widget list. Example of classes usable as element of widget list are: + + - :class:`~pymeasure.display.widgets.log_widget.LogWidget` + - :class:`~pymeasure.display.widgets.plot_widget.PlotWidget` + - :class:`~pymeasure.display.widgets.image_widget.ImageWidget` + + Of course, users can define its own widget making sure that inherits from + :class:`~pymeasure.display.widgets.tab_widget.TabWidget`. + + Examples of ready to use classes inherited from ManagedWindowBase are: + + - :class:`~pymeasure.display.windows.managed_window.ManagedWindow` + - :class:`~pymeasure.display.windows.managed_image_window.ManagedImageWindow` + + .. seealso:: + + Tutorial :ref:`tutorial-managedwindow` + A tutorial and example on the basic configuration and usage of ManagedWindow. + + Parameters for :code:`__init__` constructor. + + :param procedure_class: procedure class describing the experiment (see + :class:`~pymeasure.experiment.procedure.Procedure`) + :param widget_list: list of widget to be displayed in the GUI + :param inputs: list of :class:`~pymeasure.experiment.parameters.Parameter` instance variable + names, which the display will generate graphical fields for + :param displays: list of :class:`~pymeasure.experiment.parameters.Parameter` instance variable + names displayed in the browser window + :param log_channel: :code:`logging.Logger` instance to use for logging output + :param log_level: logging level + :param parent: Parent widget or :code:`None` + :param sequencer: a boolean stating whether or not the sequencer has to be included into the + window + :param sequencer_inputs: either :code:`None` or a list of the parameter names to be scanned + over. If no list of parameters is given, the parameters displayed in the manager queue + are used. + :param sequence_file: simple text file to quickly load a pre-defined sequence with the + code:`Load sequence` button + :param inputs_in_scrollarea: boolean that display or hide a scrollbar to the input area + :param directory_input: specify, if present, where the experiment's result will be saved. + :param hide_groups: a boolean controlling whether parameter groups are hidden (True, default) + or disabled/grayed-out (False) when the group conditions are not met. + """ + + def __init__(self, + procedure_class, + widget_list=(), + inputs=(), + displays=(), + log_channel='', + log_level=logging.INFO, + parent=None, + sequencer=False, + sequencer_inputs=None, + sequence_file=None, + inputs_in_scrollarea=False, + directory_input=False, + hide_groups=True, + ): -class UI(QtWidgets.QMainWindow): - def __init__(self, parent=None): super().__init__(parent) + app = QtCore.QCoreApplication.instance() + app.aboutToQuit.connect(self.quit) + self.procedure_class = procedure_class + self.inputs = inputs + self.hide_groups = hide_groups + self.displays = displays + self.use_sequencer = sequencer + self.sequencer_inputs = sequencer_inputs + self.sequence_file = sequence_file + self.inputs_in_scrollarea = inputs_in_scrollarea + self.directory_input = directory_input + self.log = logging.getLogger(log_channel) + self.log_level = log_level + log.setLevel(log_level) + self.log.setLevel(log_level) + self.widget_list = widget_list + + self.use_estimator = False + + self._setup_ui() + self._layout() + + def _setup_ui(self): + if self.directory_input: + self.directory_label = QtWidgets.QLabel(self) + self.directory_label.setText('Directory') + self.directory_line = DirectoryLineEdit(parent=self) + + self.queue_button = QtWidgets.QPushButton('Queue', self) + self.queue_button.clicked.connect(self._queue) - self.setWindowTitle('miniMOKE') - self.resize(800, 600) + self.abort_button = QtWidgets.QPushButton('Abort', self) + self.abort_button.setEnabled(False) + self.abort_button.clicked.connect(self.abort) + + self.browser_widget = BrowserWidget( + self.procedure_class[0], + self.displays, + [], + parent=self + ) + self.browser_widget.show_button.clicked.connect(self.show_experiments) + self.browser_widget.hide_button.clicked.connect(self.hide_experiments) + self.browser_widget.clear_button.clicked.connect(self.clear_experiments) + self.browser_widget.open_button.clicked.connect(self.open_experiment) + self.browser = self.browser_widget.browser + + self.browser.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.CustomContextMenu) + self.browser.customContextMenuRequested.connect(self.browser_item_menu) + self.browser.itemChanged.connect(self.browser_item_changed) + + self.inputs = [InputsWidget( + self.procedure_class[i], + self.inputs[i], + parent=self, + hide_groups=self.hide_groups, + ) for i in range(len(self.procedure_class))] + + self.manager = Manager(self.widget_list, + self.browser, + log_level=self.log_level, + parent=self) + self.manager.abort_returned.connect(self.abort_returned) + self.manager.queued.connect(self.queued) + self.manager.running.connect(self.running) + self.manager.finished.connect(self.finished) + self.manager.log.connect(self.log.handle) + + if self.use_sequencer: + self.sequencer = SequencerWidget( + self.sequencer_inputs, + self.sequence_file, + parent=self + ) + + if self.use_estimator: + self.estimator = EstimatorWidget( + parent=self + ) + + def _layout(self): self.main = QtWidgets.QWidget(self) - menuBar = self.menuBar() - # Creating menus using a QMenu object - fileMenu = QMenu("&File", self) - menuBar.addMenu(fileMenu) - # Creating menus using a title - editMenu = menuBar.addMenu("&Edit") - helpMenu = menuBar.addMenu("&Help") + inputs_widget = QtWidgets.QWidget() + inputs_vbox = QtWidgets.QVBoxLayout(inputs_widget) - self.statusbar = QStatusBar() - self.setStatusBar(self.statusbar) - self.statusbar.showMessage("Init window", 5000) + self.tabs_exp = QtWidgets.QTabWidget() + for i in range(0, len(self.procedure_class)): + tab_content = QtWidgets.QWidget() + tab_content_layout = QtWidgets.QVBoxLayout(tab_content) + self.inputs[i].setSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, + QtWidgets.QSizePolicy.Policy.Fixed) + tab_content_layout.addWidget(self.inputs[i]) + self.tabs_exp.addTab(tab_content, self.procedure_class[i].name) - vbox = QtWidgets.QVBoxLayout(self.main) - vbox.setSpacing(0) + inputs_vbox.addWidget(self.tabs_exp) + inputs_vbox.addStretch(0) hbox = QtWidgets.QHBoxLayout() - hbox.setSpacing(6) - hbox.setContentsMargins(-1, 6, -1, -1) + hbox.addWidget(self.queue_button) + hbox.addWidget(self.abort_button) + + if self.directory_input: + vbox = QtWidgets.QVBoxLayout() + vbox.addWidget(self.directory_label) + vbox.addWidget(self.directory_line) + vbox.addLayout(hbox) + inputs_vbox.addLayout(vbox) + else: + inputs_vbox.addLayout(hbox) + + self.tabs = QtWidgets.QTabWidget(self.main) + for wdg in self.widget_list: + self.tabs.addTab(wdg, wdg.name) - self.directory = DirectoryLineEdit() + splitter = QtWidgets.QSplitter(QtCore.Qt.Orientation.Vertical) + splitter.addWidget(self.tabs) + splitter.addWidget(self.browser_widget) - file_label = QtWidgets.QLabel(self.main) - file_label.setText('Export Folder:') + splitter_main = QtWidgets.QSplitter(QtCore.Qt.Orientation.Horizontal) + splitter_main.addWidget(inputs_widget) + splitter_main.addWidget(splitter) - hbox.addWidget(file_label) - hbox.addWidget(self.directory) - vbox.addLayout(hbox) + main_layout = QtWidgets.QHBoxLayout(self.main) + main_layout.addWidget(splitter_main) + self.main.setLayout(main_layout) self.setCentralWidget(self.main) + self.main.show() + self.resize(1000, 800) + def get_selected_tab_index(self): + if self.tabs_exp is not None: + return self.tabs_exp.currentIndex() + return 0 def quit(self, evt=None): + if self.manager.is_running(): + self.abort() + self.close() - def add_plot_widget(self, plot_widget): - vbox = self.main.layout() - vbox.addWidget(plot_widget) \ No newline at end of file + def browser_item_changed(self, item, column): + if column == 0: + state = item.checkState(0) + experiment = self.manager.experiments.with_browser_item(item) + if state == QtCore.Qt.CheckState.Unchecked: + for wdg, curve in zip(self.widget_list, experiment.curve_list): + wdg.remove(curve) + else: + for wdg, curve in zip(self.widget_list, experiment.curve_list): + wdg.load(curve) + + def browser_item_menu(self, position): + item = self.browser.itemAt(position) + + if item is not None: + experiment = self.manager.experiments.with_browser_item(item) + + menu = QtWidgets.QMenu(self) + + # Open + action_open = QtGui.QAction(menu) + action_open.setText("Open Data Externally") + action_open.triggered.connect( + lambda: self.open_file_externally(experiment.results.data_filename)) + menu.addAction(action_open) + + # Change Color + action_change_color = QtGui.QAction(menu) + action_change_color.setText("Change Color") + action_change_color.triggered.connect( + lambda: self.change_color(experiment)) + menu.addAction(action_change_color) + + # Remove + action_remove = QtGui.QAction(menu) + action_remove.setText("Remove Graph") + if self.manager.is_running(): + if self.manager.running_experiment() == experiment: # Experiment running + action_remove.setEnabled(False) + action_remove.triggered.connect(lambda: self.remove_experiment(experiment)) + menu.addAction(action_remove) + + # Delete + action_delete = QtGui.QAction(menu) + action_delete.setText("Delete Data File") + if self.manager.is_running(): + if self.manager.running_experiment() == experiment: # Experiment running + action_delete.setEnabled(False) + action_delete.triggered.connect(lambda: self.delete_experiment_data(experiment)) + menu.addAction(action_delete) + + # Use parameters + action_use = QtGui.QAction(menu) + action_use.setText("Use These Parameters") + action_use.triggered.connect( + lambda: self.set_parameters(experiment.procedure.parameter_objects())) + menu.addAction(action_use) + menu.exec(self.browser.viewport().mapToGlobal(position)) + + def remove_experiment(self, experiment): + reply = QtWidgets.QMessageBox.question(self, 'Remove Graph', + "Are you sure you want to remove the graph?", + QtWidgets.QMessageBox.StandardButton.Yes | + QtWidgets.QMessageBox.StandardButton.No, + QtWidgets.QMessageBox.StandardButton.No) + if reply == QtWidgets.QMessageBox.StandardButton.Yes: + self.manager.remove(experiment) + + def delete_experiment_data(self, experiment): + reply = QtWidgets.QMessageBox.question(self, 'Delete Data', + "Are you sure you want to delete this data file?", + QtWidgets.QMessageBox.StandardButton.Yes | + QtWidgets.QMessageBox.StandardButton.No, + QtWidgets.QMessageBox.StandardButton.No) + if reply == QtWidgets.QMessageBox.StandardButton.Yes: + self.manager.remove(experiment) + os.unlink(experiment.data_filename) + + def show_experiments(self): + root = self.browser.invisibleRootItem() + for i in range(root.childCount()): + item = root.child(i) + item.setCheckState(0, QtCore.Qt.CheckState.Checked) + + def hide_experiments(self): + root = self.browser.invisibleRootItem() + for i in range(root.childCount()): + item = root.child(i) + item.setCheckState(0, QtCore.Qt.CheckState.Unchecked) + + def clear_experiments(self): + self.manager.clear() + + def open_experiment(self): + dialog = ResultsDialog(self.procedure_class[0].DATA_COLUMNS, self.x_axis, self.y_axis) + if dialog.exec(): + filenames = dialog.selectedFiles() + for filename in map(str, filenames): + if filename in self.manager.experiments: + QtWidgets.QMessageBox.warning( + self, "Load Error", + "The file %s cannot be opened twice." % os.path.basename(filename) + ) + elif filename == '': + return + else: + results = Results.load(filename) + experiment = self.new_experiment(results) + for curve in experiment.curve_list: + if curve: + curve.update_data() + experiment.browser_item.progressbar.setValue(100) + self.manager.load(experiment) + log.info('Opened data file %s' % filename) + + def change_color(self, experiment): + color = QtWidgets.QColorDialog.getColor( + parent=self) + if color.isValid(): + pixelmap = QtGui.QPixmap(24, 24) + pixelmap.fill(color) + experiment.browser_item.setIcon(0, QtGui.QIcon(pixelmap)) + for wdg, curve in zip(self.widget_list, experiment.curve_list): + wdg.set_color(curve, color=color) + + def open_file_externally(self, filename): + """ Method to open the datafile using an external editor or viewer. Uses the default + application to open a datafile of this filetype, but can be overridden by the child + class in order to open the file in another application of choice. + """ + system = platform.system() + if (system == 'Windows'): + # The empty argument after the start is needed to be able to cope + # correctly with filenames with spaces + _ = subprocess.Popen(['start', '', filename], shell=True) + elif (system == 'Linux'): + _ = subprocess.Popen(['xdg-open', filename]) + elif (system == 'Darwin'): + _ = subprocess.Popen(['open', filename]) + else: + raise Exception("{cls} method open_file_externally does not support {system} OS".format( + cls=type(self).__name__, system=system)) + + def make_procedure(self): + if not isinstance(self.inputs[self.get_selected_tab_index()], InputsWidget): + raise Exception("ManagedWindow can not make a Procedure" + " without a InputsWidget type") + return self.inputs[self.get_selected_tab_index()].get_procedure() + + def new_curve(self, wdg, results, color=None, **kwargs): + if color is None: + color = pg.intColor(self.browser.topLevelItemCount() % 8) + return wdg.new_curve(results, color=color, **kwargs) + + def new_experiment(self, results, curve=None): + if curve is None: + curve_list = [] + for wdg in self.widget_list: + curve_list.append(self.new_curve(wdg, results)) + else: + curve_list = curve[:] + + curve_color = pg.intColor(0) + for wdg, curve in zip(self.widget_list, curve_list): + if isinstance(wdg, PlotWidget): + curve_color = curve.opts['pen'].color() + break + + browser_item = BrowserItem(results, curve_color) + return Experiment(results, curve_list, browser_item) + + def set_parameters(self, parameters): + """ This method should be overwritten by the child class. The + parameters argument is a dictionary of Parameter objects. + The Parameters should overwrite the GUI values so that a user + can click "Queue" to capture the same parameters. + """ + if not isinstance(self.inputs[0], InputsWidget): + raise Exception("ManagedWindow can not set parameters" + " without a InputsWidget") + self.inputs[0].set_parameters(parameters) + + def _queue(self, checked): + """ This method is a wrapper for the `self.queue` method to be connected + to the `queue` button. It catches the positional argument that is passed + when it is called by the button and calls the `self.queue` method without + any arguments. + """ + self.queue() + + def queue(self, procedure=None): + """ + + Abstract method, which must be overridden by the child class. + + Implementations must call ``self.manager.queue(experiment)`` and pass + an ``experiment`` + (:class:`~pymeasure.experiment.experiment.Experiment`) object which + contains the + :class:`~pymeasure.experiment.results.Results` and + :class:`~pymeasure.experiment.procedure.Procedure` to be run. + + The optional `procedure` argument is not required for a basic implementation, + but is required when the + :class:`~pymeasure.display.widgets.sequencer_widget.SequencerWidget` is used. + + For example: + + .. code-block:: python + + def queue(self): + filename = unique_filename('results', prefix="data") # from pymeasure.experiment + + procedure = self.make_procedure() # Procedure class was passed at construction + results = Results(procedure, filename) + experiment = self.new_experiment(results) + + self.manager.queue(experiment) + + """ + raise NotImplementedError( + "Abstract method ManagedWindow.queue not implemented") + + def abort(self): + self.abort_button.setEnabled(False) + self.abort_button.setText("Resume") + self.abort_button.clicked.disconnect() + self.abort_button.clicked.connect(self.resume) + try: + self.manager.abort() + except: # noqa + log.error('Failed to abort experiment', exc_info=True) + self.abort_button.setText("Abort") + self.abort_button.clicked.disconnect() + self.abort_button.clicked.connect(self.abort) + + def resume(self): + self.abort_button.setText("Abort") + self.abort_button.clicked.disconnect() + self.abort_button.clicked.connect(self.abort) + if self.manager.experiments.has_next(): + self.manager.resume() + else: + self.abort_button.setEnabled(False) + + def queued(self, experiment): + self.abort_button.setEnabled(True) + self.browser_widget.show_button.setEnabled(True) + self.browser_widget.hide_button.setEnabled(True) + self.browser_widget.clear_button.setEnabled(True) + + def running(self, experiment): + self.browser_widget.clear_button.setEnabled(False) + + def abort_returned(self, experiment): + if self.manager.experiments.has_next(): + self.abort_button.setText("Resume") + self.abort_button.setEnabled(True) + else: + self.browser_widget.clear_button.setEnabled(True) + + def finished(self, experiment): + if not self.manager.experiments.has_next(): + self.abort_button.setEnabled(False) + self.browser_widget.clear_button.setEnabled(True) + + @property + def directory(self): + if not self.directory_input: + raise ValueError("No directory input in the ManagedWindow") + return self.directory_line.text() + + @directory.setter + def directory(self, value): + if not self.directory_input: + raise ValueError("No directory input in the ManagedWindow") + + self.directory_line.setText(str(value)) + + +class UIWindown(UIWindowBase): + """ + Display experiment output with an + :class:`~pymeasure.display.widgets.plot_widget.PlotWidget` class. + + .. seealso:: + + Tutorial :ref:`tutorial-managedwindow` + A tutorial and example on the basic configuration and usage of ManagedWindow. + + :param procedure_class: procedure class describing the experiment (see + :class:`~pymeasure.experiment.procedure.Procedure`) + :param x_axis: the initial data-column for the x-axis of the plot + :param y_axis: the initial data-column for the y-axis of the plot + :param linewidth: linewidth for the displayed curves, default is 1 + :param \\**kwargs: optional keyword arguments that will be passed to + :class:`~pymeasure.display.windows.managed_window.ManagedWindowBase` + + """ + + def __init__(self, procedure_class, x_axis=None, y_axis=None, linewidth=1, **kwargs): + self.x_axis = x_axis + self.y_axis = y_axis + self.log_widget = LogWidget("Experiment Log") + self.plot_widget = PlotWidget("Results Graph", procedure_class[0].DATA_COLUMNS, self.x_axis, + self.y_axis, linewidth=linewidth) + self.plot_widget.setMinimumSize(100, 200) + + if "widget_list" not in kwargs: + kwargs["widget_list"] = () + kwargs["widget_list"] = kwargs["widget_list"] + (self.plot_widget, self.log_widget) + + super().__init__(procedure_class, **kwargs) + + # Setup measured_quantities once we know x_axis and y_axis + self.browser_widget.browser.measured_quantities = [self.x_axis, self.y_axis] + + logging.getLogger().addHandler(self.log_widget.handler) # needs to be in Qt context? + log.setLevel(self.log_level) + log.info("ManagedWindow connected to logging") diff --git a/src/classes/widgets/directory.py b/src/classes/widgets/directory.py deleted file mode 100644 index 37d52e6b42ebe6e2d5234d2f2decb78934fa944e..0000000000000000000000000000000000000000 --- a/src/classes/widgets/directory.py +++ /dev/null @@ -1,51 +0,0 @@ -import logging - -from pymeasure.display.Qt import QtCore, QtGui, QtWidgets - -log = logging.getLogger(__name__) -log.addHandler(logging.NullHandler()) - - -class DirectoryLineEdit(QtWidgets.QLineEdit): - """ - Widget that allows to choose a directory path. - A completer is implemented for quick completion. - A browse button is available. - """ - - def __init__(self, parent=None): - super().__init__(parent=parent) - - completer = QtWidgets.QCompleter(self) - completer.setCompletionMode(QtWidgets.QCompleter.CompletionMode.PopupCompletion) - - model = QtGui.QFileSystemModel(completer) - model.setRootPath(model.myComputer()) - model.setFilter(QtCore.QDir.Filter.Dirs | - QtCore.QDir.Filter.Drives | - QtCore.QDir.Filter.NoDotAndDotDot | - QtCore.QDir.Filter.AllDirs) - completer.setModel(model) - - self.setCompleter(completer) - - browse_action = QtGui.QAction(self) - browse_action.setIcon(self.style().standardIcon( - getattr(QtWidgets.QStyle.StandardPixmap, 'SP_DialogOpenButton'))) - browse_action.triggered.connect(self.browse_triggered) - - self.addAction(browse_action, QtWidgets.QLineEdit.ActionPosition.TrailingPosition) - - def _get_starting_directory(self): - current_text = self.text() - if current_text != '' and QtCore.QDir(current_text).exists(): - return current_text - - else: - return '/' - - def browse_triggered(self): - path = QtWidgets.QFileDialog.getExistingDirectory( - self, 'Directory', self._get_starting_directory()) - if path != '': - self.setText(path) \ No newline at end of file diff --git a/src/procedures/__init__.py b/src/procedures/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7e9d0b0e421b59eb47c8ea7c6ae7b98e00b79724 --- /dev/null +++ b/src/procedures/__init__.py @@ -0,0 +1,3 @@ +from .b_sweep import B_Sweep +from .y_sweep import Y_Sweep +from .x_sweep import X_Sweep \ No newline at end of file diff --git a/src/procedures/b_sweep.py b/src/procedures/b_sweep.py new file mode 100644 index 0000000000000000000000000000000000000000..56bd29e6db1371eba91b30228e3a0e09df832ce7 --- /dev/null +++ b/src/procedures/b_sweep.py @@ -0,0 +1,77 @@ +import logging +import numpy as np +from time import sleep + + +from pymeasure.experiment import Procedure, IntegerParameter, FloatParameter + +from ..classes.stage import Stage +from ..classes.dac import DAC + +log = logging.getLogger(__name__) +log.addHandler(logging.NullHandler()) + +class B_Sweep(Procedure): + name = "B-Sweep" + acq_time = FloatParameter('Aquisition time', units='s', default=1) + freq = FloatParameter('Aquisition Frequency', units='Hz', default=50) + b_min = FloatParameter('From B', units='V', default=0) + b_max = FloatParameter('To B', units='V', default=5) + b_step = FloatParameter('Step', units='V', default=0.1) + x = FloatParameter('Position x', units='mm', default=0) + y = FloatParameter('Position y', units='mm', default=0) + + DATA_COLUMNS = ['X Position', 'Y Position', 'Voltage', 'Magnetic Field [V]', 'Magnetic Field [mT]'] + + def startup(self): + log.info("Setting up the data aquisition") + + def execute(self): + log.info("Starting the voltage acquisition") + + voltage = DAC("ai0") + field = DAC("ao1") + + b_values = np.arange(self.b_min, self.b_max, self.b_step) + + field.write(self.b_min) + + sleep(1) + + try: + stage = Stage() + stage.enable_connections() + except: + log.info("Close connection with motors before running an experiment, motors can not be used") + + stage.move_x_to(self.x) + stage.move_y_to(self.y) + stage.wait_stable() + + # Start sweeping loop + for i in range(len(b_values)): + + field.write(b_values[i]) + + average_voltage = np.arange(0, int(round(self.acq_time * self.freq))) + + for step in range(len(average_voltage)): + average_voltage[step] = voltage.read() + sleep(1/self.freq) + + data = { + 'Magnetic Field [V]': b_values[i], + 'Voltage': np.mean(average_voltage) + } + + log.debug("Produced numbers: %s" % data) + self.emit('results', data) + self.emit('progress', 100 * i / len(b_values)) + if self.should_stop(): + break + + field.write(0.) + stage.close_connections() + + def shutdown(self): + log.info("Finished acquisition") diff --git a/src/procedures/x_sweep.py b/src/procedures/x_sweep.py new file mode 100644 index 0000000000000000000000000000000000000000..29a3046da6cca929957889e85dbb0b3a553fba67 --- /dev/null +++ b/src/procedures/x_sweep.py @@ -0,0 +1,75 @@ +import logging +import numpy as np +from time import sleep + + +from pymeasure.experiment import Procedure, IntegerParameter, FloatParameter + +from ..classes.stage import Stage +from ..classes.dac import DAC + +log = logging.getLogger(__name__) +log.addHandler(logging.NullHandler()) + +class X_Sweep(Procedure): + name = "X-Sweep" + acq_time = FloatParameter('Aquisition time', units='s', default=1) + freq = FloatParameter('Aquisition Frequency', units='Hz', default=50) + x_min = FloatParameter('From x', units='mm', default=0) + x_max = FloatParameter('To x', units='mm', default=5) + x_step = FloatParameter('Step', units='mm', default=0.1) + y = FloatParameter('Position y', units='mm', default=0) + field = FloatParameter('Magnetic field', units='V', default=0) + + DATA_COLUMNS = ['X Position', 'Y Position', 'Voltage', 'Magnetic Field [V]', 'Magnetic Field [mT]'] + + def startup(self): + log.info("Setting up the data aquisition") + + def execute(self): + log.info("Starting the voltage acquisition") + + voltage = DAC("ai0") + field = DAC("ao1") + + x_positions = np.arange(self.x_min, self.x_max, self.x_step) + + field.write(self.field) + + sleep(1) + + try: + stage = Stage() + stage.enable_connections() + except: + log.info("Close connection with motors before running an experiment, motors can not be used") + + stage.move_y_to(self.y) + stage.move_x_to(self.x_min) + stage.wait_stable() + + # Start sweeping loop + for i in range(len(x_positions)): + stage.move_x_to(x_positions[i]) + + average_voltage = np.arange(0, int(round(self.acq_time * self.freq))) + + for step in range(len(average_voltage)): + average_voltage[step] = voltage.read() + sleep(1/self.freq) + data = { + 'X Position': x_positions[i], + 'Voltage': np.mean(average_voltage) + } + + log.debug("Produced numbers: %s" % data) + self.emit('results', data) + self.emit('progress', 100 * i / len(x_positions)) + if self.should_stop(): + break + + field.write(0.) + stage.close_connections() + + def shutdown(self): + log.info("Finished acquisition") diff --git a/src/procedures/y_sweep.py b/src/procedures/y_sweep.py new file mode 100644 index 0000000000000000000000000000000000000000..4e7b1ce98f00a103d4f0eb9443d042b9a3991d71 --- /dev/null +++ b/src/procedures/y_sweep.py @@ -0,0 +1,75 @@ +import logging +import numpy as np +from time import sleep + + +from pymeasure.experiment import Procedure, IntegerParameter, FloatParameter + +from ..classes.stage import Stage +from ..classes.dac import DAC + +log = logging.getLogger(__name__) +log.addHandler(logging.NullHandler()) + +class Y_Sweep(Procedure): + name = "Y-Sweep" + acq_time = FloatParameter('Aquisition time', units='s', default=1) + freq = FloatParameter('Aquisition Frequency', units='Hz', default=50) + y_min = FloatParameter('From y', units='mm', default=0) + y_max = FloatParameter('To y', units='mm', default=5) + y_step = FloatParameter('Step', units='mm', default=0.1) + x = FloatParameter('Position x', units='mm', default=0) + field = FloatParameter('Magnetic field', units='V', default=0) + + DATA_COLUMNS = ['X Position', 'Y Position', 'Voltage', 'Magnetic Field [V]', 'Magnetic Field [mT]'] + + def startup(self): + log.info("Setting up the data aquisition") + + def execute(self): + log.info("Starting the voltage acquisition") + + voltage = DAC("ai0") + field = DAC("ao1") + + y_positions = np.arange(self.y_min, self.y_max, self.y_step) + + field.write(self.field) + + sleep(1) + + try: + stage = Stage() + stage.enable_connections() + except: + log.info("Close connection with motors before running an experiment, motors can not be used") + + stage.move_x_to(self.x) + stage.move_y_to(self.y_min) + stage.wait_stable() + + # Start sweeping loop + for i in range(len(y_positions)): + stage.move_y_to(y_positions[i]) + + average_voltage = np.arange(0, int(round(self.acq_time * self.freq))) + + for step in range(len(average_voltage)): + average_voltage[step] = voltage.read() + sleep(1/self.freq) + data = { + 'Y Position': y_positions[i], + 'Voltage': np.mean(average_voltage) + } + + log.debug("Produced numbers: %s" % data) + self.emit('results', data) + self.emit('progress', 100 * i / len(y_positions)) + if self.should_stop(): + break + + field.write(0.) + stage.close_connections() + + def shutdown(self): + log.info("Finished acquisition")