# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (python3/3.6.2)
#     language: python
#     name: module-python3-3.6.2-python3
# ---

import sys
sys.path[:]
sys.path.insert(0, '/mnt/home/landerson/.local/lib/python3.6/site-packages')
import pynbody

import matplotlib.pyplot as plt
# %matplotlib inline

dir = '/mnt/ceph/users/firesims/ananke/Latte/m12m/snapdir_600/'
filename = 'snapshot_600'

sim = pynbody.load(dir+filename)

sim

sim.properties

sim.unit

sim.gas['mass'].units

sim.gas['x'].units

sim.dark['x'].abs().max()

blah = pynbody.analysis.halo.center(sim.gas,vel=False)

sim.dark['x'].abs().min()

sim.physical_units()

sim.original_units()

import numpy as np

np.min(np.abs(sim.gas['y']))

pynbody.plot.image(sim.gas, qty='rho', threaded=False)

# +
# pynbody.plot.image?
# -

pynbody.plot.faceon_image(sim.gas)

pynbody.plot.sideon_image(sim.gas)

sim.all_keys()

sim['x']



StarcoderdataJupyterScriptsDedupFiltered