This Python Script Arctool plot earthquake focal mechanism beach balls as shapefile. Data needed is earthquakes catalog point featureclass including attributes of lon, lat, M,strike, dip, rake, all in numerical value. The fields name can be any.
Polarity is stored in 'pola' field on which the beach balls and PT axis can be symbolized after balls formed.
The original codes is modified so as no advanced arcmap function of "Feature to Polygon" is needed.
V2.0 modification
a. Repaired a bug: acos domain overflow arised by floating point truncation error.
b. A smoothness option added to make balance between smoothness and speed.
c. Dispersing beach balls with earthquake focals.
Hello Wu,
Thanks for sharing your tool with us! I just wanted to point you to our code sharing site as well: ArcGIS Code Sharing
Many users will check that site for tools like this, so you might find more users by posting on that site as well.
Cheers!
Thank you Dow. errors occured when I uploaded file as below:
{"description":"","number":-2147418094,"stack":"Error\n at Anonymous function (http://codesharing.arcgis.com//js/uploader-service.js:67:13)\n at Promise (https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.1/es6-shim.js:2348:11)\n at uploadItem (http://codesharing.arcgis.com//js/uploader-service.js:55:9)\n at Anonymous function (http://codesharing.arcgis.com//js/uploader-service.js:18:13)\n at Promise (https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.1/es6-shim.js:2348:11)\n at svc.sendData (http://codesharing.arcgis.com//js/uploader-service.js:16:9)\n at $scope.sendData (http://codesharing.arcgis.com//js/arcscripts-controller.js:310:13)\n at fn (Function code:2:192)\n at b (http://codesharing.arcgis.com//js/angular.min.js:122:174)\n at e (http://codesharing.arcgis.com//js/angular.min.js:265:195)"}
I have no idea about what's wrong.
Hm that's odd it appears to be working on my end. Unfortunately I don't have anything to do with the site administration, I'm on the GP/Python side of things. Perhaps try again with a different browser or disable any script blocker add-ons you might have?
Hi Dow, Thanks for your suggestion. The Google browser do it as your tip.
Thanks for sharing this brilliant tool Wu!
Thanks for your interest in my tool Ramesh. The tool here is not updated cause it's a posting. The newest version can be downloaded at: http://www.arcgis.com/home/item.html?id=380b8f93cd684dbea56083218a3b2f43
Suggestions are welcomed about the functions of the tool.
Hi Wu,
First at all, thanks for sharing,,, great tool and very useful. Just a couple of commnets. When you plot several FM the spheres are very very small and you have to zoom a lot. As these spheres are made up with polygons you cannot increase the size of the FMs to display them properly.... Any way to sort out this?
Thanks again,
Pedro
Hi Pedro,
Thanks for your comments. We have two parameters to control the size of the balls and PT axes. That are Rad.m1 and Rad.m8. You can set these two paras deliberately. If the balls are too small, could the paras not be set properly? The default values are 0.025 and 0.1, the unit is degree for WGS84 GCS, measuring about 2.5 km and 10 km respectively. The responding values will be set to 2500 and 10000 m for a WGS84 PCS.
Wu Tiesheng
HI Wu,
Thanks for the info and quick response but after trying to plot several
datasets and repeat the process around 20 times I could do it but but
something to say. The radius of the beach ball in WGS84 is 1 point=2
metres, or the same 1 km=500points. This does not match with what you say
in your email,,,,, something wrong? Anyhow, if I want beachballs of 25 km
of diameter to display in regional maps of 1:6.000.000 I need to put 12500
points in the Rad. min1.
Moreover, what really is the difference between Rad.min1 and Rad.m8?
Thanks a lot for this tool!!!
Cheers,
Pedro
Pedro Martinez Duran
Hi Pedro,
I am not sure yet why the tool plot very small beach balls with your data. The Rad.m1 decides radius of beachballs with magnitude M=1, and Rad.m8 for M=8,so the balls size will be proportional to magnitudes. You can set these two values as you like, just increasing these two values if your want larger balls. The only thing is that the tool doesn't care the linear unit of the coordinate system of your quakes cataloge feature. if you input Rad.m1 with 1, the tool plot beachballs of radius=1 for M1 quakes, which will be a 1m, 1 feet or 1 degree radius of balls according the linear unit of your quakes feature coordinate system. Could you attach a bit of your data and result?
Wu Tiesheng
Hi Pedro-Don't bother to attach your data please. Now I got that your quakes feature is in a PCS with a linear unit of meter . So you can make beachballs of 25 km diameters by input Rad.m1 and Rad.m8 to 12500 . Default values, in degree for a WGS 84 GCS, is not proper for a WGS84 PCS, As mentioned in my first responding post to your comments.
Thank you again for your using my tool.
Wu Tiesheng
Hi Wu,
Thanks for your comments. Actually, I have been testing your tool
extensively until I got the units issue.... the differences between
Geographical and Projected coordinate systems...and congratulations for
this tool.
Best Regards,
Pedro
Pedro Martinez Duran
Hello Dr. Wu,
Thank you for this great tool. I have a question about the input format for numbers. I occasionally receive a "Failed script" error due to "ValueError: math domain error" and I haven't been able to figure out what is causing it. Below are some of the causes I've discovered for this error but there is clearly another criterion that I'm missing.
What else am I missing? Do values need to be rounded in some way? Do fields need to be in format = Double? Etc.
The traceback listed errors in line 23 in <module> for the Beachballs_all_v20 python script and also line 582 in <module> in the focal_all.py script.
Thank you,
Jens
Hi Jens,
Thank you for your using of this tool. The error you found may be a bug. Could you check something please as bellow?
1. The tool you downloaded is version 2.1 at : http://www.arcgis.com/home/item.html?id=380b8f93cd684dbea56083218a3b2f43rrather than v2.0 posted here.
2. Attach your data or tell me the strike, dip and rake values when error occur by the "No=" indexing. .
Thank you, Dr. Wu. Downloading v.2.1 seems to have solved my problem (I was using v.2.0 before).
Dear Dr. Wu,
Thanks for your excellent tool for focal mechanism. I could able to plot beach balls and obtained SHmax but, I need to understand what are SHmax and stress directions. Could you please provide me any literature to understand these parameters?
As I could understand NF-Normal Fault, SS-Strike-slip, TF-Thrust fault, TS-? and U-?, last two I did not get. If you provide me any document, that would help me a lot. Your kind help shall be highly appreciated.
Thanking you,
Sincerely,
Ramesh
HEY, Thanks for using. Please refer to: World Stress Map: Data
Dear Dr. Wu,
Thanks for your prompt response.
best regards
Ramesh
Dear Dr Wu,
I have 10.8 version of Arc Map and I am trying to plot focal mechanisms for 36 EQs.
The error is below. Please any ideas to solve it?
Thank you in advance!
Best regards
Ioanna Triantafyllou
Executing: ArcBeachBall Export_Output_10 Strike Dip Rake M 0.025 0.1 C:\Users\Ioanna\Documents\ArcGIS\Default.gdb\fl 20 0.2 0.3 2 0 Point true # # false
Start Time: Tue Aug 31 00:24:39 2021
Running script ArcBeachBall...
Failed script ArcBeachBall...
SyntaxError: invalid syntax (<string>, line 1)
Failed to execute (ArcBeachBall).
Failed at Tue Aug 31 00:24:40 2021 (Elapsed Time: 0,72 seconds)