diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-25 10:58:43 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-25 10:58:43 -0400 |
commit | 2bd698a2529ae2730de68097a10f5e2b9e6e09c6 (patch) | |
tree | 4d19a6c153b0b9c5061e4372a3e0ecdf034ddcc7 | |
parent | 3a93dd6adec47f9d76ad4ef3a9b415683e3eecb2 (diff) | |
download | pyExpControl-2bd698a2529ae2730de68097a10f5e2b9e6e09c6.tar.gz pyExpControl-2bd698a2529ae2730de68097a10f5e2b9e6e09c6.zip |
use settings from Save section
-rw-r--r-- | eitControl.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/eitControl.py b/eitControl.py index 7efccdd..c9967a6 100644 --- a/eitControl.py +++ b/eitControl.py @@ -75,15 +75,6 @@ class Experiment: def __init__(self, root, config, args): self.root = root self.config = config - if args.save_prefix: - self.save_prefix = args.save_prefix - else: - self.save_prefix = "set_the_prefix" - if args.data_dir: - self.data_dir = args.data_dir - else: - self.data_dir = "set_the_data_dir" - self.save_cnt = 0 self.tic = 0 self.newDataIsReady = False @@ -103,7 +94,6 @@ class Experiment: def hardwareSetup(self,args): if args.test: print("Test mode, run with fake hardware") - self.data_dir="VAMPIRE.Data" self.sweeper = Sweeper(self.root, Npoints=100, SweepTime=1, onTicCallbacks=[self.onTic]) self.hardware['LabJack'] = ue9qol.UE9qolDummy(sweeper=self.sweeper) self.hardware['rfGen'] = rfGen.rfGenLMX2487Dummy(port='/dev/ttyUSB0', speed=115200, timeout=1) @@ -244,7 +234,7 @@ class Experiment: self.buttons["StartStopToggle"].clicked.connect(self.stop) def getNewDataFileName(self, ext="csv"): - data_dir = self.data_dir + data_dir = self.config['Save'].get('data_dir', fallback='unset_data_dir') if not os.path.exists(data_dir): os.mkdir(data_dir) if not os.path.isdir(data_dir): @@ -252,7 +242,7 @@ class Experiment: print(f"Will use current dir for storage") data_dir = "." - prefix = self.save_prefix + prefix = self.config['Save'].get('save_prefix', fallback='unset_experiment_prefix') today = date.today() datestr = today.strftime("%Y%m%d") self.save_cnt += 1 @@ -413,9 +403,6 @@ if __name__ == '__main__': mw.show() - args.save_prefix="eit" - args.data_dir="z:\data.VAMPIRE" - experiment=Experiment(l, config, args) app.exec() |