Giter Site home page Giter Site logo

ghost's Introduction

GHOST: Gadget Hdf5 Output Slice and rayTrace

    |\____
  (:o ___/
    |/

GHOST is a tool for creating yt-like projection and slice plots of Gadget (or Gizmo) output snapshots without all the extra overhead (no trees are built except if smoothing lengths are needed!), using the SPH kernel to produce nice smooth plots.

Installation:
Make sure to have the following python packages. All of these can be obtained with pip.
numpy
scipy
yt (just for their lovely colormap)
joblib if you want to run in parallel
hope
docopt

Then just add GHOST.py to your path for easy access:
PATH=$PATH\:/my/path/to/GHOST ; export PATH

To get a summary of the available runtime options, do:
GHOST.py --help

Basic usage example:
GHOST.py "snapshot*.hdf5" --rmax=35.0 --c=0.5,0.5,0.5

This would make all of the plots specified in PlotSettings.py for every snapshot file. The bounds of the plot window would be [-35kpc,35kpc] and it would be centered on the point [0.5,0.5,0.5].

For each particle type, you must specify the things that you want to plot in PlotSettings.py, as well as the range of your colormap.

Currently implemented data fields include:
"Density": Slice density/number density
"Temperature": Slice gas temperature
"SurfaceDensity": Projected surface density
"SigmaV": line-of-sight velocity dispersion
"KineticEnergy": KE surface density due to motion along the line of sight; equal to 0.5 * SurfaceDensity * SigmaV**2
"Q": Toomre Q parameter using line of sight velocity dispersion, and the approximation that the epicyclic frequency is approximately the orbital frequency assuming a circular orbit about the origin.
"SFDensity": Star formation surface density in solar masses/yr/pc^2


Some caveats:
- This code has only been decently tested on isolated runs with vacuum boundary conditions; use on cosmo data at your own risk!
- So far we assume the following system of units:
	Unit length: 1kpc
	Unit mass: 1e10 solar mass
	Unit speed: 1km/s
- When smoothing lengths must be calculated, we simply take the distance to the n_ngb'th nearest neighbor.

Installing depedencies:
mkdir ~/src
cd src
wget http://bitbucket.org/yt_analysis/yt/raw/yt/doc/install_script.sh
bash install_script.sh
export PATH=~/src/yt-conda/bin:$PATH
pip install hope pillow joblib scipy

note to add: export PATH=~/src/yt-conda/bin:$PATH to .bash_profile or other

ghost's People

Contributors

corbett avatar

Watchers

James Cloos avatar B'Random Cliphord EiQ 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.