jenndrei / BayHunter

McMC transdimensional Bayesian inversion of surface wave dispersion and receiver functions
https://jenndrei.github.io/BayHunter
GNU General Public License v3.0
103 stars 43 forks source link

Missing import os in SynthObs.py #8

Open dylanmikesell opened 3 years ago

dylanmikesell commented 3 years ago

I was trying to save synthetic dispersion curves to a given file name. I got the following error.

SynthObs.save_data(syn_disp, outfile=disp_file)

File "/Users/dmikesell/anaconda3/envs/tomo/lib/python3.7/site-packages/BayHunter/SynthObs.py", line 108, in save_data name, ext = os.path.splitext(outfile) NameError: name 'os' is not defined

I will add os to the import list in this file. I will also fix an error in the "ext" and the ".". When providing a file name, it ends up having two dots in the extension because "ext" already contains a dot.