diff --git a/lasp/lasp_measurement.py b/lasp/lasp_measurement.py index 2bb1ee4..fb7dd52 100644 --- a/lasp/lasp_measurement.py +++ b/lasp/lasp_measurement.py @@ -737,10 +737,12 @@ class Measurement: delimiter: Column delimiter firstcoltime: If true, the first column is the treated as the sample time. + force: If True, overwrites existing files with specified `mfn` + name. """ if os.path.splitext(mfn)[1] != '.h5': mfn += '.h5' - if os.path.exists(mfn): + if os.path.exists(mfn) and not force: raise ValueError(f'File {mfn} already exist.') if timestamp is None: timestamp = int(time.time())