Skip to content

Commit 2fff895

Browse files
authored
Correction typos tutorials
1 parent a08cf76 commit 2fff895

2 files changed

Lines changed: 28 additions & 16 deletions

File tree

Nemesis_and_the_Sun.ipynb

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"====================\n",
99
"\n",
1010
"AMUSE is composed of domain-specific modules (i.e. the physics modules), which are often written in some native compiled language, and data-handling.\n",
11-
"the latter tends to be confusing for novel users.\n",
11+
"The latter tends to be confusing for novel users.\n",
1212
"Data representation in AMUSE is often replicated.\n",
13-
"So can there be a parameter *mass* to indicate a property of a star in a stellar-evolution code, in a gravitational dynamics code and in your user script. These three parameters *mass* can mean the same, or they can have a different meaning. This makes running amuse somewhat confusing at times.\n",
13+
"So there can be a parameter *mass* to indicate a property of a star in a stellar-evolution code, in a gravitational dynamics code and in your user script. These three parameters *mass* can mean the same, or they can have a different meaning. This makes running amuse somewhat confusing at times.\n",
1414
"Here we show how to formally separate these data streams.\n",
1515
"\n",
1616
"But first we will enter the realm of modules."
@@ -32,7 +32,7 @@
3232
"cell_type": "markdown",
3333
"metadata": {},
3434
"source": [
35-
"We now like to generate the Solar system, as it was observed on April 5th 2063 using the [JPL emphemeris](https://ssd.jpl.nasa.gov/horizons.cgi#top).\n",
35+
"We now want to generate the Solar system, as it was observed on April 5th 2063 using the [JPL emphemeris](https://ssd.jpl.nasa.gov/horizons.cgi#top).\n",
3636
"Let's start with the inner most planet, Mercury, in the Sun's barycenter, which gives the following output:\n",
3737
"\n",
3838
"*******************************************************************************\n",
@@ -47,9 +47,21 @@
4747
},
4848
{
4949
"cell_type": "code",
50-
"execution_count": 2,
50+
"execution_count": 1,
5151
"metadata": {},
52-
"outputs": [],
52+
"outputs": [
53+
{
54+
"ename": "NameError",
55+
"evalue": "name 'Particles' is not defined",
56+
"output_type": "error",
57+
"traceback": [
58+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
59+
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
60+
"\u001b[0;32m/tmp/ipykernel_26547/1076903443.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mSun\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mParticles\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0mSun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmass\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m1\u001b[0m \u001b[0;34m|\u001b[0m \u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mMSun\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mSun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mposition\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m|\u001b[0m \u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkm\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mSun\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvelocity\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m|\u001b[0m \u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mkm\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0munits\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0ms\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mplanets\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mParticles\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m8\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
61+
"\u001b[0;31mNameError\u001b[0m: name 'Particles' is not defined"
62+
]
63+
}
64+
],
5365
"source": [
5466
"Sun = Particles(1)\n",
5567
"Sun.mass = 1 | units.MSun\n",
@@ -71,7 +83,7 @@
7183
"source": [
7284
"And continue doing this for the other 7 planets.\n",
7385
"Then add the Sun and we have the Solar system's particle set.\n",
74-
"It would be easier if there is a handy routine with the same effect, in particular because of frequently will be using the Solar system as some sort of template for a rather typical planetary system, or for specifically sutdying this planetary system. We therefore have a handy routine that gives allows us to initialize the Solar system."
86+
"It would be easier if there is a handy routine with the same effect, in particular because we will frequently be using the Solar system as some sort of template for a rather typical planetary system, or for specifically sutdying this planetary system. We therefore have a handy routine that allows us to initialize the Solar system."
7587
]
7688
},
7789
{
@@ -115,7 +127,7 @@
115127
"We adopted the module `ext.new_solar_system` to generate a ready-made solar system. You can also make a solar system that includes it's moons. For this you will have to use the routine \n",
116128
"'new_lunar_system', which is a module from the 'amuse.ic.solar_system_moons' package.\n",
117129
"\n",
118-
"Now, plot the positions of the sun and planets in the orbital plane."
130+
"Now you can plot the positions of the sun and planets in the orbital plane."
119131
]
120132
},
121133
{
@@ -195,9 +207,9 @@
195207
"cell_type": "markdown",
196208
"metadata": {},
197209
"source": [
198-
"And, equally wise they will have different velocity.\n",
210+
"And, equally they will have different velocity.\n",
199211
"\n",
200-
"however, we would like to adot these binary parameters for the Sun-Nemesis binary system. For this, we first move the entire Solar system to the Sun barycenter, move it to Nemesis' companion and add Nemesis."
212+
"However, we would like to adot these binary parameters for the Sun-Nemesis binary system. For this, we first move the entire Solar system to the Sun barycenter, move it to Nemesis' companion and add Nemesis."
201213
]
202214
},
203215
{
@@ -244,7 +256,7 @@
244256
"source": [
245257
"You have created a hypothetical planetary system with the Sun, 8 planets and 1 dwarf planet (mimiking the Solar system), and a secondary star (Nemesis) in a wide and elliptic orbit.\n",
246258
"\n",
247-
"Assignmnets and questions:\n",
259+
"Assignments and questions:\n",
248260
"---------------\n",
249261
"\n",
250262
"### Assignment 1:\n",
@@ -274,7 +286,7 @@
274286
],
275287
"metadata": {
276288
"kernelspec": {
277-
"display_name": "Python 3",
289+
"display_name": "Python 3 (ipykernel)",
278290
"language": "python",
279291
"name": "python3"
280292
},
@@ -288,7 +300,7 @@
288300
"name": "python",
289301
"nbconvert_exporter": "python",
290302
"pygments_lexer": "ipython3",
291-
"version": "3.9.7"
303+
"version": "3.8.10"
292304
}
293305
},
294306
"nbformat": 4,

running_an_Nbody_code.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"### Converter\n",
100100
"N-body codes operate using special dimensionless N-body units (where the gravitational constant is set to unity). In order to make the code understand SI units, we must pass it a unit converter. This contains two quantities in the relevant unit system, from which AMUSE derives the proper unit conversion. Best practice is to keep those quantities on the order of the system's scale (e.g. the total mass and the radius of the outermost planet in a planetary system) to ensure numerical stability.\n",
101101
"\n",
102-
"Also see the notebook tutorial '03-generic_units.ipynb' on the importance of converters in AMUSE. "
102+
"Also see the documentation on the importance of [converters](https://amuse.readthedocs.io/en/latest/reference/quantities_and_units.html?highlight=generic%20units#module-amuse.units.generic_unit_system) in AMUSE. \n"
103103
]
104104
},
105105
{
@@ -205,7 +205,7 @@
205205
"\n",
206206
"### Question 3:\n",
207207
"One of the parameters in the binary is the *hardness*.\n",
208-
"What is the hardness of the binary from your last run, and explain what is meant with this parameter.\n",
208+
"What is the hardness of the binary from your last run? and explain what is meant with this parameter.\n",
209209
"\n",
210210
"### Assignment 3:\n",
211211
"Rewrite the script in such a way that the event loop over time continues indefinitely, but that the code stops as soon as the first binary is detected.\n",
@@ -242,7 +242,7 @@
242242
],
243243
"metadata": {
244244
"kernelspec": {
245-
"display_name": "Python 3",
245+
"display_name": "Python 3 (ipykernel)",
246246
"language": "python",
247247
"name": "python3"
248248
},
@@ -256,7 +256,7 @@
256256
"name": "python",
257257
"nbconvert_exporter": "python",
258258
"pygments_lexer": "ipython3",
259-
"version": "3.9.7"
259+
"version": "3.8.10"
260260
}
261261
},
262262
"nbformat": 4,

0 commit comments

Comments
 (0)