Skip to content

Commit 0d49759

Browse files
author
DemAnasta
authored
Merge pull request #57 from DSOlab/dev-danast
Dev danast, optim. of sd estimations
2 parents ab19553 + 98178d9 commit 0d49759

File tree

6 files changed

+539
-196
lines changed

6 files changed

+539
-196
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ _(You may not need the ./ part at the begining if you are on a Wnidows system)_.
9696

9797
Under `data/` you will find the "reference" output files for checking, named `strain_info.dat.ref` and `station_info.dat.ref`. Verify that the files you have just created (placed under `bin/`) contain the same results as the "reference" files (this can be very easily performed using the [diff](https://www.gnu.org/software/diffutils/) command).
9898

99-
### TODO: plot example files and compare
10099

101100
# How to use StrainTensor.py
102101

@@ -144,7 +143,12 @@ The whole list of available options, is:
144143
--dmax D_MAX Only relevant for '--method=shen' and if 'd-param' is not passed in. This is the upper limit for searching for an optimal d-param value. Unit is km. Default is dmax=500km.
145144
--dstep D_STEP Only relevant for '--method=shen' and if 'd-param' is not passed in. This is the step size for searching for an optimal d-param value. Unit is km. Default is dstep=2km.
146145
--d-param D_PARAMETER
147-
Only relevant for '--method=shen'. This is the 'D' parameter for computing the spatial weights. If this option is used, then the parameters: dmin, dmax, dstep and Wt are not used.</samp></pre>
146+
Only relevant for '--method=shen'. This is the 'D' parameter for computing the spatial weights. If this option is used, then the parameters: dmin, dmax, dstep and Wt are not used.
147+
-g, --generate-statistics
148+
Only relevant when '--mehod=shen' and '--barycenter' is not set. This option will create an output file, named 'strain_stats.dat', where estimation info and statistics will be written. (default: False)
149+
--verbose Run in verbose mode (show debugging messages) (default: False)
150+
-v Display version and exit. (default: False)
151+
</samp></pre>
148152

149153
For example, the command we used on the [Example](#straintensor_prg_example) section:
150154

@@ -181,7 +185,14 @@ Code Longtitude Latitude Ve Vn dVe dVn
181185
string deg deg mm/yr
182186
</pre>
183187

184-
* **StrainTensor.out :** Parameters used to modify grid, calculate Strain tensors etc.
188+
* **strain_stats.dat :** Output file for statistics:
189+
<pre id="block-samp" <samp=""> --HEADER--
190+
Parameters and arguments used for estimation of strain tensors.
191+
--statistics--
192+
Longtitude Latitude # stations D (optimal) CutOff dis. Sigma
193+
deg. deg. # Km # /
194+
</pre>
195+
185196

186197
# How to use Plot Tools
187198

@@ -216,8 +227,9 @@ Basic Plots & Background :
216227
-r | --region : region to plot (default Greece)
217228
usage: -r west east south north projscale frame
218229

219-
Plot station and velocitiess:
230+
Plot station and velocities:
220231
-psta [:=stations] plot only stations from input file
232+
-deltr [:= delaunay triangles] plot delaunay triangles
221233
-vhor (station_file)[:= horizontal velocities]
222234
-vsc [:=velocity scale] change valocity scale default 0.05
223235

@@ -230,10 +242,13 @@ Plot strain tensor parameters:
230242
-secinv (strain file) [:=2nd invariand] Plot second invariand
231243
-strsc [:=strain scale]
232244
-rotsc [:=rotational scales]
245+
*for -gtot | -dil | -secinv use +grd to plot gridded data
246+
ex:-gtot+grd
233247

234248
Other options:
235249
-o | --output : name of output files
236250
-l | --labels : plot labels
251+
-mt | --map_title "text": title map default none, use quotes
237252
-jpg : convert eps file to jpg
238253
-h | --help : help menu
239254
</pre>
@@ -263,7 +278,7 @@ Other options:
263278
-o | --output : name of output files
264279
-l | --labels : plot labels
265280
-leg : plot legends
266-
-mt | --map_title <text> : title map default none use quotes
281+
-mt | --map_title <text> : title map default none, use quotes
267282
-jpg : convert eps file to jpg
268283
-h | --help : help menu
269284
</pre>
@@ -306,7 +321,7 @@ The work is licensed under [MIT-license](LICENSE)
306321

307322
## Authors & Bug Reports
308323
**Dimitrios G. Anastasiou**
309-
> Dr.Eng Rural & Surveying Engineer | Dionysos Satellite Observatory - NTUA | dganastasiou@gmail.com
324+
> Dr. Rural & Surveying Engineer | Dionysos Satellite Observatory - NTUA | dganastasiou@gmail.com
310325
311326
**Xanthos Papanikolaou**
312327
> Rural & Surveying Engineer | Dionysos Satellite Observatory - NTUA | [xanthos@mail.ntua.gr](mailto:xanthos@mail.ntua.gr)
@@ -329,6 +344,8 @@ This project has received funding from the European Union’s Horizon 2020 resea
329344
Disclaimer: the content of this website reflects only the author’s view and the Commission is not responsible for any use that may be made of the information it contains.
330345

331346
## References
347+
* 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 [Abstract](https://meetingorganizer.copernicus.org/EGU2019/EGU2019-17744-1.pdf)
348+
332349
* Shen, Z.-K., M. Wang, Y. Zeng, and F. Wang, (2015), Strain determination using spatially discrete geodetic data, Bull. Seismol. Soc. Am., 105(4), 2117-2127, doi: 10.1785/0120140247
333350

334351
* Veis, G., Billiris, H., Nakos, B., and Paradissis, D. (1992), Tectonic strain in greece from geodetic measurements, C.R.Acad.Sci.Athens, 67:129--166

bin/StrainTensor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
############################################## ploting
2121
from scipy.spatial import Delaunay
2222

23-
Version = 'StrainTensor.py Version: 1.0-rc4.0'
23+
Version = 'StrainTensor.py Version: 1.0-rc4.1'
2424

2525
def cut_rectangle(xmin, xmax, ymin, ymax, sta_lst, sta_list_to_degrees=False):
2626
new_sta_lst = []
@@ -295,8 +295,14 @@ class myFormatter(
295295
print('[DEBUG] Estimating Strain Tensor at region\'s barycentre.')
296296
if args.method == 'shen':
297297
sstr = ShenStrain(0e0, 0e0, sta_list_utm, **dargs)
298+
else:
299+
sstr = ShenStrain(0e0, 0e0, sta_list_utm, weighting_function='equal_weights')
298300
sstr.set_to_barycenter()
299301
sstr.estimate()
302+
sstr.print_details(fout, utm_zone)
303+
fout.close()
304+
write_station_info(sta_list_ell)
305+
print('[DEBUG] Total running time: {:10.2f} sec.'.format((time.time() - start_time)))
300306
sys.exit(0)
301307

302308
# strain_list = [] Probably we do not need to keep the tensors ...

0 commit comments

Comments
 (0)