You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a MT collection that has no survey id and to downsample frequencies, I needed to add the survey id because the keys for MT collection are survey_id.station_id and having '0' for survey id meant no string and problem. I got this error:
I have used this code to downsample and add the id:
# with MTCollection() as mc:mc.open_collection(r"C:\Users\aivazpourporgous\Documents\MT\CCA\Inversion\CCA_0\edi\lin0_resampled_frequency.h5")
forfilenameinedifiles:
mt_object=MT()
mt_object.read(filename)
#mt_object.survey = "downsampled"new_frequency=np.logspace(-3, 3, 20)
new_mt_obj=mt_object.interpolate(new_frequency, f_type="frequency")
new_mt_obj.survey="downsampled"mc.add_tf(new_mt_obj)
##
Now I have two entities for each station one unknown survey id and one downsampled. I added the id to the original mt_object before making new_mt_obj but result is same.
The text was updated successfully, but these errors were encountered:
@SashaAivaz Try again, I just fixed a bug in MTCollection.add_tf.
I updated the add_tf to have arguments add_tf(tf_object, new_survey='new_survey_name', tf_id_extra='interpolated'
The tf_id_extra will add this onto the end of the tf_id which is the transfer function id, usually the same as the station. If your station and tf_id are "mt01" then if you set tf_id_extra the new tf_id will be "mt01_tf_id_extra", helps organize transfer functions.
But now you should be able to set the survey for your original data and your downsampled data.
I have a MT collection that has no survey id and to downsample frequencies, I needed to add the survey id because the keys for MT collection are survey_id.station_id and having '0' for survey id meant no string and problem. I got this error:
I have used this code to downsample and add the id:
Now I have two entities for each station one unknown survey id and one downsampled. I added the id to the original mt_object before making new_mt_obj but result is same.
The text was updated successfully, but these errors were encountered: