-
Notifications
You must be signed in to change notification settings - Fork 14
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
No Example input file #68
Comments
Hi, thanks for your question, it seems that after parsing the input file (where 57 station records have been parsed), the software tries to find any stations falling within the rectangle defined by the coordinates 30.0/36.0/-0.1/-30.0 (in longitude and latitude). The software fails to actually find any station which falls within this region. Is that incorrect? Do you actually have stations within this region in the input file? If so, could you please provide us with the input file so that we can further investigate what is going on? Xanthos |
I had to separate my data to be calculated for each UMT zone, this will effect the strain rate solution but I couldn't find a way to do calculations in different zones. I also can't get -m='shen' to work only the 'veis.' |
thanks for the file, you are correct, computations between zones are still to be addressed. We will look into it and come up with a solution; what is the actual regions limits you are interested in (30.0/36.0/-0.1/-30.0 is only a portion i suppose)? |
I am looking at the East African Rift System so mainly zones 35-38 north and south. There are a few stations in zone 34 but those are less important. There are about 200 stations in total. |
Hi there, here is a quick fix for the problem discussed: Now you should be able to estimate the strain tensors for the whole region (also using the 'shen' method). E.g., with the changes mentioned, i can successfully run: The software now 'forces' all stations to be translated to UTM coordinates relative to a single UTM zone. That could introduce small distortions in case the stations are too far away (but that does not seem to be the case). Please let me know if that looks ok. Xanthos |
please pull the branch origin/bug68, re-install the pystrain package and let me know if this bugfix fixes the problem. The issue is discussed #69 , where a little more detailed is provided regarding the pull/install. let me know if that fixes the problem. Xanthos |
Sorry for the delay in response. I have pulled/installed the new files and am still getting an issue, after I run the StrainTensor.py the strain_info.dat file is empty. I am trying to run my entire area (UMT zone 35-38). I may have misunderstood and the script may still only work for singular UMT zones and not across 4. I am attaching my input file, the output files and the error I am receiving. I am going to try and run these for a smaller area and see if there is still an issue. Error:[DEBUG] Using multithreaded version; available CPU's: 12 |
i made a few changes at the source code and hopefully it should be ok. I was able to run the example dataset you attached, using the command I am not sure it will work though; i can see from the error messages you attach, that you use python2.x. I am currently out of office and i can only try the program in my own personal pc where i only have python 3.x available. I will have access to a 2.x version the following week. Give it a try and let me know how it goes. I attach the resulting strain_info.dat file; i can see that various tensors have been estimated but unfortunately i cannot tell if they make any sense. Xanthos |
I pulled the new code from the bug68, switched which python to 3.7, installed and am still getting the same error with both -m='shen' and -m='veis' File "./StrainTensor.py", line 128, in compute__ |
that is kind of weird .... i tried cloning the repository and installing bug68 and everything seems to work. What is the version of python you use (aka the result from the command I can only imagine that the error is caused by some kind of mismatch between python versions/installed packages. Unfortunately, i cannot try the changes out, in a different python version, until Monday. Xanthos |
I am now using python 3.9.1 but everything is screwy now with my python paths and the script wont even output the stations.dat file. I am going to hopefully get my paths, packages and modules solved in the next day or so. I will let you know if the code indeed runs after that. |
Would you be able to give me the station_info.Nubia.txt and the station_stats.Nubia.txt so that I can plot up the maps to see the output? I am getting no return files and the same error running python in a new environment. This is what I get when I run python setup.py install Installed /Users/chloe/opt/anaconda3/lib/python3.8/site-packages/pystrain-1.0.post1-py3.8.egg Using /Users/chloe/opt/anaconda3/lib/python3.8/site-packages This all looks good to me, but I am still getting this error in the output Using /Users/chloe/opt/anaconda3/lib/python3.8/site-packages |
hi @csboucher , sorry for my late reply; i just got back to office and can now test various things on the software. I attach the output files from running the command I will also try to figure out what is going on with the python versioning and get back to you as soon as possible. Xanthos |
I am running python 3.9.1 and fixed my pyqt on python 2.7 but I am getting the same error where it says: init() takes at most 4 arguments (22 given) |
hi @csboucher We checked the operation of the software in python2.7, 3.8 and 3.9 but we were not able to recreate the error presented to you. Check if there is any conflict with the different versions you have installed. The pystrain setup should be installed with the version that the system uses as default. Maybe you have installed python 3.9.1 but the system default version is python 2.7. Dimitris |
This must be user error on my part if it is working for all of you professional coders as DOS. Thank you so much for your quick responses and altering the code to accommodate multiple UMT zones. I have closed this ticket and will continue to work on my python versions. |
I am getting a divide by zero error when using negative latitude.
./StrainTensor.py -i ../data/Nubia_velzone36S.txt -r 30.0/36.0/-0.1/-30.0 --x-grid-step=0.5 --y-grid-step=0.5 -m='veis' -c
[DEBUG] Reading station coordinates and velocities from ../data/Nubia_velzone36S.txt
[DEBUG] Number of stations parsed: 57
[DEBUG] Left with only 0 stations! Cannot do anything
[ERROR] Failed to parse region argument "30.0/36.0/-0.1/-30.0"
Traceback (most recent call last):
File "./StrainTensor.py", line 407, in
mean_lon = degrees(sum([ x.lon for x in sta_list_ell ]) / len(sta_list_ell))
ZeroDivisionError: integer division or modulo by zero
The text was updated successfully, but these errors were encountered: