Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning :Data:unable to set relative locations form 'mt_obj' #162

Open
wilsonweijun opened this issue Dec 2, 2021 · 0 comments
Open

Warning :Data:unable to set relative locations form 'mt_obj' #162

wilsonweijun opened this issue Dec 2, 2021 · 0 comments

Comments

@wilsonweijun
Copy link

In making data input file , the warning statement " WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented" always exist. Does it afffect the projection results?

Expected Behavior

The Warning statment is to be fixed.

Current Behavior

D:\mtpywin\mtpy\mtpy\utils\calculator.py:371: RuntimeWarning: invalid value encountered in double_scalars
z_rel_err = error/z_amp
WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented
WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented
WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented
WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented
WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented
WARNING:Data: Unable to set relative locations from 'mt_obj' - not yet implemented

Possible Solution

I did not install GDAL software. The pypoj is used to process coordinate projection problems.

Steps to Reproduce (for bugs)

# Paste your code here
#
#
import os
from mtpy.modeling.modem import Data
from mtpy.core.edi import Edi
from mtpy.utils.calculator import get_period_list
import numpy as np

#Creat a data input file

workdir='D:/Manuscripts/Manuscript2020/ModemInv'

if not os.path.exists(workdir):
    os.mkdir(workdir)
    
edipath='D:/mtpywin/mtpy/HeiheEDIwithRot12deg'
edi_list=[os.path.join(edipath,ff) for ff in os.listdir(edipath) if(ff.endswith('.edi'))]

period_list=get_period_list(1.e-4,0.2,10)
do=Data(edi_list=edi_list,
        inv_mode='2',
        save_path=workdir,
        period_list=period_list,
        period_buffer=2,
        error_type_z=np.array([['floor_egbert','floor_egbert'], ['floor_egbert','floor_egbert']]), # add floor to apply it as an error floor
                                                                
        error_value_z=np.array([[1,4.5], [4.5,1]]), # can supply a 2 x 2 array for each component or a single value
        model_epsg=4530)

do.write_data_file()

np.savetxt(os.path.join(workdir,'center_position.txt'),
           np.array([do.center_point['east'], do.center_point['north']]))

np.savetxt(os.path.join(workdir,'epsg.txt'),[do.model_epsg])

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
  * Operating system: windows 10
  * MtPy version: Ver. 1.0 downloaded in 2020
  * Python version: 3.7.10
<!---if it is data visualization related, also provide-->
  * Matplotlib version: 
  * Matplotlib backend (`print(matplotlib.get_backend())`):
<!---if it is graphical user interface (GUI) related-->
  * QT version:

**Installed Python Packages:**
use `pip freeze` or `conda list [-n ENVIRONMENT_NAME]` to list all the installed libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant