MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
145 stars 66 forks source link

Core MT object function MT.write_mt_file does not save filename as given name #96

Closed k-a-mendoza closed 4 years ago

k-a-mendoza commented 4 years ago

expected behavior:

mt_obj = MT('an_edi_file.edi')
mt_obj.write_mt_file(fn_basename='new_edi_file.edi')
# writes an edi file to disk as 'new_edi_file.edi'

current behavior:

mt_obj = MT('an_edi_file.edi')
mt_obj.write_mt_file(fn_basename='new_edi_file.edi')
# writes an edi file to disk as '{station}.edi', regardless of what fn_basename is

I believe the bug is coming from this line.

k-a-mendoza commented 4 years ago

Issue solved in latest pip version.