Closed zhang01GA closed 5 years ago
The mtpy/imaging/penetration.py, class Depth3D has a check_period_value, which may cause "ERROR: Periods are NOT equal !!!" problem.
If this error happens, use interpolation, or ignore the EDI-files that do not have the period.
The system log an error and raise exception.
Add interpolation if it makes sense to do so. Otherwise, just ignore the EDI files and use only those EDI files which have the period selected.
from mtpy.imaging import penetration_depth3d as pen3d
edi_path = r'C:\mtpywin\mtpy\Alison_penetrationDepth3D\EDI_files' savepath = r'C:/tmp'
Create plot for period index number 1,2,... 10_
pen3d.plot_latlon_depth_profile(edi_path, 10 , 'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
If you use a period float value, not the index integer, you will be fine:
pen3d.plot_latlon_depth_profile(edi_path, 10922.63,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
pen3d.plot_latlon_depth_profile(edi_path, 42.666,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
the script checks if the periods of the set of EDI files are identical. If not, user must specify a period, not period index number, to create penetration depth plotting.
The mtpy/imaging/penetration.py, class Depth3D has a check_period_value, which may cause "ERROR: Periods are NOT equal !!!" problem.
Expected Behavior
If this error happens, use interpolation, or ignore the EDI-files that do not have the period.
Current Behavior
The system log an error and raise exception.
Possible Solution
Add interpolation if it makes sense to do so. Otherwise, just ignore the EDI files and use only those EDI files which have the period selected.
Steps to Reproduce (for bugs)
from mtpy.imaging import penetration_depth3d as pen3d
edi_path = r'C:\mtpywin\mtpy\Alison_penetrationDepth3D\EDI_files'
savepath = r'C:/tmp'
Create plot for period index number 1,2,... 10_
pen3d.plot_latlon_depth_profile(edi_path, 10 , 'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
If you use a period float value, not the index integer, you will be fine:
pen3d.plot_latlon_depth_profile(edi_path, 10922.63,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')
pen3d.plot_latlon_depth_profile(edi_path, 42.666,'det', showfig=True, savefig=True, savepath=savepath,fontsize=11, fig_dpi=400, file_format='png')