You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, if you don't want to use git, you can download the current master branch from https://github.com/geodynamics/burnman/archive/master.zip.
52
52
2. Install using apt by opening a terminal window and entering
Alternatively, if you don't want to use git, you can download the current master branch from https://github.com/geodynamics/burnman/archive/master.zip.
74
74
2. get Xcode
75
75
3. If you don't have Python yet, download it (for free) from
76
-
python.org/download . Make sure to use either Python 2.7 or Python 3.4+.
76
+
python.org/download . Make sure to use a modern version of Python (3.6+).
77
77
To check your version of python, type the following in a
78
-
terminal:
78
+
terminal:
79
79
python --version
80
80
4. Install the latest Numpy version: http://sourceforge.net/projects/numpy/files/NumPy/
81
81
5. Install the latest Scipy at http://sourceforge.net/projects/scipy/files/
@@ -95,21 +95,23 @@ Problems you might run into:
95
95
matching architecture in universal wrapper`. You can check if your python
96
96
distribution is 32 or 64 bit with the following lines:
97
97
```
98
-
python
98
+
python
99
99
>>> import platform
100
100
>>> print platform.architecture()
101
101
```
102
102
103
103
## Install under Windows
104
104
105
105
1. Clone this repository using git (or download it). git can be downloaded from here: https://gitforwindows.org/. There are a number of different ways to use git as installed under windows (command-line, gui). Use your favoured method to clone the burnman repository: https://github.com/geodynamics/burnman.git. Alternatively, if you don't want to use git, you can download the current master branch from https://github.com/geodynamics/burnman/archive/master.zip.
106
-
107
-
To get Python 2.7.x (for example) running under Windows:
108
106
109
-
2. Download Python from http://www.python.org/ and install the version at C:\Python27\; the 32-bit version is recommended
110
-
3. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy, download "numpy-MKL-1.6.2.win32-py2.7.exe" and install
111
-
4. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy, download "scipy-0.10.1.win32-py2.7.exe" and install
112
-
5. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib, download "matplotlib-1.1.1.win32-py2.7.exe" and install
107
+
To get Python running under Windows:
108
+
109
+
1. Download Python from http://www.python.org/ and install
110
+
2. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy, download and install
111
+
3. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy, download and install
112
+
3. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#sympy, download and install
113
+
4. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib, download and install
114
+
5. Download BurnMan from github (https://github.com/geodynamics/burnman)
113
115
6. Open Python Shell (IDLE Python GUI)
114
116
7. File -- Open -- find one of the example files
115
117
8. Run the module (or press F5)
@@ -126,7 +128,7 @@ possible as well as each of the helpers involved with each example.
126
128
your own).
127
129
2. example_seismic.py (Explains the various seismic models included in
128
130
BurnMan)
129
-
3. example_composition.py (Explains how to create different mineralogical models)
131
+
3. example_composition.py (Explains how to create different mineralogical models)
130
132
4. example_user_input_materials.py (Explains how to create user-defined
131
133
minerals)
132
134
5. example_averaging.py (Explains how moduli and density are averaged to
@@ -136,18 +138,18 @@ possible as well as each of the helpers involved with each example.
136
138
## About scripting in Python
137
139
138
140
Burnman has the advantage of being adaptable and extendable in easy scripts. The downside might be that we do not
139
-
provide a graphical user interface. For those of you who are not familiar with python, we suspect it will still be
140
-
relatively easy to adapt the scripts for computations and plotting.
141
+
provide a graphical user interface. For those of you who are not familiar with python, we suspect it will still be
142
+
relatively easy to adapt the scripts for computations and plotting.
141
143
Here are some specific features and pitfalls on Python:
142
144
143
-
* Python uses specific indentation. A script might fail if a code block is not indented correctly. We use four spaces and no tabs,
145
+
* Python uses specific indentation. A script might fail if a code block is not indented correctly. We use four spaces and no tabs,
144
146
mixing these can give trouble.
145
147
* Indices require square brackets and function or method calls parentheses (mainly different from Matlab).
146
148
* The first index of an array is 0 (e.g. x[0])
147
-
* Put dots after numbers to make them floats instead of integers (e.g. 5/3 will give 1 (Python 2.x rounds downward), while 5./3. will give 1.66666666667)
149
+
* Put dots after numbers to make them floats instead of integers (e.g. 5/3 will give 1 (Python 3.x rounds downward), while 5./3. will give 1.66666666667)
148
150
149
151
150
-
## Examples
152
+
## Examples
151
153
152
154
example_beginner
153
155
----------------
@@ -477,4 +479,3 @@ Here we show an example that does this, using the planet Mercury as motivation.
0 commit comments