Commit f1aeadf3 authored by NUNEZ Arturo's avatar NUNEZ Arturo
Browse files

Automatic commit jeudi 7 juin 2018, 16:30:02 (UTC+0200)

parent 88cafb8e
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 1
}
This diff is collapsed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"%load_ext autoreload\n",
"%autoreload 2\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"\n",
"from scipy.stats import rv_continuous\n",
"from scipy.interpolate import interp1d\n",
"from matplotlib.patches import Circle\n",
"from scipy.special import gamma\n",
"import numpy as np\n",
"import emcee\n",
"from mpl_toolkits.axes_grid1 import make_axes_locatable\n",
"from numpy import exp, sqrt\n",
"from scipy.integrate import quad, dblquad\n",
"import matplotlib.patches as patches\n",
"from itertools import product\n",
"from scipy.integrate import quad\n",
"import scipy.optimize as optimize\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib as mpl\n",
"from sklearn.neighbors import KDTree\n",
"import sys\n",
"import lmfit\n",
"from py_unsio import *\n",
"import pymc\n",
"import os\n",
"from pymodelfit import FunctionModel1DAuto\n",
"import wkbl\n",
"from mpl_toolkits.mplot3d import axes3d\n",
"from matplotlib import cm\n",
"import wkbl.astro.nbody_essentials as nbe\n",
"import cfalcon\n",
"CF =cfalcon.CFalcon()\n",
"import iminuit\n",
"from iminuit import Minuit, describe, Struct\n",
"import probfit\n",
"from matplotlib.colors import LogNorm\n",
"from matplotlib.ticker import FormatStrFormatter"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"loading Dark matter..\n",
"loading Stars..\n",
"loading Gas..\n",
"density [-0.05960974 -1.06715898 -1.40904299]\n",
"starting\n",
"stackted\n",
"start histogram\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/arturo/Documents/git/WKBL/wkbl/astro/galaxy_peeker.py:76: RuntimeWarning: divide by zero encountered in divide\n",
" rho_s = np.cumsum(mhist) / vol_bin\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" done\n"
]
}
],
"source": [
"pathsim = \"/data/POL/HALOB/hydro/output_00417\"\n",
"#path = \"/media/arturo/ARTUROTECA/OUTPUTS/HaloB/output_00417\"\n",
"myhydro = wkbl.Galaxy_Hound(pathsim,\"halo,stars,gas\")\n",
"ok,rho,_= CF.getDensity(np.array(myhydro.st.pos3d.reshape(len(myhydro.st.pos3d)*3),dtype=np.float32), myhydro.st.mass)\n",
"centro_rho = myhydro.st.pos3d[np.where(rho == rho.max())][0]\n",
"print \"density\",centro_rho\n",
"myhydro.center_shift(centro_rho)\n",
"myhydro.r_virial(600,n=2)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
},
"latex_envs": {
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 0
}
},
"nbformat": 4,
"nbformat_minor": 1
}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment