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 hope this message finds you well. I am currently working on a project involving magnetotelluric (MT) data, and I am encountering an issue when trying to create an MT collection using my own EDI files. While the creation of the HDF5 file works seamlessly with the demo data provided, I am running into errors when processing my data.
Here is a brief overview of my workflow:
I define the path to my EDI file and create a new MTCollection instance.
I read the EDI file into an MT object and add the transfer function to the MTCollection.
After setting the working dataframe, I attempt to plot various responses.
However, I am getting errors when plotting, specifically a ValueError: Axis limits cannot be NaN or Inf. This seems to indicate that there may be invalid or missing values in my data, but I am not sure how to diagnose and fix this.
Here’s a simplified version of the code I’m using:
from mtpy import MT, MTCollection
from pathlib import Path
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello MTPy Community,
I hope this message finds you well. I am currently working on a project involving magnetotelluric (MT) data, and I am encountering an issue when trying to create an MT collection using my own EDI files. While the creation of the HDF5 file works seamlessly with the demo data provided, I am running into errors when processing my data.
Here is a brief overview of my workflow:
I define the path to my EDI file and create a new MTCollection instance.
I read the EDI file into an MT object and add the transfer function to the MTCollection.
After setting the working dataframe, I attempt to plot various responses.
However, I am getting errors when plotting, specifically a ValueError: Axis limits cannot be NaN or Inf. This seems to indicate that there may be invalid or missing values in my data, but I am not sure how to diagnose and fix this.
Here’s a simplified version of the code I’m using:
from mtpy import MT, MTCollection
from pathlib import Path
Define the path to the EDI file
edi_file = Path("/path/to/your/data.edi")
Create a new MTCollection instance
mtc = MTCollection()
output_h5_file = Path("/path/to/your/output.h5")
mtc.open_collection(output_h5_file)
Create an MT object and read the specific EDI file
mt_object = MT()
mt_object.read(edi_file)
mt_object.survey_metadata.id = "profile"
Add the transfer function to the MTCollection
mtc.add_tf(mt_object)
Set the working dataframe for the current profile
mtc.working_dataframe = mtc.master_dataframe.loc[mtc.master_dataframe.survey == "profile"]
Attempt to plot the phase tensor pseudosection
ptps_plot = mtd.plot_phase_tensor_pseudosection(x_stretch=10, plot_tipper="yri")
Beta Was this translation helpful? Give feedback.
All reactions