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 13, 2023
2 parents 9a53352 + 10b2d61 commit b28389c
Show file tree
Hide file tree
Showing 31 changed files with 450 additions and 170 deletions.
2 changes: 0 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
VERSION major.minor.patch - see src/scripts/version
nemo_start.sh.in Startup for bourne shell
nemo_start.csh.in Startup for C shell


2 changes: 1 addition & 1 deletion docs/man_html/bibcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <H1>NEMO BIBCODE Manual Reference </H1>
is located in NEMO. For some codes that do not have a manual page,
the source code file will be mentioned.
<P>
Created on: Tue Nov 28 20:50:39 EST 2023 by teuben@DL5420(none)<P>
Created on: Thu Dec 7 20:25:15 EST 2023 by teuben@DL5420(none)<P>
<!-- Created by ./make_bibcode.csh - do not edit -->
<DIR COMPACT>
<TABLE BORDER>
Expand Down
12 changes: 9 additions & 3 deletions docs/man_html/ccdfill.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
HTML automatically generated with <A HREF=http://manpages.ubuntu.com/manpages/bionic/man1/rman.1.html>rman</A><br>
<a href='#toc'>Table of Contents</a><p>

<p>
<h2><a name='sect0' href='#toc0'>Name</a></h2>
ccdfill - patch up the holes in an image
<p>
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>ccdfill</b> [parameter=value]

Expand Down Expand Up @@ -89,16 +91,20 @@ <h2><a name='sect4' href='#toc4'>Caveats</a></h2>
bi-linear interpolation is needed. See also <a href='ccdintpol.1.html'><i>ccdintpol(1NEMO)</i></a>
if your irregulaties
are regular enough.
<p>
<h2><a name='sect5' href='#toc5'>See Also</a></h2>
<a href='image.3.html'>image(3NEMO)</a>
, <a href='ccdmath.1.html'>ccdmath(1NEMO)</a>
, <a href='ccdsmooth.1.html'>ccdsmooth(1NEMO)</a>
,
<a href='ccdintpol.1.html'>ccdintpol(1NEMO)</a>

<br>
<pre>https://github.com/dokkum/maskfill
</pre>
<h2><a name='sect6' href='#toc6'>Author</a></h2>
Peter Teuben
<h2><a name='sect7' href='#toc7'>Update History</a></h2>
<p>
<h2><a name='sect7' href='#toc7'>History</a></h2>
<br>
<pre>10-Dec-93<tt> </tt>&nbsp;<tt> </tt>&nbsp;V1.0 Created<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
22-feb-97<tt> </tt>&nbsp;<tt> </tt>&nbsp;V1.1 added bad=<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
Expand All @@ -117,7 +123,7 @@ <h2><a name='sect7' href='#toc7'>Update History</a></h2>
<li><a name='toc4' href='#sect4'>Caveats</a></li>
<li><a name='toc5' href='#sect5'>See Also</a></li>
<li><a name='toc6' href='#sect6'>Author</a></li>
<li><a name='toc7' href='#sect7'>Update History</a></li>
<li><a name='toc7' href='#sect7'>History</a></li>
</ul>
</body>
</html>
116 changes: 60 additions & 56 deletions docs/man_html/hackdens.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h2><a name='sect2' href='#toc2'>Description</a></h2>
<h2><a name='sect3' href='#toc3'>Parameters</a></h2>
The following parameters are recognized in
order; they may be given in any order if the keyword is also given. Use
--help to confirm this man page is up to date.
<b>--help</b> to confirm this man page is up to date.
<dl>

<dt><b>in</b>=<i>in-file</i> </dt>
Expand All @@ -46,8 +46,7 @@ <h2><a name='sect3' href='#toc3'>Parameters</a></h2>
<dt><b>neib</b>=<i>value</i> </dt>
<dd>Number of neighbors used to determine
the local density. The default of 6 is the recommended value by Casertano
&amp; Hut (1985) [default: 6].
<p> </dd>
&amp; Hut (1985) [default: 6]. </dd>

<dt><b>rneib</b>=<i>value</i> </dt>
<dd>Initial radius to search the neighbors.
Expand Down Expand Up @@ -128,60 +127,65 @@ <h2><a name='sect4' href='#toc4'>Notes</a></h2>
<h2><a name='sect5' href='#toc5'>Examples</a></h2>
The following example takes
an N-body snapshot, sort the particles in the order of the distance from
the C.M., and calculate local density. <br>
<pre> snapcenter nbody.dat nbody.centered
snapsort nbody.centered nbody.sorted
hackdens nbody.sorted nbody.density
</pre>One can also weight the particles by its potential to some power. For this
we create a Plummer sphere, without centering, and compute the center in
two ways: <br>
<pre> mkplummer - 100 zerocm=f | snapsort - - rank=r &gt; p.dat
snapcenter p.dat . report=t
hackdens p.dat - | snapcenter - . weight=dens report=t
hackforce p.dat - | snapcenter - . weight="-phi*phi*phi" report=t
hackforce p.dat - | snapcenter - . weight="phi*phi*phi*phi" report=t

</pre>Note that in this case the Plummer sphere should have the correct mathematical
the C.M., and calculate local density.
<p> snapcenter nbody.dat nbody.centered<br>
snapsort nbody.centered nbody.sorted <br>
hackdens nbody.sorted nbody.density<br>

<p> One can also weight the particles by its potential to some power. For
this we create a Plummer sphere, without centering, and compute the center
in two ways:
<p> mkplummer - 100 zerocm=f | snapsort - - rank=r &gt; p.dat<br>
snapcenter p.dat . report=t<br>
hackdens p.dat - | snapcenter - . weight=dens report=t<br>
hackforce p.dat - | snapcenter - . weight="-phi*phi*phi" report=t<br>
hackforce p.dat - | snapcenter - . weight="phi*phi*phi*phi" report=t<br>
<br>
Note that in this case the Plummer sphere should have the correct mathematical
center, and not <i>centered</i>. This snippet of code is expanded in a script $NEMO/scripts/csh/centering.sh,
in which these different methods can also be applied to different models,
as expanded in the following table. <br>
<pre> nbody=100 models: Plummer King1 King3 King5 DeVauc
-------------------------------------------------------------
snapcenter on m: 0.102 0.029* 0.030* 0.033 0.299
snapcenter on dens: 0.060 0.039 0.036 0.030 0.030*
snapcenter on phi: 0.053
snapcenter on phi^2: 0.050*
snapcenter on phi^3: 0.052 0.032 0.030 0.026* 0.035
snapcenter on phi^4: 0.054 0.034 0.032 0.027 0.031
snapcenterp: 0.080
snapmnmx on min phi: 0.122
snapmnmx on m 50% phi: 0.058
snapmnmx on m 33% phi: 0.063 0.053
snapmnmx on m 25% phi: 0.067
rockstart on m: 0.082:
A (*) denotes the best method for that model.
</pre>Although for a Plummer sphere the best method is more than twice as good
than the worst method, this does not apply to other models. <p>
as expanded in the following table.
<p> nbody=100 models: Plummer
King1 King3 King5 DeVauc<br>
-------------------------------------------------------------<br>
snapcenter on m: 0.102 0.029* 0.030* 0.033 0.299<br>
snapcenter on dens: 0.060 0.039 0.036 0.030 0.030*<br>
snapcenter on phi: 0.053<br>
snapcenter on phi^2: 0.050*<br>
snapcenter on phi^3: 0.052 0.032 0.030 0.026* 0.035<br>
snapcenter on phi^4: 0.054 0.034 0.032 0.027 0.031<br>
snapcenterp: 0.080<br>
snapmnmx on min phi: 0.122<br>
snapmnmx on m 50% phi: 0.058<br>
snapmnmx on m 33% phi: 0.063 0.053<br>
snapmnmx on m 25% phi: 0.067<br>
rockstart on m: 0.082:<br>

<p> A (*) denotes the best method for that model.
<p>
<p> </pre>Although for a Plummer
sphere the best method is more than twice as good than the worst method,
this does not apply to other models. <p>
<a href='density.1falcON.html'><i>density(1falcON)</i></a>

is considerable faster, about twice with their K=32 default. <br>
<pre>mkplummer - 100000 |is considerable faster, about twice with their K=32 default.

snapscale - - mscale=10 |about twice with their K=32 default.
snapsort - - |about twice with their K=32 default.
density - - give=mxvr |about twice with their K=32 default.
snapshell - &rsquo;10**[-4:4:0.1]&rsquo; dens |about twice with their K=32 default.
tabmath - - &rsquo;log(%1),log(%4)&rsquo; all |
tabplot - 1 2 -4 4 -14 2 line=1,1 point=2,0.1
vs.
mkplummer - 100000 |line=1,1 point=2,0.1
snapscale - - mscale=10 |
snapsort - - |
hackdens - - |
snapshell - &rsquo;10**[-4:4:0.1]&rsquo; dens |
tabmath - - &rsquo;log(%1),log(%4)&rsquo; all |
tabplot - 1 2 -4 4 -14 2 line=1,1 point=2,0.1
</pre>
is considerable faster,
about twice with their K=32 default.
<p> mkplummer - 100000 |\ snapscale - -
mscale=10 |\<br>
snapsort - - |\<br>
density - - give=mxvr |\<br>
snapshell - &rsquo;10**[-4:4:0.1]&rsquo; dens |\<br>
tabmath - - &rsquo;log(%1),log(%4)&rsquo; all |\<br>
tabplot - 1 2 -4 4 -14 2 line=1,1 point=2,0.1<br>

<p> vs.
<p> mkplummer - 100000 |\ snapscale - - mscale=10 |\<br>
snapsort - - |\<br>
hackdens - - |\<br>
snapshell - &rsquo;10**[-4:4:0.1]&rsquo; dens |\<br>
tabmath - - &rsquo;log(%1),log(%4)&rsquo; all |\<br>
tabplot - 1 2 -4 4 -14 2 line=1,1 point=2,0.1<br>

<p>
<p>
<h2><a name='sect6' href='#toc6'>Bugs</a></h2>
The local density is calculated using (neib-1)th neighbor. Calculation
Expand Down Expand Up @@ -233,11 +237,11 @@ <h2><a name='sect11' href='#toc11'>History</a></h2>
6-jul-89<tt> </tt>&nbsp;<tt> </tt>&nbsp;doc updated?<tt> </tt>&nbsp;<tt> </tt>&nbsp;Jun
23-oct-90<tt> </tt>&nbsp;<tt> </tt>&nbsp;doc updated<tt> </tt>&nbsp;<tt> </tt>&nbsp;Peter
18-jul-92<tt> </tt>&nbsp;<tt> </tt>&nbsp;printf -&gt; dprintf to make it pipable<tt> </tt>&nbsp;<tt> </tt>&nbsp;Peter
24-may-02<tt> </tt>&nbsp;<tt> </tt>&nbsp;fixed running out of bits for large-N systems<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
24-may-02<tt> </tt>&nbsp;<tt> </tt>&nbsp;fixed running out of bits for large-N <tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
11-aug-2022<tt> </tt>&nbsp;<tt> </tt>&nbsp;added example hackforce vs. hackdens<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
21-sep-2023<tt> </tt>&nbsp;<tt> </tt>&nbsp;added direct=<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
11-oct-2023<tt> </tt>&nbsp;<tt> </tt>&nbsp;V3.0 added norm=1 as a new default<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
12-oct-2023<tt> </tt>&nbsp;<tt> </tt>&nbsp;V3.0 - proper mass scaling as well as nbody scaling<tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
12-oct-2023<tt> </tt>&nbsp;<tt> </tt>&nbsp;V3.0 proper mass/nbody scaling <tt> </tt>&nbsp;<tt> </tt>&nbsp;PJT
</pre><p>

<hr><p>
Expand Down
105 changes: 105 additions & 0 deletions docs/man_html/qtrun.l.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>QTRUN(1) manual page</title>
</head>
<body bgcolor='white'>
HTML automatically generated with <A HREF=http://manpages.ubuntu.com/manpages/bionic/man1/rman.1.html>rman</A><br>
<a href='#toc'>Table of Contents</a><p>

<p>
<h2><a name='sect0' href='#toc0'>Name</a></h2>
qtrun - automatic GUI builder and frontend to run shell scripts or

<p>programs
<p>
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>qtrun</b> [-option value...] <i>script</i>
<p>
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<i>qtrun</i> presents
an interactive graphical user interface to a shell <i>script</i> or program that
conforms to a &lsquo;&lsquo;key=val&rsquo;&rsquo; interface. <p>
It is based off <a href='tkrun.l.html'><i>tkrun(lNEMO)</i></a>
, and supposed
to be mostly compatible with it. A few format enhancements were proposed
for qtrun. See "TKRUN V2" below.
<p>
<h2><a name='sect3' href='#toc3'>Options</a></h2>
The following options parameters
are currently recognized.
<dl>

<dt><b>-h, --help</b> </dt>
<dd>help </dd>

<dt><b>-d, --debug</b> </dt>
<dd>debug </dd>

<dt><b>-v, --version</b> </dt>
<dd>show version

<p> </dd>
</dl>

<h2><a name='sect4' href='#toc4'>Tkrun V2</a></h2>
In version 2 of this format we have implemented this via this
new python based qtrun Here the format can be run via bash, csh and python
in the <br>
<pre> key=val # help #&gt; GUI
</pre>specification, but the client software (bash/csh/python/....) is responsible
to properly parse the <i>key=val</i> command line arguments. Here are the proposed

<p>GUI tags with generic key=val/help sections
<p>
<p> in=foo # input
file #&gt; IFILE<br>
out=bar # output file #&gt; OFILE<br>
text=hello # some text #&gt; ENTRY<br>
mode=gauss # the mode #&gt; RADIO gauss,newton,leibniz<br>
stats=mean # what to show #&gt; CHECK sum,mean,sigma,skewness,kurtosis<br>
n=3.141592 # the n value #&gt; SCALE 0:10:0.01<br>
k=3.141592 # k, use n #&gt; LINK n<br>

<p>
<p>
<h2><a name='sect5' href='#toc5'>See Also</a></h2>
<a href='wish.1.html'>wish(1)</a>
, <a href='zenity.1.html'>zenity(1)</a>
, <a href='qtun.1.html'>qtun(1NEMO)</a>
<br>
<pre>https://github.com/teuben/agui - development version
</pre>
<p>
<h2><a name='sect6' href='#toc6'>Author</a></h2>
Kylie Gong, Peter Teuben
<p>
<h2><a name='sect7' href='#toc7'>Files</a></h2>
<br>
<pre>~/.tkrunrc<tt> </tt>&nbsp;<tt> </tt>&nbsp;(optional) global configuration file
$run.key<tt> </tt>&nbsp;<tt> </tt>&nbsp;keyword file in which key=val pairs are maintained
$NEMO/scripts/templates <tt> </tt>&nbsp;<tt> </tt>&nbsp;example templates of key=val parsing
</pre>
<p>
<h2><a name='sect8' href='#toc8'>History</a></h2>
<br>
<pre>aug-2023<tt> </tt>&nbsp;<tt> </tt>&nbsp;experimental version released<tt> </tt>&nbsp;<tt> </tt>&nbsp;KG/PJT
</pre><p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Options</a></li>
<li><a name='toc4' href='#sect4'>Tkrun V2</a></li>
<li><a name='toc5' href='#sect5'>See Also</a></li>
<li><a name='toc6' href='#sect6'>Author</a></li>
<li><a name='toc7' href='#sect7'>Files</a></li>
<li><a name='toc8' href='#sect8'>History</a></li>
</ul>
</body>
</html>
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
2 changes: 2 additions & 0 deletions docs/source/filestr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,5 @@ Rotation Curves Fitting Functions, except they are peculiar to the
result of a projected circular streaming model. The program
*rotcurshape(1NEMO)* is the only program that uses these functions, the
manual page has a lot more details.

.. include:: fits.rst
5 changes: 4 additions & 1 deletion docs/source/fits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ FITS


FITS is one of the earliest data formats used in (observational) astronomy, and
NEMO handles some of the conversions from and to FITS.
NEMO handles some of the conversions from and to FITS, as well as some
FITS utilities.

.. 20 ccdfits* 504 fitsccd* 588 fitsglue* 4 fitsmerge* 576 fitstab* 596 snapfits*
.. 576 fits8to16* 4 fitsedit* 580 fitshead* 580 fitssplit* 584 scanfits* 504 tabfits*
For the SDFITS extension there is limited support in `sdinfo` and `scanfits`.
9 changes: 6 additions & 3 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Glossary
ccd
Synonymous for image; most programs in NEMO which handle
images start or end with ``ccd``, e.g.
``ccdfits``, ``fitsccd``, ``ccdmath``.
``ccdfits``, ``fitsccd``, ``ccdmath``. Most programs handle
1D, 2D and 3D "ccd" images.

ECSV
(Enhanced Character Separated Values) a popular
Expand All @@ -27,6 +28,7 @@ Glossary

falcon
A subpackage in NEMO that hosts the gyrfalcON code.
See ``$NEMO/usr/dehnen/falcON``.

fie
Most expressions that you give to
Expand All @@ -47,7 +49,8 @@ Glossary

GIPSY
The Groningen Image Processing System. A number of concepts in NEMO, and
a few routines, have been taken liberally from :term:`GIPSY`.
a few routines, have been taken liberally from :term:`GIPSY`. See also
https://www.astro.rug.nl/~gipsy/


history
Expand Down Expand Up @@ -129,7 +132,7 @@ Glossary
four data types commonly used in NEMO.

voxel
See pixel
A three dimensional pixel. See also pixel

yapp
"Yet Another Plotting Package", the library
Expand Down
Loading

0 comments on commit b28389c

Please sign in to comment.