Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/teuben/nemo
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Dec 8, 2023
2 parents f206835 + c013798 commit 60f4d7f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 28 deletions.
6 changes: 3 additions & 3 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ on your CPU and test your patience and integrator.
These models are produced in so-called RMS-units in which the
gravitational constant :math:`G=1`, the total mass :math:`M=1`, and binding energy
:math:`E=-1/2`.
In case you would like virial units
In case you would like virial units (also known as N-body units)
(see also:
Heggie & Mathieu, :math:`E=-1/4`,
in: *The use of supercomputers in stellar
Expand Down Expand Up @@ -443,15 +443,15 @@ then passed on for a quick and dirty plot (shown below).
Handling large datasets
~~~~~~~~~~~~~~~~~~~~~~~

One of NEMOs weaknesses is also it's strong point: programs must
One of NEMOs weaknesses is arguably also its strong point: programs must
generally be able to fit all their data in (virtual) memory.
Although programs usually free memory associated with data
that is not needed anymore, there is a very clear maximum
to the number of particles it can handle in a snapshot. By
default\footnote{one can recompile NEMO in single precision and define
{\tt body.h} with less wastefull members}
a particle takes up about 100 bytes, which limits the size of a
snapshots on workstations.
snapshots.

It may happen that your data was generated on a machine which had
a lot more memory
Expand Down
19 changes: 12 additions & 7 deletions docs/source/image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,34 @@ There are a few programs with which images can be initialized:
double Dx 1.00000
double Dy 1.00000
double Dz 1.00000
double Xrefpix 0.00000
double Yrefpix 0.00000
double Zrefpix 0.00000
double MapMin -4.00000
double MapMax 0.00000
int BeamType 0
double Beamx 0.00000
double Beamy 0.00000
double Beamz 0.00000
double Restfreq 0.00000
double VLSR 0.00000
double Time 0.00000
char Storage[5] "CDef"
int Axis 1
tes
set Map
double MapValues[2][4] -4.00000 -3.00000 -2.00000 -1.00000
-3.00000 -2.00000 -1.00000 0.00000
double MapValues[2][4] 0.00000 1.00000 2.00000 3.00000 1.00000
2.00000 3.00000 4.00000
tes
tes
% ccdprint ccd1 x= y= label=x,y
Y\X 0 1
3 -1 0
2 -2 -1
1 -3 -2
0 -4 -3
3 3 4
2 2 3
1 1 2
0 0 1
- **snapgrid** converts a snapshot to an image.

Expand Down
36 changes: 18 additions & 18 deletions docs/source/orbit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ although 3D orbits can be computed the number of utilities to
analyze them is rather limited.

Orbits are normally stored in datafile (see also
{\it orbit(5NEMO)}), and a close conceptual relationship exists
between a (single-particle type) {\bf snapshot} and an {\bf orbit}:
*orbit(5NEMO)*), and a close conceptual relationship exists
between a (single-particle type) **snapshot** and an **orbit**:
an orbit is an ordered series of phase-space coordinates
whereas a snapshot is a series of particles with no particular
order, but all at the same time.
Expand All @@ -20,7 +20,7 @@ the remainder of this section that you have familiarized yourself with
how to supply potentials to orbit integrator programs. They all share
the same triple ``potname=, potpars=, potfile=`` keyword
interface, as described in Section \ref{s:potential}. Many
examples of the tricky {\tt potpars=} keyword are given in Appendix
examples of the tricky **potpars=** keyword are given in Appendix
\ref{a:potential}.

Initializing
Expand Down Expand Up @@ -76,24 +76,24 @@ with no associated potential.
- **stoo** is a program that can take a particle position from
a snapshot, and turn it into an orbit. For example, sampling some
initial conditions from the positions of stars in a Plummer sphere,
we could use the following small C-shell code to find some
we could use the following small (bash) shell code to find some
statistical properties of this selected set of
orbits\footnote{For the careful reader:
{\tt mkplummer} and {\tt potname=plummer} actually
**mkplummer** and **potname=plummer** actually
have different units, and as such this experiment is not
properly set up.}

.. code-block::
mkplummer out=p100 nbody=p100
foreach i (`nemoinp 0:100:10`)
for i in $(nemoinp 0:100:10); do
stoo in=p100 out=orb$i ibody=$i
orbint orb$i orb$i.out 10000 0.01 10000 potname=plummer
orbstat orb$i.out
end
done
The reverse program, {\tt otos} turns an orbit into a snapshot, and
The reverse program, **otos** turns an orbit into a snapshot, and
may come in handy since the snapshot package has far more advanced
analysis programs.

Expand All @@ -103,7 +103,7 @@ Integration

- **orbint** integrates orbits from given initial conditions. If the
input orbit has more than 1 step, the last step is taken as the
initial conditions. Although the {\tt potname=, potpars=, potfile=}
initial conditions. Although the **potname=, potpars=, potfile=**
keywords can be given, if the input orbit contains...

.. caption{Sample orbit 1 ({\tt orb1.out})}
Expand All @@ -116,24 +116,24 @@ Integration


- **henyey** also finds periodic orbits, but uses Henyey's
method\footnote{see also van Albada \& Sanders, (1982, MNRAS, 201, 303)}.
method\footnote{see also van Albada & Sanders, (1982, MNRAS, 201, 303)}.
This program has however not been released to the public version of
NEMO, and in fact it seem the source code was lost.
NEMO, and in fact it seems the source code was lost.


Display
~~~~~~~


- **orbplot** is the only orbit plotting program we currently have.
For more sophisticated display {\tt tabplot} and/or
For more sophisticated display **tabplot** and/or
{\tt snapplot} would have to be used after transforming the data.
Also {\tt snapplot} uses the powerful {\it bodytrans} expression
Also {\tt snapplot} uses the powerful *bodytrans* expression
parser to plot arbitrary
body related expressions, although {\tt orbplot} can
handle both {\tt x, y, z} and {\tt vx, vy, vz} for the
{\tt xvar=} and {\tt yvar=} keywords. An example of the output of
{\tt orbplot} is given in Figure \ref{f:orbit1}.
body related expressions, although **orbplot** can
handle both **x, y, z** and **vx, vy, vz** for the
**xvar=** and **yvar=** keywords. An example of the output of
**orbplot** is given in Figure \ref{f:orbit1}.


Analysis
Expand Down Expand Up @@ -211,7 +211,7 @@ will plot either a Y-VY or X-VX surface of section.

- **otos** transforms an orbit back into a snapshot, thereby giving you
the much richer set of analysis tools that are available for
{\it snapshot}'s.
**snapshot**s.


Expand Down

0 comments on commit 60f4d7f

Please sign in to comment.