dsolab / straintool Goto Github PK
View Code? Open in Web Editor NEWStrainTool: A software package to estimate strain tensor parameters
Home Page: https://dsolab.github.io/StrainTool/
License: MIT License
StrainTool: A software package to estimate strain tensor parameters
Home Page: https://dsolab.github.io/StrainTool/
License: MIT License
Describe the bug
If values of grid data (shear strain, dilatation, sigma) are very small scale was not plotted correctly
To Reproduce
run example for alps dataset
Expected behavior
will not print scale at shear strain and sigma maps
Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
In DSOlab-StrainTool-e1d4f4f tool version 1.0
the gmt script for extracting dextral sinistral shear strain is given as below:
"# plot strain rates
awk 'NR > 2 {print $2,$1,$19,0,$21-45+90}' $pth2strinfo
| gmt psvelo -Jm
-O -K -V${VRBLEVM} >> $outfile
according to the above command, it is used to extract data of dextral component in this version of tool but in recent version '1.0-r1' this command is looks like this:
"# plot strain rates
awk 'NR > 2 {print $2,$1,0,$19,$21-45+90}' $pth2strinfo
| gmt psvelo -Jm
-O -K -V${VRBLEVM} >> $outfile
both AWK command are different. please clarify the changes made in this command so we can use corrected command,
plot statistics of strain_stats.dat file
gmtstainplots.sh
...
Use of the next options,
-r=-20/50/28/75 --x-grid-step 2 --y-grid-step 2
If lat or lon is not multiple of step then return the next error:
Traceback (most recent call last):
File "./../bin/StrainTensor.py", line 241, in <module>
grd = pystrain.grid.Grid(lonmin, lonmax, args.x_grid_step, latmin, latmax, args.y_grid_step)
File "build/bdist.linux-x86_64/egg/pystrain/grid.py", line 70, in __init__
AssertionError
check calculation of VcV matrix
magnitude of sd is very big!
check pystrain/strain.py line:930-933
Describe the bug
When one tensor (-b) set in arguments, no results in the output
To Reproduce
Steps to reproduce the behavior:
Expected behavior
no results in strain_info.dat
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
If sVn sVe set to zero in the input file then tensor include this station will not estimated. script cannot create covariance matrix (1/sV...)
Desktop (please complete the following information):
Propose
Recomendation about projections
generally UTM,
lat gt 60??
the -r or --region option leads to error when set over longitude 0.
Example : -r -9/15/34/58
The code returns :
usage: StrainTensor.py [-h] -i INPUT_FILE [--x-grid-step X_GRID_STEP] [--y-grid-step Y_GRID_STEP] [-m METHOD] [-r REGION]
[-c] [-b] [--max-beta-angle MAX_BETA_ANGLE] [-t WEIGHTING_FUNCTION] [--Wt Wt] [--dmin D_MIN]
[--dmax D_MAX] [--dstep D_STEP] [--d-param D_PARAMETER] [-g] [--verbose] [--multicore] [-v]
StrainTensor.py: error: argument -r/--region: expected one argument
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
Transforming ellipsoidal to UTM coordinates and back is erroneous; see the test case in pystrain/geodesy/utm.py
. Seems that there is a problem (at least) with negative longtitudes.
Description
multicore option on Windows returns error. Windows not use fork() system, global variables not working.
To Reproduce
1.Run StrainTensor.py with --multicore option on Windows System
2. error:
File "C:\Users\diman\gh_projects\StrainTool\bin\StrainTensor.py", line 109, in compute__ N, E, ZN, _ = ell2utm(clat, clon, Ellipsoid("wgs84"), utm_zone) NameError: global name 'utm_zone' is not defined
Desktop:
Describe the bug
whenever i used the --generate-statistics or -g option, the code doesn't run. I get this message: StrainTensor.py: error: unrecognized arguments: --generate-statistics.
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
StrainTool fails if -r / --region switch fails if not set in command line
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error
Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
input file duplicate lines stop processing
Propose
-- Add README warning
-- add check check on I/O parse script??
Describe the bug
multi-threading mode not working on Windows 10
To Reproduce
Steps to reproduce the behavior:
.\StrainTensor.py -i <data_file> --x-grid-step 1 --y-grid-step 1 -g --multicore
Traceback (most recent call last):
File "D:\gh_project\StrainTool\bin\StrainTensor.py", line 487, in <module>
[ p.start() for p in [p1, p2, p3, p4]]
File "D:\gh_project\StrainTool\bin\StrainTensor.py", line 487, in <listcomp>
[ p.start() for p in [p1, p2, p3, p4]]
File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Program Files\Python39\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Program Files\Python39\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Program Files\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
reduction.dump(process_obj, to_child)
File "C:\Program Files\Python39\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_io.TextIOWrapper' object
PS D:\gh_project\StrainTool\bin> Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\Python39\lib\multiprocessing\spawn.py", line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
File "C:\Program Files\Python39\lib\multiprocessing\reduction.py", line 79, in duplicate
return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Δεν επιτρέπεται η πρόσβαση
Desktop (please complete the following information):
Describe the bug
Get much lower uncertainties than expected running the example (/5) for each component of strain rate or velocity.
To Reproduce
I have installed correctly the soft with python 3.6 (not working with 3.11 config) and tried the example (CNRS_midas.vel is not in the git directory directly, I got it from the DSOlab-StrainTool-9fa7ae7 repository and remove redundant stations).
Run the suggested test ./StrainTensor.py -i ../data/CNRS_midas.vel -r 18.75/30.25/32.75/42.25 --x-grid-step=0.5 --y-grid-step=0.5 --dmin=1 --dmax=500 --dstep=1 --Wt=24 -c -g
Expected behavior
should get something like :
Latitude Longtitude vx+dvx vy+dvy w+dw exx+dexx exy+dexy eyy+deyy emax+demax emin+demin shr+dshr azi+dazi dilat+ddilat sec. invariant
36.00000 23.50000 +7.2 +5.4 -11.8 +4.6 +5.3 +26.9 +14.5 +48.1 +12.7 +26.9 +32.3 +33.3 +38.8 +42.0 +7.9 +38.1 +15.5 +27.4 +27.5 +0.9 +46.8 +58.5 +37.6
36.00000 24.00000 +7.9 +5.4 -11.5 +4.6 +6.4 +23.6 +8.9 +43.3 +9.8 +23.6 +32.0 +28.5 +35.6 +32.6 +5.3 +38.8 +15.2 +24.7 +20.2 +0.8 +40.9 +51.9 +34.6
and got :
Latitude Longtitude vx+dvx vy+dvy w+dw exx+dexx exy+dexy eyy+deyy emax+demax emin+demin shr+dshr azi+dazi dilat+ddilat sec. invariant+dsec inv.
36.00000 23.50000 +7.2 0.9 -11.8 0.7 +0.3 0.2 +15.0 7.8 +12.9 4.4 +32.1 5.3 +39.0 6.8 +8.1 6.2 +15.5 4.4 +28.2 0.1 +47.1 9.5 +39.8 6.9
36.00000 24.00000 +7.9 0.9 -11.5 0.7 +0.3 0.2 +9.3 7.1 +10.1 3.8 +31.9 4.6 +35.7 5.3 +5.4 6.3 +15.1 4.0 +20.9 0.1 +41.2 8.4 +36.2 5.3
Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
The "veis" method doesn't work for multiple UMT zones
To Reproduce
Steps to reproduce the behavior:
Mid_EARS_vel.txt
2)get error of UMT zoning
Expected behavior
I expect calculation of delaunay triangles and strain rate tensor for the veis method
Desktop (please complete the following information):
Additional context
The code was changed a few months ago to allow for multiple umt zones with the shen method but I don't know if it was changed for the veis method. Thank you!
generate psta and vhor switches
Add stamp that StrainTool used for the plots
gmtstrainplot.sh
modify gmt scipt
Wrong calculation of 2nd invariant.... sqrt(exx^2 + eyy^2 + exy^2)
solution: use function: sqrt(exx^2 + eyy^2 + 2exy^2)
strainpy line 587
Shen paper
add readme file
scale, plots, frames legends
the axes are printed upside down
change color one of them
Expected Behavior
I expect the map to remain the same size (or relatively so) when changing the weigh (wt), but I expect the transitions between different strain rates to be smoother as the algorithm should take in more stations as the cell size gets bigger.
Actual Behavior
From my knowledge of the Shen et al, 2015 method changing the weight (wt) parameter shouldn't affect the size of the map. However I am finding that when I increase the wt the map becomes smaller and smaller. The map does get smoother (as expected)
Possible solution
I am wondering if there is a cap on the amount of elements that can be in the strain rate tensor and I am running out of space as the algorithm works north to south. There are plenty of GPS velocities in the areas that are coming up empty with increasing the wt.
Steps to Reproduce the Problem
Files
Please let me know if more files are needed.
Hello,
I would like to congratulate on their project. However, I would rather have access to the next article, because I think It is very important to understand better the methodology.
Anastasiou D., Ganas A., Legrand J., Bruyninx C., Papanikolaou X., Tsironi V. and Kapetanidis V. (2019). Tectonic strain distribution over Europe from EPN data. EGU General Assembly 2019, Geophysical Research Abstracts, Vol. 21, EGU2019-17744-1
If this is not possible, I would like to share me this article to my email.
Thank you.
Describe the bug
if conditions for float numbers in bash using bc, not working for windows
./gmtstrainplot.sh: line 131: bc: command not found
./gmtstatsplot.sh: line 415: bc: command not found
To Reproduce
change [bc] with maybe awk condition
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
Bug at program gmtstrainplot.sh
The bug is caused when bash calls python to compute/print computation results. Some of the calls
cause errors in Python3.x (e.g sclat=$(echo print ${south} + ${tmp_scrate} | python)
). These lines
are ok for previous versions of Python.
To Reproduce
Steps to reproduce the behavior:
"<stdin>", line 1
print 34 + 0.4
or
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for -: 'builtin_function_or_method' and 'float'
Expected behavior
All of the lines just compute a bash variable (to be used later on)
Screenshots
Desktop (please complete the following information):
Additional context
Bug reported by Varvara
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
def cmp_strain:
calculate sd of second invariant and add new column in output file
Change output units for rotation form ppm to marcsec/y
output files..
plot files and scales
Describe the bug
delaunauy def generate fake triangles or unnecessary triangles if stations are very close together. -> wrong results
To Reproduce
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
Multicore processing make step in the output grid
To Reproduce
Steps to reproduce the behavior:
./StrainTensor.py -i ../data/valdata/midas001.vel --x-grid-step 1 --y-grid-step 1 -g --multicore
Desktop (please complete the following information):
make code readable!!
remove unnecessary comments/code
Create a few validation tests to automate CI and check new commits/pulls.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.