GithubHelp home page GithubHelp logo

rlzhang1310 / nemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teuben/nemo

0.0 0.0 0.0 41.91 MB

a Stellar Dynamics Toolbox (Not Everybody Must Observe)

Home Page: https://astronemo.readthedocs.io

License: GNU General Public License v2.0

Shell 2.94% Ruby 0.01% C++ 21.02% Python 0.43% Perl 0.36% C 52.57% Fortran 14.68% Tcl 0.06% Assembly 0.27% Awk 0.01% Forth 0.09% Pascal 0.01% TeX 3.11% Makefile 2.06% HTML 0.44% PostScript 1.90% QMake 0.03% AMPL 0.01% Batchfile 0.02% DIGITAL Command Language 0.01%

nemo's Introduction

NEMO is a toolbox for stellar dynamics, particle simulations, stellar orbits, image processing and tabular data manipulation. Documentation is maintained in the github pages, https://teuben.github.io/nemo

History

This is the 4th major release of NEMO, and although data are compatible with earlier releases, old source code may need to be tweaked a bit to compile and link in the newer releases. Some compatibility with ZENO is also advertised. A brief history of NEMO:

  • NEMO V1: IAS release (Barnes, Hut & Teuben, 1987)
  • NEMO V2: UMD release (Teuben, 1994)
  • NEMO V3: UMD release (Teuben, 2001) in CVS, with autoconf support and hooks into manybody.org modules starlab and partiview
  • NEMO V4: UMD/ESO release (2017) now maintained in github

A related package, ZENO, was spun off NEMO V1, and is maintained by Josh Barnes. Other packages that geneologically came after NEMO are StarLab, ACS and AMUSE (see also https://ascl.net for code references):

 NEMO:      ascl:1010.051
 ZENO:      ascl:1102.027 (normally installed in $NEMO/usr/zeno)
 STARLAB:   ascl:1010.076
 ACS:       https://artcompsci.org
 AMUSE:     ascl:1107.007

Optional Packages

Packages we optionally use (sometimes also installed in $NEMO/opt with source code in $NEMO/local):

 PGPLOT:    ascl:1103.002
 CFITSIO:   ascl:1010.001
 WCSLIB:    ascl:1108.003
 glnemo2:   ascl:1110.008
 gyrfalcON: ascl:1402.031 (included with NEMO)
 HDF4
 HDF5       https://www.hdfgroup.org
 netcdf4
 gsl
 plplot
 unsio
 uns_project
 wcstools

Tools you will need to have pre-installed: the C/C++/Fortran compilers, (t)csh, and git. For graphics it's probably useful to have pgplot, but the default ps driver works fine just to get started quickly.

The files in $NEMO/src/scripts/linux describe the actual package names for different linux distros that should lead to success.

Installation

There are a few different ways to install NEMO, here is a basic example that works most of the time on most Linux distros (assuming you have the preconditions):

     git clone https://github.com/teuben/nemo
     cd nemo
     ./configure --with-yapp=pgplot
     make build check bench5
     source nemo_start.sh

If you plan to modify code and submit pull request, the github CLI is now recommended, though you can of course also clone the upstream manually (see also CONTRIBUTING.md):

     gh repo fork https://github.com/teuben/nemo

On the most recent apple controlled hardware, with SIP enabled, you're in for a rude awakening. I use brew, and assuming you have gcc-10 (and related) and pgplot installed, this should work (there may be other ways to install tools on a mac, but don't get me started):

     git clone https://github.com/teuben/nemo
     cd nemo
     CC=gcc-10 CXX=g++-10 F77=gfortran-10 ./configure --disable-shared --with-yapp=pgplot
     make build check bench5
     source nemo_start.sh

After installaton, rebuilding NEMO to ensure you have all updates can be done as follows:

     cd $NEMO
     git pull
     make rebuild

python

There is now a small python component to NEMO, in the nemopy module.

     cd $NEMO
     pip install -e .

but this will depend on the details of how your python environment exists (virtual, conda etc.). We leave this to the user.

Examples

If you want to quickly see something work, here are the commands to make a classic 1911 Plummer sphere of just 10 particles, print the positions, plot the positions and view the contents of its binary file:

     mkplummer p10.dat 10
     snapprint p10.dat
     snapplot p10.dat
     tsf p10.dat

and here is an example of creating the 4 major data objects on the fly in NEMO (table, snapshot, image, orbit), showing off the command line interface and use of unix pipes with a dash denoting the piped file:

     tabgen -  | tabplot -
     mkplummer - 100 | snapplot - 
     ccdgen out=- object=gauss spar=1,20 size=128 | ccdplot - 
     mkorbit - 0 1 0  0.4 0 0 potname=plummer | orbint - - nsteps=1000 dt=0.05 | orbplot - 

There are more examples of scripts and figures in https://teuben.github.io/nemo/examples/ and an example ipython notebook is shown here https://github.com/teuben/nemo/blob/master/nemo_start_example.ipynb for something completely different.

Documentation and Help

There are several additional entry points if you are starting out with NEMO:

Citation

Please use the following citation if you use NEMO in your work

 @INPROCEEDINGS{1995ASPC...77..398T,
        author = {{Teuben}, P.},
         title = "{The Stellar Dynamics Toolbox NEMO}",
     booktitle = {Astronomical Data Analysis Software and Systems IV},
          year = 1995,
        editor = {{Shaw}, R.~A. and {Payne}, H.~E. and {Hayes}, J.~J.~E.},
        series = {Astronomical Society of the Pacific Conference Series},
        volume = {77},
         month = jan,
         pages = {398},
        adsurl = {https://ui.adsabs.harvard.edu/abs/1995ASPC...77..398T},
       adsnote = {Provided by the SAO/NASA Astrophysics Data System}
 }

A Real Bar

nemo's People

Contributors

adrn avatar dchoi98 avatar dhaliwalg avatar jcldc avatar jlammers0 avatar maxtano avatar parkertewell avatar psanth avatar rlzhang1310 avatar teuben avatar waltr avatar yzfu0426 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.