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

Invalid UTM Zone #69

Closed
cysarine opened this issue Aug 21, 2021 · 10 comments
Closed

Invalid UTM Zone #69

cysarine opened this issue Aug 21, 2021 · 10 comments

Comments

@cysarine
Copy link

Hi, I´m trying to run the software with my data, I successfully run the example data, but when I run my data I got the next error:

python3.6 StrainTensor.py -i ../data/IGP_VEL.vel -r=-79.0/-75.5/-12.5/-8.5 --x-grid-step=0.5 --y-grid-step=0.5 --dmin=1 --dmax=500 --dstep=1 --Wt=24 -c -g

[DEBUG] Reading station coordinates and velocities from ../data/IGP_VEL.vel
[DEBUG] Number of stations parsed: 20
Traceback (most recent call last):
File "StrainTensor.py", line 416, in
assert Zone == utm_zone, "[ERROR] Invalid UTM Zone."
AssertionError: [ERROR] Invalid UTM Zone.

I appreciate your help.
Thanks

@csboucher
Copy link

I too am having this problem, but only when using negative longitude or latitude. I am currently looking through the code to see if they somehow define the negative values differently or if there is a different way in shell to define negative numbers.

@xanthospap
Copy link
Contributor

Hi there,

here is what i think the problem is: when performing computations to estimate strain tensor parameters, the input ellipsoidal coordinates are transformed to UTM coordinates. We have placed a limitation when transforming to UTM, that all stations considered should fall within the same (UTM) zone. We are currently working on removing this limitation. I will have news soon.

Xanthos

@xanthospap
Copy link
Contributor

xanthospap commented Aug 22, 2021

Hi @cysarine ,

please check the answer discussed in #68 . Let me know if that fixes the issue.

Xanthos

@cysarine
Copy link
Author

Hello @xanthospap ,
Thank you very much for your answer. I have reviewed and followed the instructions in #68 . And the software has run without any errors. However, when reviewing the strain_info.dat file the coordinates generated in degrees of lat and long do not correspond to my study area. Attached image of the file.

Hope you can help me solve this problem. Greetings

Strain_info_dat
station_info_dat

@xanthospap
Copy link
Contributor

You are right,

i didn't correctly predict the side-effects of the change! sorry for this. I will patch this and and send a fix in the following hours.

@xanthospap
Copy link
Contributor

@cysarine

i have made changes to the source code to fix the bug. Quite a few things had to be corrected, so i have created a new branch committed to the bugfix. It is called bug68.

Please pull the new branch and check if the program runs as expected. Something like git fetch; git checkout --track origin/bug68 should do the job (more info https://stackoverflow.com/questions/9537392/git-fetch-remote-branch). After the pull, you should also re-install the pystrain package (aka go to the folder StrainTool/pystrain and execute the command sudo python setup.py install).

Please let me know if that fixes the problem. If not, could you please share your input file so that i can further check/debug the source code?

Xanthos

@cysarine
Copy link
Author

Hello there,
I have installed the software with the corrections you made, however, the strain_info.dat file keeps giving the same error with wrong lat and long. I attach the file of my study area. Thanks for your help

IGP_VEL.txt

@xanthospap
Copy link
Contributor

@cysarine ,

i have made a few changes in the source code and hopefully it should now produce sensible results. I have tried issuing the command ./StrainTensor.py -i ../data/IGP_VEL.txt -r=-79.0/-75.5/-12.5/-8.5 --x-grid-step=0.5 --y-grid-step=0.5 --dmin=1 --dmax=500 --dstep=1 --Wt=24 -c -g and it seems to produce realistic values (i attach the result file).

The changes i made are in the same branch (aka bug68), so you will need to pull the latest changes (>git pull origin bug68) and then reinstall the pystrain package).

Please give it a try and let me know if it works as expected.

Xanthos

strain_info.txt

@xanthospap
Copy link
Contributor

dear @cysarine ,

have you tried the new version of the software (that is pulling the branch bug68)? Does it work as expected?

Xanthos

@cysarine
Copy link
Author

cysarine commented Sep 3, 2021

Hi Xanthos,
Thanks a lot for your help, the new version of the software works for me.

Cisarine

demanasta added a commit that referenced this issue Sep 11, 2021
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

4 participants