diff options
Diffstat (limited to 'qolab')
-rw-r--r-- | qolab/file_utils/__init__.py | 4 | ||||
-rw-r--r-- | qolab/hardware/basic.py | 4 | ||||
-rw-r--r-- | qolab/hardware/scope/__init__.py | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/qolab/file_utils/__init__.py b/qolab/file_utils/__init__.py index a6847a2..8d19415 100644 --- a/qolab/file_utils/__init__.py +++ b/qolab/file_utils/__init__.py @@ -60,13 +60,13 @@ def get_runnum(data_dir): f.close() return(run_number) -def get_next_data_file(prefix, savepath, run_number=None, datestr=None, date_format='%Y%m%d', extention='dat'): +def get_next_data_file(prefix, savepath, run_number=None, datestr=None, date_format='%Y%m%d', extension='dat'): if run_number is None: run_number = get_runnum( savepath ) today = date.today() if datestr is None: datestr = today.strftime(date_format) - fname = os.path.join(savepath, f'{prefix}_{datestr}_{run_number:05d}.{extention}') + fname = os.path.join(savepath, f'{prefix}_{datestr}_{run_number:05d}.{extension}') return(fname) def save_table_with_header(fname, data, header='', comment_symbol='%', skip_headers_if_file_exist=False, item_format='e', item_separator='\t'): diff --git a/qolab/hardware/basic.py b/qolab/hardware/basic.py index 83fe57c..2161dca 100644 --- a/qolab/hardware/basic.py +++ b/qolab/hardware/basic.py @@ -112,7 +112,7 @@ class BasicInstrument: header = header.split('\n') return header - def getNextDataFile(self, extention='dat'): - fname = get_next_data_file(self.config['FnamePrefix'], self.config['SavePath'], extention=extention) + def getNextDataFile(self, extension='dat'): + fname = get_next_data_file(self.config['FnamePrefix'], self.config['SavePath'], extension=extension) return fname diff --git a/qolab/hardware/scope/__init__.py b/qolab/hardware/scope/__init__.py index b4bdd0e..bf9df60 100644 --- a/qolab/hardware/scope/__init__.py +++ b/qolab/hardware/scope/__init__.py @@ -59,11 +59,11 @@ class Scope(BasicInstrument): allTraces=self.getAllTraces(**kwargs) allTraces.plot() - def save(self, fname=None, item_format='e', availableNpnts=None, maxRequiredPoints=None, decimate=True, extention='dat'): + def save(self, fname=None, item_format='e', availableNpnts=None, maxRequiredPoints=None, decimate=True, extension='dat'): allTraces = self.getAllTraces(availableNpnts=availableNpnts, maxRequiredPoints=maxRequiredPoints, decimate=decimate) allTraces.config['item_format']=item_format if fname is None: - fname = self.getNextDataFile(extention=extention) + fname = self.getNextDataFile(extension=extension) allTraces.save(fname) print(f'Data saved to: {fname}') return(fname) |