Print

Print


Just to throw another cat amongst the pigeons, it is well worth having a look at Julia for numerical computing:
http://julialang.org/
It has a Matlab like syntax (nearly identical as far as I can tell) and a similar user friendly development environment. Most impressive however, are the benchmarks which are approaching C / Fortran territory. It is still fairly early days, but this is one definitely worth watching.
Thomas


________________________________
From: paul wilson <[log in to unmask]>
To: [log in to unmask] 
Sent: Thursday, 22 August 2013, 8:53
Subject: Re: Numerical Modeling Software


For what it's worth, I found that "Learn Python the hard way" was useful: you can use the html version for free.

http://learnpythonthehardway.org/

I was pretty much a beginner at programming (although had some experience at making a ZX Spectrum do vaguely useful things in BASIC), and I found it very helpful. Right now I use the command line, using freely available modules such as Matplotlib to create graphs and figures. It does take a bit of time to figure out initially, but is saving me time in the long run as I no longer have to faff around in Excel to get something like a publishable figure. I suspect there are also GUI interfaces available for various tasks, but I don't have any experience of using these myself. It's been mentioned by others that there are useful distributions of Python for scientific applications, which saves some time and faff finding and installing all the different modules that you might need.

Cheers,

Paul

--------------------------------------------------------
Dr Paul Wilson | Senior Geologist
[log in to unmask]


RDR Group
13th  Floor, Pinnacle
67 Albion Street
Leeds
LS1 5AA 

Tel: +44(0)113 222 6865
Fax: +44(0)113 245 4608
Mob: +44(0)787 260 1573
Web: www.rdrgroup.co.uk



-----Original Message-----
From: Tectonics & structural geology discussion list [mailto:[log in to unmask]] On Behalf Of Massey, Matthew A
Sent: 22 August 2013 01:04
To: [log in to unmask]
Subject: Re: Numerical Modeling Software

Thanks again for all the replies...this was definitely what I was hoping for, but the answers are making my choice more difficult.

To the pro-Python folks - I've had some interest in Python for several years now, mainly for writing simple scripts to implement in ArcGIS & mapping applications.  So now that you mention Python as a viable alternative for my purpose of modeling progressive deformation, I'm even more curious.  Let me reiterate that I am not a programmer.  In fact, I'm quite computer illiterate.  Keeping that in mind, would modeling in Python be OK for a beginner (that doesn't mind putting in the work)?  I don't completely understand how Python works, but is there some kind of stand-alone program(s) with a GUI that I would be using, or would it all be done in my computers terminal using command line?

___________________
Matthew A. Massey
Department Earth & Environmental Sciences University of Kentucky Lexington, KY 40506-053 ________________________________________
From: Tectonics & structural geology discussion list [[log in to unmask]] on behalf of Robert Smallshire [[log in to unmask]]
Sent: Wednesday, August 21, 2013 10:54 AM
To: [log in to unmask]
Subject: Re: Numerical Modeling Software

Hi Matt,

I don't want to discourage you or anyone else here from cutting their own code, but I do want to sound a note of caution that writing your own "good" numerical codes requires that your have a good understanding of not only the problem you're trying to solve and the mathematics which describe it, but also knowledge of computation, programming and perhaps most importantly, numerical analysis.  I've been working professionally in geocomputing for the last 15 years and it's surprisingly easy to come up with solutions which are plausible but incorrect (sometimes to the point of being worthless) because computers don't treat numbers (particularly large and small numbers in combination) the way mathematics does (math has infinite precision, whereas computers do not). This in turn means that a lot of standard mathematical techniques you learned in school don't transfer well into code. Even some texts which are apparently respectable to the uninitiated are
 widely criticised in computing circles (e.g the Numerical Recipes in Fortran/C/C++/etc series).

So far as selecting modelling tools, my recommendation would be to use off-the-shelf modelling packages where possible - a few mechanics packages have been mentioned in this thread so far.  That way, you're sharing the development cost, which can be significant, with all the other users and this software is much more likely to work properly to boot.  If you do need to roll your own, consider choosing tools in use by other people in your local community so you can get immediate help and ideas.  If that isn't appropriate, any of Matlab, Mathematica or Python will be able to do the job.  Of these, Python is definitely the better programming tool. Python will leave you with a more maintainable solution (read: cheaper in the long run), but you may get something working quicker with one of the other packages.  If you do choose Python, consider some training, either online or in the classroom to get you up and running quickly.  You can complete an online
 Python Fundamentals programming course in a couple of days, which will give you a head start.

I've seen a lot of pretty awful "academic" code in my time (I even wrote some of it way back!), so it would be nice to see people start off on the right foot, saving themselves a lot of time and avoiding misleading themselves and their peers with dodgy results.  I'd like to see many more (all!) scientists be prepared to publish their code - otherwise their results are too hard to reproduce and verify.

Disclosure: I own and run a company, Sixty North, which offers training (online/classroom), consulting and development for geoscience and geospatial software in a variety of languages, including Python. Get in touch off-list if you'd like to know more. And before this turns into an advert.

Regards,

Rob






On 21 August 2013 15:51, Richard Styron <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Hi Matt,

At the risk of setting off a 'which language is better' flame war, I would encourage the use of Python instead of MATLAB.  It's free (as in speech and beer) software, so you don't have to worry at all about licenses, and has a broad and mature set of scientific libraries (based on NumPy, SciPy, and Pandas).  It also has a diverse set of developers working on all sorts of additional functionality, from statistics to mapping to machine learning.

There are a few weakness with respect to MATLAB, the biggest of which is probably that the plotting functions are a bit clunkier, but there are a lot of strengths as well, which stem from the fact that it is a complete general programming language.  Prominently among them are the use of modules/namespaces that allow for much better organization of code; the more experienced user base (MATLAB users often only know MATLAB, while Python users often use other languages as well, so the overall body of corporate knowledge is greater, meaning that you can find lots of help on sites like Stack Overflow); the ease of doing more general programming tasks, such as parsing text files (this was big for me when I was using Python to do things like automatically change variables in configuration files for thermochron modeling programs); and the ancillary packages, particularly the IPython Notebook, which is a browser-based notebook that is really, really nice for
 prototyping and sharing scientific code, very much inspired by the Mathematica and Mathcad notebooks.

A recent discussion of MATLAB vs. Python is here:  https://news.ycombinator.com/item?id=6111727

Here are a bunch of interesting IPython Notebook examples:  https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks


A big problem with Python was that there were so many packages and versions, and it was really hard to make sure that you have versions of everything that worked together well, but in the past couple of years some new Python distributions came out that handle that for you.  There are two main ones, Anaconda (http://continuum.io/) and Enthought Canopy (https://enthought.com/).  I prefer Anaconda, but both are excellent, and free.  There are also some bells and whistles that are free for people with .edu email addresses.

Long story short, I switched to Python after using Matlab for about 2.5 years, and I started writing better code, and doing it more quickly.  Everyone else in my lab (department, really) uses MATLAB and seems to do fine.

Hope this helps,
Richard





On Tue, Aug 20, 2013 at 7:35 PM, Massey, Matthew A <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Thanks for all the advice, everyone! It is all much appreciated. It seems my fate may be with MATLAB, as it's the only active software license that can definitely be confirmed by the university here right now. One plus I see about this, is that I already have Octave on my personal Mac laptop, so going between work and home shouldn't be a huge deal. Hopefully.

Thanks again!

Matt

On Aug 20, 2013, at 12:26 PM, "Dazhi Jiang" <[log in to unmask]<mailto:[log in to unmask]>> wrote:

> Hi Matt,
>
> You may also take a look at PTC's Mathcad 
> (http://www.ptc.com/product/mathcad/). I have used it a lot and find 
> it to be a very powerful mathematics application that can do a lot 
> modeling that a structural geologist wants to do. It is very user 
> friendly. Working in MathCad is like doing math on a piece of paper, 
> truly "what you see is what you get". Model development, simulation, 
> and result visualization can all be in the same environment and the plots are usually ready for publication.
>
> Here are a few recent works that we have done using MathCad (some 
> papers have online MathCad worksheets as supplementary materials), if 
> you want to have an idea what the program can potentially do:
>
> Jiang (2007a,b, JSG, p.189-200 and p. 435-452)
> https://files.acrobat.com/preview/2d0e880a-18f7-45db-95ff-425b9baea252
> https://files.acrobat.com/preview/7dbb610d-1f89-43e2-b632-e28617218348
>
> Kuiper and Jiang (2010, Tectonophysics, p.175-191) 
> https://files.acrobat.com/preview/c8d9ba2c-9383-4ca6-bbdb-e9dfb429fb6b
>
> Li & Jiang 2011.pdf
> https://files.acrobat.com/preview/532ca7d2-d72c-4f2d-90c8-bc5ffe480589
>
> Jiang (2012, Computer & Geosciences, p. 52-61)
> https://files.acrobat.com/preview/87dbdd41-58ee-481d-bd07-5dd9cab078b0
>
> Jiang and Bentley (2012, JGR vol 117, B12201)
> https://files.acrobat.com/preview/f2c3a887-87e4-46eb-a30f-e2648a2a54d7
>
> Jiang (2013, JSG, p.22-34)
> Xiang and Jiang (JSG, in press)
>
> Dazhi Jiang
> Department of Earth Sciences
> Western University
> London, Ontario N6A 5B7
> Canada
> Tel: 519-661-3192<tel:519-661-3192>
> Fax: 519-661-3198<tel:519-661-3198>
> http://www.uwo.ca/earth/people/faculty/jiang.html
>
> -----Original Message-----
> From: Tectonics & structural geology discussion list 
> [mailto:[log in to unmask]<mailto:[log in to unmask]
> UK>] On Behalf Of Massey, Matthew A
> Sent: August-19-13 11:35 PM
> To: [log in to unmask]<mailto:[log in to unmask]>
> Subject: Numerical Modeling Software
>
> Hi All,
>
> I'm delving into the world of numerical modeling (mostly progressive 
> deformation, at this point) and wanted a some advice.  I had 
> originally assumed that most structural geologists (and maybe most 
> geologists?) use MATLAB or Octave, but after talking with several 
> others, I've been informed this may not be entirely true.  So before I 
> begin, I'd like to get an idea of what most people really are using 
> these days, and should a beginner start with something else?  For the 
> second part of that question, some things to keep in mind about 
> myself: (1) I'm definitely not a programmer, nor a mathematician, but 
> I think I can figure a lot of things out with some work;
> (2) at the moment, I plan on using this for modeling the evolution of 
> finite strain magnitudes and orientations during 3D deformations, BUT 
> I'm definitely interested in other future possibilities within the 
> realms of structural geology, petrology, and geochronology.  And one 
> last follow up question - can you recommend some good instructional 
> materials for said software (online tutorials, papers, published textbooks/manuals, etc.)?
>
> Thanks,
>
> Matt
>
>
> ___________________
> Matthew A. Massey
> Department Earth & Environmental Sciences University of Kentucky 
> Lexington, KY 40506-053