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

Automatic commit mercredi 13 décembre 2017, 16:30:51 (UTC+0100)

parent c2ba5eca
This diff is collapsed.
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 1
}
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {
"collapsed": true
},
......@@ -45,7 +45,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 24,
"metadata": {
"collapsed": false,
"hide_input": false,
......@@ -57,19 +57,37 @@
"output_type": "stream",
"text": [
"loading Dark matter..\n",
"beware no clump info:\n",
"maybe is a very early snapshot or an old Ramses simulation\n",
"loading Stars..\n"
"loading Stars..\n",
"loading Gas..\n",
"loaded\n",
"| r_200 = 224.4140625\n",
"---- taking particles inside 2.5 * r200\n",
"| number of praticles inside 2.5 * r200 \n",
"| dm mass = 1.330e+12 M_sun\n",
"| p_dm_200 = 8.558e+05 particles\n",
"| stellar mass = 1.390e+11 M_sun\n",
"| p_st_200 = 4.925e+06 psrticles\n",
"| gas mass = 1.084e+11 M_sun\n",
"| p_gs_200 = 1.951e+06 particles\n",
"---- rotating galaxy \n",
"| Diagonal matrix computed \n",
"| |16, 0, 0|\n",
"| D =| 0,14, 0|\n",
"| | 0, 0, 3|\n",
"cutted\n"
]
}
],
"source": [
"path = \"/data/OWN/SF1test/AnH3/output_00041\"\n",
"path = \"/data/POL/HALOB/output_00417\"\n",
"#path = \"/data/POL/HALOB/output_00417\"\n",
"myhalo= wkbl.Galaxy_Hound(path)\n",
"print \"loaded\"\n",
"#cen = myhalo.dm.Clumps.pos3d[myhalo.dm.Clumps.cell==myhalo.dm.Clumps.cell.max()]\n",
"#myhalo.center_shift(cen)\n",
"#zoom_reg = (myhalo.dm.mass==myhalo.dm.mass.min())\n",
"#nucenter = nbe.real_center(myhalo.dm.pos3d[zoom_reg], myhalo.dm.mass[zoom_reg])\n",
"#myhalo.center_shift(nucenter)\n",
"myhalo.r_virial(600)\n",
"print \"cutted\"\n",
"nucenter = nbe.real_center(myhalo.dm.pos3d, myhalo.dm.mass)\n",
......@@ -79,7 +97,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 25,
"metadata": {
"collapsed": true
},
......@@ -91,7 +109,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 26,
"metadata": {
"collapsed": true
},
......@@ -103,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 27,
"metadata": {
"collapsed": false
},
......@@ -114,7 +132,7 @@
"224.4140625"
]
},
"execution_count": 5,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
......@@ -125,7 +143,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 28,
"metadata": {
"collapsed": false
},
......@@ -928,7 +946,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 29,
"metadata": {
"collapsed": true
},
......@@ -986,7 +1004,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 30,
"metadata": {
"collapsed": true
},
......@@ -1027,7 +1045,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 45,
"metadata": {
"collapsed": false
},
......@@ -1811,10 +1829,10 @@
{
"data": {
"text/plain": [
"<matplotlib.text.Text at 0x7fbb96536650>"
"<matplotlib.text.Text at 0x7fb34f03bc50>"
]
},
"execution_count": 15,
"execution_count": 45,
"metadata": {},
"output_type": "execute_result"
}
......@@ -1901,7 +1919,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 32,
"metadata": {
"collapsed": false
},
......@@ -2713,7 +2731,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 33,
"metadata": {
"collapsed": false
},
......@@ -2726,7 +2744,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 34,
"metadata": {
"collapsed": false
},
......@@ -2754,7 +2772,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 35,
"metadata": {
"collapsed": false
},
......@@ -2789,7 +2807,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 36,
"metadata": {
"collapsed": false
},
......@@ -2812,7 +2830,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 37,
"metadata": {
"collapsed": false
},
......@@ -2845,7 +2863,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 38,
"metadata": {
"collapsed": false
},
......@@ -3680,7 +3698,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 39,
"metadata": {
"collapsed": false
},
......@@ -3704,7 +3722,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 40,
"metadata": {
"collapsed": false,
"scrolled": true
......@@ -4515,7 +4533,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 41,
"metadata": {
"collapsed": false
},
......@@ -4539,7 +4557,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 42,
"metadata": {
"collapsed": false
},
......@@ -5323,10 +5341,10 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x7f401415ce10>]"
"[<matplotlib.lines.Line2D at 0x7fb34ff55050>]"
]
},
"execution_count": 20,
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
......@@ -5345,21 +5363,43 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 43,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
"source": [
"def face_on_st_age(sim,lims,points,thikness=.5):\n",
" disk = (np.abs(sim.st.pos3d[:,2])<thikness)\n",
" edges = np.linspace(lims[0],lims[1],points)\n",
" H, xedges, yedges = np.histogram2d(sim.st.pos3d[disk,0], \n",
" sim.st.pos3d[disk,1],\n",
" bins=(edges, edges),\n",
" weights=sim.st.age[disk])\n",
" result = H.T\n",
" return result, edges"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 44,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
"source": [
"\n",
"SF1140_faceOn,edges = face_on_st(myhalo,[-length,length],200)#H.T \n",
"\n",
"mass_2 = ax1.imshow(SF1140_faceOn, interpolation='nearest', origin='low',cmap=\"bone\",\n",
" extent=[edges[0], edges[-1], edges[0], edges[-1]],\n",
" norm=LogNorm(vmin=1e5,vmax=1e10)\n",
" )\n",
"\n",
"divider = make_axes_locatable(ax1)\n",
"cax = divider.append_axes(\"right\", size=\"5%\", pad=0.05)\n",
"cbar = plt.colorbar(mass_2,cax=cax,label=r'mass [M$_{\\odot}$]')"
]
},
{
"cell_type": "code",
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -437,7 +437,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 15,
"metadata": {
"collapsed": false
},
......@@ -457,12 +457,12 @@
"\n",
" <table>\n",
" <tr>\n",
" <td title=\"Minimum value of function\">FCN = 0.161296268371</td>\n",
" <td title=\"Total number of call to FCN so far\">TOTAL NCALL = 166</td>\n",
" <td title=\"Number of call in last migrad\">NCALLS = 166</td>\n",
" <td title=\"Minimum value of function\">FCN = 0.0684938708413</td>\n",
" <td title=\"Total number of call to FCN so far\">TOTAL NCALL = 411</td>\n",
" <td title=\"Number of call in last migrad\">NCALLS = 411</td>\n",
" </tr>\n",
" <tr>\n",
" <td title=\"Estimated distance to minimum\">EDM = 7.04806517323e-06</td>\n",
" <td title=\"Estimated distance to minimum\">EDM = 8.19453418029e-05</td>\n",
" <td title=\"Maximum EDM definition of convergence\">GOAL EDM = 1e-05</td>\n",
" <td title=\"Error def. Amount of increase in FCN to be defined as 1 standard deviation\">\n",
" UP = 1.0</td>\n",
......@@ -480,9 +480,9 @@
" <tr>\n",
" <td align=\"center\" style=\"background-color:#92CCA6\">True</td>\n",
" <td align=\"center\" style=\"background-color:#92CCA6\">True</td>\n",
" <td align=\"center\" style=\"background-color:#92CCA6\">True</td>\n",
" <td align=\"center\" style=\"background-color:#92CCA6\">True</td>\n",
" <td align=\"center\" style=\"background-color:#92CCA6\">False</td>\n",
" <td align=\"center\" style=\"background-color:#FF7878\">False</td>\n",
" <td align=\"center\" style=\"background-color:#FF7878\">False</td>\n",
" <td align=\"center\" style=\"background-color:#FF7878\">True</td>\n",
" </tr>\n",
" <tr>\n",
" <td align=\"center\" title=\"Was last hesse call fail?\">Hesse Fail</td>\n",
......@@ -511,7 +511,7 @@
"\n",
" <table>\n",
" <tr>\n",
" <td><a href=\"#\" onclick=\"$('#XLDVaRphAH').toggle()\">+</a></td>\n",
" <td><a href=\"#\" onclick=\"$('#ZsoTqjKVoM').toggle()\">+</a></td>\n",
" <td title=\"Variable name\">Name</td>\n",
" <td title=\"Value of parameter\">Value</td>\n",
" <td title=\"Parabolic error\">Parab Error</td>\n",
......@@ -525,79 +525,79 @@
" <tr>\n",
" <td>1</td>\n",
" <td>po</td>\n",
" <td>7.13979</td>\n",
" <td>1.58268</td>\n",
" <td>7.14996</td>\n",
" <td>8.78331</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>7.13976761512</td>\n",
" <td>8.7263826407</td>\n",
" <td>2.0</td>\n",
" <td>15.0</td>\n",
" <td></td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>2</td>\n",
" <td>r_s</td>\n",
" <td>8.34398</td>\n",
" <td>0.93375</td>\n",
" <td>15.003</td>\n",
" <td>5.00037</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>8.34397575782</td>\n",
" <td>10.1981925929</td>\n",
" <td>15.0</td>\n",
" <td>25.0</td>\n",
" <td></td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>3</td>\n",
" <td>al</td>\n",
" <td>0.734169</td>\n",
" <td>0.157198</td>\n",
" <td>0.167594</td>\n",
" <td>1.73891</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.734169479694</td>\n",
" <td>0.897318252959</td>\n",
" <td>0.1</td>\n",
" <td>2.0</td>\n",
" <td></td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>4</td>\n",
" <td>be</td>\n",
" <td>3.40956</td>\n",
" <td>0.55051</td>\n",
" <td>3.09988</td>\n",
" <td>0.128535</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>2.78963681452</td>\n",
" <td>3.40955610664</td>\n",
" <td>2.9</td>\n",
" <td>3.1</td>\n",
" <td></td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <td>5</td>\n",
" <td>ga</td>\n",
" <td>0.627252</td>\n",
" <td>0.0723698</td>\n",
" <td>1.99994</td>\n",
" <td>1.2667</td>\n",
" <td>0</td>\n",
" <td>0</td>\n",
" <td>0.513229208022</td>\n",
" <td>0.627280143138</td>\n",
" <td>0.01</td>\n",
" <td>2.0</td>\n",
" <td></td>\n",
" </tr>\n",
" \n",
" </table>\n",
" \n",
" <pre id=\"XLDVaRphAH\" style=\"display:none;\">\n",
" <pre id=\"ZsoTqjKVoM\" style=\"display:none;\">\n",
" <textarea rows=\"16\" cols=\"50\" onclick=\"this.select()\" readonly>\\begin{tabular}{|c|r|r|r|r|r|r|r|c|}\n",
"\\hline\n",
" & Name & Value & Para Error & Error+ & Error- & Limit+ & Limit- & FIXED\\\\\n",
"\\hline\n",
"1 & po & 7.140e+00 & 1.583e+00 & & & 7.140e+00 & 8.726e+00 & \\\\\n",
"1 & po & 7.150e+00 & 8.783e+00 & & & 2.000e+00 & 1.500e+01 & \\\\\n",
"\\hline\n",
"2 & $r_{s}$ & 8.344e+00 & 9.337e-01 & & & 8.344e+00 & 1.020e+01 & \\\\\n",
"2 & $r_{s}$ & 1.500e+01 & 5.000e+00 & & & 1.500e+01 & 2.500e+01 & \\\\\n",
"\\hline\n",
"3 & al & 7.342e-01 & 1.572e-01 & & & 7.342e-01 & 8.973e-01 & \\\\\n",
"3 & al & 1.676e-01 & 1.739e+00 & & & 1.000e-01 & 2.000e+00 & \\\\\n",
"\\hline\n",
"4 & be & 3.410e+00 & 5.505e-01 & & & 2.790e+00 & 3.410e+00 & \\\\\n",
"4 & be & 3.100e+00 & 1.285e-01 & & & 2.900e+00 & 3.100e+00 & \\\\\n",
"\\hline\n",
"5 & ga & 6.273e-01 & 7.237e-02 & & & 5.132e-01 & 6.273e-01 & \\\\\n",
"5 & ga & 2.000e+00 & 1.267e+00 & & & 1.000e-02 & 2.000e+00 & \\\\\n",
"\\hline\n",
"\\end{tabular}</textarea>\n",
" </pre>\n",
......@@ -622,11 +622,11 @@
"upp = 1.1\n",
"po,r_s,al,be,ga = m_rho.values['po'] ,m_rho.values['r_s'],m_rho.values['al'],m_rho.values['be'],m_rho.values['ga']\n",
"m_SC = Minuit(chi2_mass, \n",
" po=po, error_po=0.01, limit_po =(po*low,po*upp),\n",
" r_s=r_s, error_r_s=1., limit_r_s=(r_s*low,r_s*upp),\n",
" al=al, error_al=0.1, limit_al =(al*low,al*upp),\n",
" be=be, error_be=0.1, limit_be =(be*low,be*upp),\n",
" ga=ga, error_ga=0.1, limit_ga =(ga*low,ga*upp))\n",
" po=8.0, error_po=0.01, limit_po =(2.,15.),\n",
" r_s=20.3, error_r_s=0.1, limit_r_s=(15,25),\n",
" al=1., error_al=0.01, limit_al =(0.1,2),\n",
" be=3., error_be=0.01, limit_be =(2.9,3.1),\n",
" ga=1., error_ga=0.01, limit_ga =(0.01,2.))\n",
"m_SC.migrad();"
]
},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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