-
+
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/index.html b/Doc/newdoc/_build/html/index.html
index 5ba26ca..d5fe856 100644
--- a/Doc/newdoc/_build/html/index.html
+++ b/Doc/newdoc/_build/html/index.html
@@ -1,247 +1,253 @@
Welcome to pNbody’s documentation! — pNbody v4 documentation
Welcome to pNbody’s documentation!
Contents:
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/np-modindex.html b/Doc/newdoc/_build/html/np-modindex.html
index d8f65b4..d1841a2 100644
--- a/Doc/newdoc/_build/html/np-modindex.html
+++ b/Doc/newdoc/_build/html/np-modindex.html
@@ -1,328 +1,317 @@
Python Module Index — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/objects.inv b/Doc/newdoc/_build/html/objects.inv
index 39155ba..0458def 100644
Binary files a/Doc/newdoc/_build/html/objects.inv and b/Doc/newdoc/_build/html/objects.inv differ
diff --git a/Doc/newdoc/_build/html/py-modindex.html b/Doc/newdoc/_build/html/py-modindex.html
index 45d7e0d..e7f1ad1 100644
--- a/Doc/newdoc/_build/html/py-modindex.html
+++ b/Doc/newdoc/_build/html/py-modindex.html
@@ -1,328 +1,317 @@
Python Module Index — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_PyGadget.html b/Doc/newdoc/_build/html/rst/C_PyGadget.html
index 9cf553b..860c7fb 100644
--- a/Doc/newdoc/_build/html/rst/C_PyGadget.html
+++ b/Doc/newdoc/_build/html/rst/C_PyGadget.html
@@ -1,319 +1,133 @@
the C PyGadget module — pNbody v4 documentation
the C PyGadget module
This mpdule is currently not completely integrated to pNbody .
It is part of the pNbody package but must be compiled
separately.
For mpi, use:
-
-
-PyGadget.gadget. Acceleration ( )
-get the acceleration for a givent sample of points
-
-
-
-
-PyGadget.gadget. AllAcceleration ( )
-Computes the gravitational acceleration for each particle
-
-
-
-
-PyGadget.gadget. AllPotential ( )
-Computes the potential for each particle
-
-
-
-
-PyGadget.gadget. Density ( )
-compute Density based on the three for a given number of points
-
-
-
-
-PyGadget.gadget. GetAllAcceleration ( )
-get the gravitational acceleration for each particle
-
-
-
-
-PyGadget.gadget. GetAllDensities ( )
-get the densities for each particle
-
-
-
-
-PyGadget.gadget. GetAllHsml ( )
-get the sph smoothing length for each particle
-
-
-
-
-PyGadget.gadget. GetAllID ( )
-get the ID for each particle
-
-
-
-
-PyGadget.gadget. GetAllIDQ ( )
-get the ID for each particle Q
-
-
-
-
-PyGadget.gadget. GetAllMasses ( )
-get the mass for each particle
-
-
-
-
-PyGadget.gadget. GetAllMassesQ ( )
-get the mass for each particle Q
-
-
-
-
-PyGadget.gadget. GetAllPositions ( )
-get the position for each particle
-
-
-
-
-PyGadget.gadget. GetAllPositionsQ ( )
-get the position for each particle Q
-
-
-
-
-PyGadget.gadget. GetAllPotential ( )
-get the potential for each particle
-
-
-
-
-PyGadget.gadget. GetAllTypes ( )
-get the type for each particle
-
-
-
-
-PyGadget.gadget. GetAllTypesQ ( )
-get the type for each particle Q
-
-
-
-
-PyGadget.gadget. GetAllVelocities ( )
-get the velocities for each particle
-
-
-
-
-PyGadget.gadget. GetAllVelocitiesQ ( )
-get the velocities for each particle Q
-
-
-
-
-PyGadget.gadget. GetParameters ( )
-get gadget parameters
-
-
-
-
-PyGadget.gadget. GetPos ( )
-get the position for each particle (no memory overhead)
-
-
-
-
-PyGadget.gadget. Info ( )
-give some info
-
-
-
-
-PyGadget.gadget. InitDefaultParameters ( )
-Init default parameters
-
-
-
-
-PyGadget.gadget. InitHsml ( )
-Init hsml based on the three for a given number of points
-
-
-
-
-PyGadget.gadget. InitMPI ( )
-Init MPI
-
-
-
-
-PyGadget.gadget. LoadParticles ( )
-LoadParticles partilces
-
-
-
-
-PyGadget.gadget. LoadParticles2 ( )
-LoadParticles partilces
-
-
-
-
-PyGadget.gadget. LoadParticlesQ ( )
-LoadParticles partilces Q
-
-
-
-
-PyGadget.gadget. Ngbs ( )
-return the position of the neighbors for a given point
-
-
-
-
-PyGadget.gadget. Potential ( )
-get the potential for a givent sample of points
-
-
-
-
-PyGadget.gadget. SetParameters ( )
-Set gadget parameters
-
-
-
-
-PyGadget.gadget. SphEvaluate ( )
-compute mean value based on the sph convolution for a given number of points
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_asciilib.html b/Doc/newdoc/_build/html/rst/C_asciilib.html
index 490782e..1021135 100644
--- a/Doc/newdoc/_build/html/rst/C_asciilib.html
+++ b/Doc/newdoc/_build/html/rst/C_asciilib.html
@@ -1,133 +1,133 @@
the C asciilib module — pNbody v4 documentation
the C asciilib module
pNbody.asciilib. read ( )
Read ascii file
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_cooling_with_metals.html b/Doc/newdoc/_build/html/rst/C_cooling_with_metals.html
index 67f0d3e..66a0976 100644
--- a/Doc/newdoc/_build/html/rst/C_cooling_with_metals.html
+++ b/Doc/newdoc/_build/html/rst/C_cooling_with_metals.html
@@ -1,187 +1,187 @@
the C cooling_with_metals module — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_coolinglib.html b/Doc/newdoc/_build/html/rst/C_coolinglib.html
index 9b6d72e..6869a1a 100644
--- a/Doc/newdoc/_build/html/rst/C_coolinglib.html
+++ b/Doc/newdoc/_build/html/rst/C_coolinglib.html
@@ -1,139 +1,139 @@
the C coolinglib module — pNbody v4 documentation
the C coolinglib module
pNbody.coolinglib. cooling ( )
Return Mu and Lambda. Energy spec and Density must be in cgs.
pNbody.coolinglib. cooling_from_nH_and_T ( )
Return Mu and Lambda. Temperature and Hydrogen Density must be in cgs.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_cosmolib.html b/Doc/newdoc/_build/html/rst/C_cosmolib.html
index 597900c..3fd8832 100644
--- a/Doc/newdoc/_build/html/rst/C_cosmolib.html
+++ b/Doc/newdoc/_build/html/rst/C_cosmolib.html
@@ -1,133 +1,133 @@
the C cosmolib module — pNbody v4 documentation
the C cosmolib module
pNbody.cosmolib. Age_a ( )
Return age of the univers as a function of a (expansion factor).
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_iclib.html b/Doc/newdoc/_build/html/rst/C_iclib.html
index 7fa6aa0..47646f1 100644
--- a/Doc/newdoc/_build/html/rst/C_iclib.html
+++ b/Doc/newdoc/_build/html/rst/C_iclib.html
@@ -1,181 +1,181 @@
the C iclib module — pNbody v4 documentation
the C iclib module
pNbody.iclib. burkert ( )
Return position of a burkert model.
pNbody.iclib. exponential_disk ( )
Return position of an exponential disk.
pNbody.iclib. generic_Mr ( )
Return position following the density given by M(r)=Mr.
pNbody.iclib. generic_Mx ( )
Return position following the density given by M(x)=Mx. We assume an homogeneous distribution in y and z.
pNbody.iclib. generic_Mx1D ( )
Return position following the density given by M(x)=Mx. Return only x.
pNbody.iclib. generic_alpha ( )
Return position following the density (r+eps)^a.
pNbody.iclib. miyamoto_nagai ( )
Return position of a miyamoto_nagai model.
pNbody.iclib. miyamoto_nagai_f ( )
Return position of a miyamoto_nagai model divided by f(R).
pNbody.iclib. nfwg ( )
Return position of a nfwg model.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_mapping-omp.html b/Doc/newdoc/_build/html/rst/C_mapping-omp.html
index d91ad9d..1810853 100644
--- a/Doc/newdoc/_build/html/rst/C_mapping-omp.html
+++ b/Doc/newdoc/_build/html/rst/C_mapping-omp.html
@@ -1,129 +1,129 @@
the C mapping-omp module (under construction) — pNbody v4 documentation
the C mapping-omp module (under construction)
currently not available,
still under construction.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_mapping.html b/Doc/newdoc/_build/html/rst/C_mapping.html
index f146d77..3cf2d09 100644
--- a/Doc/newdoc/_build/html/rst/C_mapping.html
+++ b/Doc/newdoc/_build/html/rst/C_mapping.html
@@ -1,223 +1,223 @@
the C mapping module — pNbody v4 documentation
the C mapping module
pNbody.mapping. create_line ( )
Add a line in the given matrice using the Bresenham algorithm.
pNbody.mapping. create_line2 ( )
Add a line in the given matrice using the Bresenham algorithm.
pNbody.mapping. create_line3 ( )
Add a line in the given matrice using a personal algorithm.
pNbody.mapping. mkmap1d ( )
Return a 1d mapping.
pNbody.mapping. mkmap1dn ( )
Return a 1d mapping.
pNbody.mapping. mkmap1dw ( )
Return a 1d mapping (a particle is distributed over 2 nodes).
pNbody.mapping. mkmap2d ( )
Return a 2d mapping.
pNbody.mapping. mkmap2dn ( )
Return a 2d mapping.
pNbody.mapping. mkmap2dnsph ( )
Return a 2d smoothed maping.
pNbody.mapping. mkmap2dsph ( )
Return a 2d smoothed maping.
pNbody.mapping. mkmap2dw ( )
Return a 2d mapping (a particle is distributed over 4 nodes).
pNbody.mapping. mkmap3d ( )
Return a 3d mapping.
pNbody.mapping. mkmap3dn ( )
Return a 3d mapping.
pNbody.mapping. mkmap3dslicesph ( )
Return a 3d slice (sph).
pNbody.mapping. mkmap3dsortedsph ( )
Return a 3d mapping (sph).
pNbody.mapping. mkmap3dw ( )
Return a 3d mapping (a particle is distributed over 8 nodes).
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_montecarlolib.html b/Doc/newdoc/_build/html/rst/C_montecarlolib.html
index bff9198..3c5a352 100644
--- a/Doc/newdoc/_build/html/rst/C_montecarlolib.html
+++ b/Doc/newdoc/_build/html/rst/C_montecarlolib.html
@@ -1,145 +1,145 @@
the C montecarlolib module — pNbody v4 documentation
the C montecarlolib module
pNbody.montecarlolib. mc1d ( )
Return a 1d monte carlo distribution.
pNbody.montecarlolib. mc2d ( )
Return a 2d monte carlo distribution.
pNbody.montecarlolib. mc3d ( )
Return a 3d monte carlo distribution.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_myNumeric.html b/Doc/newdoc/_build/html/rst/C_myNumeric.html
index e9c1ade..af30bf9 100644
--- a/Doc/newdoc/_build/html/rst/C_myNumeric.html
+++ b/Doc/newdoc/_build/html/rst/C_myNumeric.html
@@ -1,253 +1,253 @@
the C myNumeric module — pNbody v4 documentation
the C myNumeric module
pNbody.myNumeric. Interpolate_From_1d_Array ( )
Interpolate values from a given array.
pNbody.myNumeric. Interpolate_From_2d_Array ( )
Interpolate values from a given array.
pNbody.myNumeric. expand ( )
Expand a matrix.
pNbody.myNumeric. getmask ( )
Return a mask of the same type as x which has ones where elemets of x that have a corespondant in y and zeros instead.
pNbody.myNumeric. histogram2d ( )
Return a 2d matrix corresponding to the histrogram of two vector values in given ranges.
pNbody.myNumeric. hnd ( )
Return a 3d matrix corresponding to the histrogram in n dim of a vector 3xn
pNbody.myNumeric. lininterp1d ( )
Linear interpolation of 1d function given by two vectors.
pNbody.myNumeric. polint ( )
Polynomial interpolation.
pNbody.myNumeric. quaddinterp1d ( )
Quadratic interpolation of 1d function given by two vectors (the slope is continuous).
pNbody.myNumeric. quadinterp1d ( )
Quadratic interpolation of 1d function given by two vectors.
pNbody.myNumeric. ratint ( )
Polynomial interpolation.
pNbody.myNumeric. rotx ( )
Rotation around the x axis.
pNbody.myNumeric. roty ( )
Rotation around the y axis.
pNbody.myNumeric. rotz ( )
Rotation around the z axis.
pNbody.myNumeric. spline ( )
spline.
pNbody.myNumeric. spline3d ( )
Return a 3d interpolation.
pNbody.myNumeric. splint ( )
splint.
pNbody.myNumeric. test ( )
Some test on PyArray object.
pNbody.myNumeric. turnup ( )
Turn up a matrix.
pNbody.myNumeric. vprod ( )
Calculate the vectorial product of two vectors.
pNbody.myNumeric. whistogram ( )
Return a weighted histogram.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_nbdrklib.html b/Doc/newdoc/_build/html/rst/C_nbdrklib.html
index a828809..fc2305b 100644
--- a/Doc/newdoc/_build/html/rst/C_nbdrklib.html
+++ b/Doc/newdoc/_build/html/rst/C_nbdrklib.html
@@ -1,139 +1,139 @@
the C nbdrklib module — pNbody v4 documentation
the C nbdrklib module
pNbody.nbdrklib. Compute ( )
Compute all.
pNbody.nbdrklib. IntegrateOverDt ( )
Integrate the system over dt.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_nbodymodule.html b/Doc/newdoc/_build/html/rst/C_nbodymodule.html
index 1f19bf3..16c6ac7 100644
--- a/Doc/newdoc/_build/html/rst/C_nbodymodule.html
+++ b/Doc/newdoc/_build/html/rst/C_nbodymodule.html
@@ -1,223 +1,223 @@
the C nbodymodule module — pNbody v4 documentation
the C nbodymodule module
pNbody.nbodymodule. acceleration ( )
Calculate the acceleration at a given position, with a given softening.
pNbody.nbodymodule. am ( )
Calculate the angular momentum of the model.
pNbody.nbodymodule. ampmap ( )
Return a map of amplitude of the given points.
pNbody.nbodymodule. amxyz ( )
Calculate the angular momentum in x,y,z for all particles.
pNbody.nbodymodule. convol ( )
Return a 2d convolution of a with kernel b.
pNbody.nbodymodule. epot ( )
Calculate the total potential energy.
pNbody.nbodymodule. pamap ( )
Return a map of the given points.
pNbody.nbodymodule. pdmap ( )
Return a ponderated map of the given points.
pNbody.nbodymodule. perspective ( )
Return a 3d projection of the given points.
pNbody.nbodymodule. potential ( )
Calculate the potential at a given position, with a given softening.
pNbody.nbodymodule. rotx ( )
Rotation around the x axis.
pNbody.nbodymodule. roty ( )
Rotation around the y axis.
pNbody.nbodymodule. rotz ( )
Rotation around the z axis.
pNbody.nbodymodule. samxyz ( )
Calculate the specific angular momentum in x,y,z for all particles.
pNbody.nbodymodule. sphmap ( )
Return a sphmap of the given points.
pNbody.nbodymodule. spin ( )
Spin the model around an axis.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_peanolib.html b/Doc/newdoc/_build/html/rst/C_peanolib.html
index ea119c4..45f5f62 100644
--- a/Doc/newdoc/_build/html/rst/C_peanolib.html
+++ b/Doc/newdoc/_build/html/rst/C_peanolib.html
@@ -1,139 +1,139 @@
the C peanolib module — pNbody v4 documentation
the C peanolib module
pNbody.peanolib. peano2xyz ( )
From a peano key return a triplet xyz.
pNbody.peanolib. xyz2peano ( )
From a triplet xyz return a peano key.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_pmlib.html b/Doc/newdoc/_build/html/rst/C_pmlib.html
index 6257b99..258e26c 100644
--- a/Doc/newdoc/_build/html/rst/C_pmlib.html
+++ b/Doc/newdoc/_build/html/rst/C_pmlib.html
@@ -1,129 +1,129 @@
the C pmlib module (never developped) — pNbody v4 documentation
the C pmlib module (never developped)
currently not available,
still under construction.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_ptreelib.html b/Doc/newdoc/_build/html/rst/C_ptreelib.html
index 26a27b6..4b0a156 100644
--- a/Doc/newdoc/_build/html/rst/C_ptreelib.html
+++ b/Doc/newdoc/_build/html/rst/C_ptreelib.html
@@ -1,129 +1,129 @@
the C ptreelib module (obsolete) — pNbody v4 documentation
the C ptreelib module (obsolete)
currently not available,
still under construction.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_pygsl.html b/Doc/newdoc/_build/html/rst/C_pygsl.html
index 6cb8851..b8347fd 100644
--- a/Doc/newdoc/_build/html/rst/C_pygsl.html
+++ b/Doc/newdoc/_build/html/rst/C_pygsl.html
@@ -1,133 +1,133 @@
the C pygsl module — pNbody v4 documentation
the C pygsl module
pNbody.pygsl. sobol_sequence ( )
Return a sobol sequence of len n and of dimension d.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_streelib.html b/Doc/newdoc/_build/html/rst/C_streelib.html
index 70b0810..19f3c2a 100644
--- a/Doc/newdoc/_build/html/rst/C_streelib.html
+++ b/Doc/newdoc/_build/html/rst/C_streelib.html
@@ -1,129 +1,129 @@
the C streelib module (under construction) — pNbody v4 documentation
the C streelib module (under construction)
currently not available,
still under construction.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_tessel.html b/Doc/newdoc/_build/html/rst/C_tessel.html
index 5a7e958..1ae1cea 100644
--- a/Doc/newdoc/_build/html/rst/C_tessel.html
+++ b/Doc/newdoc/_build/html/rst/C_tessel.html
@@ -1,193 +1,193 @@
the C tessel module — pNbody v4 documentation
the C tessel module
pNbody.tessel. CircumCircleProperties ( )
Get Circum Circle Properties
pNbody.tessel. ComputeIsoContours ( )
Compute iso-contours.
pNbody.tessel. ConstructDelaunay ( )
Construct the Delaunay tesselation for a given sample of points
pNbody.tessel. GetTriangles ( )
Get the trianles in a list of 3x3 arrays.
pNbody.tessel. GetVoronoi ( )
Get a list of segements corresponding to the voronoi.
pNbody.tessel. InCircumCircle ( )
Return if the circum circle of the triangle (P1,P2,P3) contains the point P4
pNbody.tessel. InTriangle ( )
Return if the triangle (P1,P2,P3) contains the point P4
pNbody.tessel. InTriangleOrOutside ( )
Return if the triangle (P1,P2,P3) contains the point P4
pNbody.tessel. TriangleMedians ( )
Get Triangle Medians
pNbody.tessel. info ( )
info on tesselation
pNbody.tessel. test ( )
Simple Test
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/C_treelib.html b/Doc/newdoc/_build/html/rst/C_treelib.html
index 4cb08d2..63edf63 100644
--- a/Doc/newdoc/_build/html/rst/C_treelib.html
+++ b/Doc/newdoc/_build/html/rst/C_treelib.html
@@ -1,118 +1,118 @@
the C treelib module — pNbody v4 documentation
the C treelib module
Provides serial tree routines based on Gadget-2. Should be replaced by PyGadget.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/CoolingModule.html b/Doc/newdoc/_build/html/rst/CoolingModule.html
index a2306cc..a131bfc 100644
--- a/Doc/newdoc/_build/html/rst/CoolingModule.html
+++ b/Doc/newdoc/_build/html/rst/CoolingModule.html
@@ -1,127 +1,127 @@
the cooling module — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/CosmoModule.html b/Doc/newdoc/_build/html/rst/CosmoModule.html
index 682b317..5b0f62d 100644
--- a/Doc/newdoc/_build/html/rst/CosmoModule.html
+++ b/Doc/newdoc/_build/html/rst/CosmoModule.html
@@ -1,179 +1,179 @@
the cosmo module — pNbody v4 documentation
the cosmo module
pNbody.cosmo. A_z ( z )
pNbody.cosmo. Adot_a ( a , pars={'Hubble': 0.100000001545942 , 'HubbleParam': 0.72999999999999998 , 'Omega0': 0.23999999999999999 , 'OmegaLambda': 0.76000000000000001} )
da/dt
pNbody.cosmo. Age_a ( a , pars={'Hubble': 0.100000001545942 , 'HubbleParam': 0.72999999999999998 , 'Omega0': 0.23999999999999999 , 'OmegaLambda': 0.76000000000000001} )
cosmic age as a function of a
pNbody.cosmo. CosmicTime_a ( a , pars={'Hubble': 0.100000001545942 , 'HubbleParam': 0.72999999999999998 , 'Omega0': 0.23999999999999999 , 'OmegaLambda': 0.76000000000000001} )
cosmic time as a function of a in internal units,
ie, (1/h)
pNbody.cosmo. Hubble_a ( a )
pNbody.cosmo. Rho_c ( localsystem_of_units )
Critical density
pNbody.cosmo. Z_a ( a )
pNbody.cosmo. a_CosmicTime ( t , pars={'Hubble': 0.100000001545942 , 'HubbleParam': 0.72999999999999998 , 'Omega0': 0.23999999999999999 , 'OmegaLambda': 0.76000000000000001} , a0=0.5 )
return a for a given cosmic time
pNbody.cosmo. setdefault ( )
set default cosmological parameters
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/CtesModule.html b/Doc/newdoc/_build/html/rst/CtesModule.html
index a0a18fb..14e19c2 100644
--- a/Doc/newdoc/_build/html/rst/CtesModule.html
+++ b/Doc/newdoc/_build/html/rst/CtesModule.html
@@ -1,133 +1,133 @@
the ctes module — pNbody v4 documentation
the ctes module
pNbody.ctes. convert_ctes ( units )
convert a constante into a given unit system.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Default_configurations.html b/Doc/newdoc/_build/html/rst/Default_configurations.html
index 140fe3d..9af645a 100644
--- a/Doc/newdoc/_build/html/rst/Default_configurations.html
+++ b/Doc/newdoc/_build/html/rst/Default_configurations.html
@@ -1,186 +1,186 @@
Default configuration — pNbody v4 documentation
Default configuration
pNbody uses a set of parameters files, color tables and formats files.
These files are provided by the installation and are by default stored in
the directory site-packages/pNbody/config .
To display where these files are taken from, you can use the command:
It is recommanded that the user uses its own configuration files. To be automatically
recongnized by pNbody , the latter must be in the user ~/.pNbody directory.
pNbody provides a simple command to copy all parameters in this directory. Simply
type:
pNbody_copy - defaultconfig
and check the values of the new paths:
You can now freely modify the files contains in the configuratio directory.
By default, the content of the configuration directory is:
name
type
Content
defaultparameters
file
the default graphical parameters used by pNbody
unitsparameters
file
the default units parameters used by pNbody
formats
directory
specific class definition files used to read different file formats
rgb_tables
directory
color tables
plugins
directory
optional plugins
opt
directory
optional files
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Default_parameters.html b/Doc/newdoc/_build/html/rst/Default_parameters.html
index cb9af71..3f0a22a 100644
--- a/Doc/newdoc/_build/html/rst/Default_parameters.html
+++ b/Doc/newdoc/_build/html/rst/Default_parameters.html
@@ -1,191 +1,191 @@
Default parameters — pNbody v4 documentation
Default parameters
To see what default parameters pNbody uses, type:
The script returns the parameters taken from the files
defaultparameters and unitsparameters .
Their current values are displayed:
parameters in /home/leo/local/lib/python2.6/site-packages/pNbody/config/defaultparameters
----------------------------------------------------------------------------------------------------
name meaning value (type)
----------------------------------------------------------------------------------------------------
obs : observer = None (ArrayObs)
xp : observing position = None (List)
x0 : position of observer = None (List)
alpha : angle of the head = None (Float)
view : view = xz (String)
r_obs : dist. to the observer = 201732.223771 (Float)
clip : clip planes = (100866.11188556443, 403464.44754225772) (Tuple)
cut : cut clip planes = no (String)
eye : name of the eye = None (String)
dist_eye : distance between eyes = -0.0005 (Float)
foc : focal = 300.0 (Float)
persp : perspective = off (String)
shape : shape of the image = (512, 512) (Tuple)
size : pysical size = (6000, 6000) (Tuple)
frsp : frsp = 0.0 (Float)
space : space = pos (String)
mode : mode = m (String)
rendering : rendering mode = map (String)
filter_name : name of the filter = None (String)
filter_opts : filter options = [10, 10, 2, 2] (List)
scale : scale = log (String)
cd : cd = 0.0 (Float)
mn : mn = 0.0 (Float)
mx : mx = 0.0 (Float)
l_n : number of levels = 15 (Int)
l_min : min level = 0.0 (Float)
l_max : max level = 0.0 (Float)
l_kx : l_kx = 10 (Int)
l_ky : l_ky = 10 (Int)
l_color : level color = 0 (Int)
l_crush : crush background = no (String)
b_weight : box line weight = 0 (Int)
b_xopts : x axis options = None (Tuple)
b_yopts : y axis options = None (Tuple)
b_color : line color = 255 (Int)
parameters in /home/leo/local/lib/python2.6/site-packages/pNbody/config/unitsparameters
----------------------------------------------------------------------------------------------------
name meaning value (type)
----------------------------------------------------------------------------------------------------
xi : hydrogen mass fraction = 0.76 (Float)
ionisation : ionisation flag = 1 (Int)
metalicity : metalicity index = 4 (Int)
Nsph : number of sph neighbors = 50 (Int)
gamma : adiabatic index = 1.66666666667 (Float)
coolingfile : Cooling file = ~/.Nbody/cooling.dat (String)
HubbleParam : HubbleParam = 1.0 (Float)
UnitLength_in_cm : UnitLength in cm = 3.085e+21 (Float)
UnitMass_in_g : UnitMass in g = 4.435693e+44 (Float)
UnitVelocity_in_cm_per_s : UnitVelocity in cm per s = 97824708.2699 (Float)
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Display.html b/Doc/newdoc/_build/html/rst/Display.html
index bce8ea2..3b349b2 100644
--- a/Doc/newdoc/_build/html/rst/Display.html
+++ b/Doc/newdoc/_build/html/rst/Display.html
@@ -1,124 +1,124 @@
Display Models — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Documentation_and_examples.html b/Doc/newdoc/_build/html/rst/Documentation_and_examples.html
deleted file mode 100644
index 1a4fece..0000000
--- a/Doc/newdoc/_build/html/rst/Documentation_and_examples.html
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
- Examples — pNbody v4 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Examples.html b/Doc/newdoc/_build/html/rst/Examples.html
index e139b6e..6f45010 100644
--- a/Doc/newdoc/_build/html/rst/Examples.html
+++ b/Doc/newdoc/_build/html/rst/Examples.html
@@ -1,133 +1,133 @@
Examples — pNbody v4 documentation
Examples
A series of examples is provided by pNbody in the
PNBODYPATH/examples , where NBODYPATH is obtained
with the command:
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Formats.html b/Doc/newdoc/_build/html/rst/Formats.html
index 2b4c4bc..908f1a3 100644
--- a/Doc/newdoc/_build/html/rst/Formats.html
+++ b/Doc/newdoc/_build/html/rst/Formats.html
@@ -1,124 +1,124 @@
Setting a format file — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/FortranfileModule.html b/Doc/newdoc/_build/html/rst/FortranfileModule.html
index 4589ebe..4eb1c80 100644
--- a/Doc/newdoc/_build/html/rst/FortranfileModule.html
+++ b/Doc/newdoc/_build/html/rst/FortranfileModule.html
@@ -1,312 +1,312 @@
the fortranfile module — pNbody v4 documentation
the fortranfile module
Defines a file-derived class to read/write Fortran unformatted files.
The assumption is that a Fortran unformatted file is being written by
the Fortran runtime as a sequence of records. Each record consists of
an integer (of the default size [usually 32 or 64 bits]) giving the
length of the following data in bytes, then the data itself, then the
same integer as before.
Examples
To use the default endian and precision settings, one can just do::
>>> f = FortranFile ( 'filename' )
>>> x = f . readReals ()
One can read arrays with varying precisions::
>>> f = FortranFile ( 'filename' )
>>> x = f . readInts ( 'h' )
>>> y = f . readInts ( 'q' )
>>> z = f . readReals ( 'f' )
Where the format codes are those used by Python’s struct module.
One can change the default endian-ness and header precision::
>>> f = FortranFile ( 'filename' , endian = '>' , header_prec = 'l' )
for a file with little-endian data whose record headers are long
integers.
class pNbody.fortranfile. FortranFile ( fname , endian='@' , header_prec='i' , *args , **kwargs )
File with methods for dealing with fortran unformatted data files
Methods
ENDIAN
Possible endian values are ‘<’, ‘>’, ‘@’, ‘=’
HEADER_PREC
Possible header precisions are ‘h’, ‘i’, ‘l’, ‘q’
readInts ( prec='i' )
Read an array of integers.
Parameters : prec : character, optional
-Specify the precision of the data to be read using
+
Specify the precision of the data to be read using
character codes from Python’s struct module. Possible
values are ‘h’, ‘i’, ‘l’ and ‘q’
-
+
readReals ( prec='f' )
Read in an array of real numbers.
Parameters : prec : character, optional
-Specify the precision of the array using character codes from
+
Specify the precision of the array using character codes from
Python’s struct module. Possible values are ‘d’ and ‘f’.
-
+
readRecord ( )
Read a single fortran record
readString ( )
Read a string.
writeInts ( ints , prec='i' )
Write an array of integers in given precision
Parameters : reals : array
-
+Data to write
+
prec : string
-Character code for the precision to use in writing
-
+Character code for the precision to use in writing
+
writeReals ( reals , prec='f' )
Write an array of floats in given precision
Parameters : reals : array
-
+Data to write
+
prec` : string
-Character code for the precision to use in writing
-
+Character code for the precision to use in writing
+
writeRecord ( s )
Write a record with the given bytes.
Parameters : s : the string to write
writeString ( s )
Write a string
Parameters : s : the string to write
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/FourierModule.html b/Doc/newdoc/_build/html/rst/FourierModule.html
index a49289a..225d49e 100644
--- a/Doc/newdoc/_build/html/rst/FourierModule.html
+++ b/Doc/newdoc/_build/html/rst/FourierModule.html
@@ -1,133 +1,133 @@
the fourier module — pNbody v4 documentation
the fourier module
pNbody.fourier. fourier ( m=1 , n) amp_m cos( 2.pi f_m phi + phi_m ) = Sum_(m=1 , n) amp_m cos( m phi + phi_m )
m = 2.pi f_m
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/GeometryModule.html b/Doc/newdoc/_build/html/rst/GeometryModule.html
index a0cc82e..568ba74 100644
--- a/Doc/newdoc/_build/html/rst/GeometryModule.html
+++ b/Doc/newdoc/_build/html/rst/GeometryModule.html
@@ -1,229 +1,229 @@
the geometry module — pNbody v4 documentation
the geometry module
pNbody.geometry. align ( x, axis1=[1, 0, 0], axis2=[0, 0, 1], point=[0, 0, 0] )
Rotate the object around point in order to align the axis ‘axis1’ with the axis ‘axis2’.
axis1 : [x,y,z]
axis2 : [x,y,z]
pNbody.geometry. boxcut ( pos , args )
Return only particles that are inside box 1:1:1
pNbody.geometry. boxcut_segments ( pos , args )
Return only particles that are inside box 1:1:1
pNbody.geometry. expose ( obj , obs , eye=None , dist_eye=None , foc=None )
Rotate and translate the object in order to be seen as if the
observer was in x0, looking at a point in xp.
obj : object array to expose
obs : representation of the observer
eye : ‘right’ or ‘left’
dist_eye : distance between eyes (separation = angle))
foc : focal
pNbody.geometry. frustum ( pos , clip , size )
Project using a frustrum matrix
clip = near and far planes
size = size of the box
pNbody.geometry. get_obs ( x0=[0.0, -50.0, 0.0], xp=[0.0, 0.0, 0.0], alpha=0, view='xz', r_obs=50 )
From some parameters, return an obs matrix
-x0,xp,alpha
+x0,xp,alpha
or
xz
pNbody.geometry. inv_viewport ( xw , yw , zw , shape )
viewport transformation
xn = position (output from frustum or ortho)
shape = shape of the image
pNbody.geometry. norm ( x )
return the norm of vector x
pNbody.geometry. ortho ( pos , clip , size )
Project using an ortho matrix
clip = near and far planes
size = size of the box
pNbody.geometry. perspective ( r_obs=100.0 , foc=50.0 , view='xz' )
Project the N-body model in order to get a perspective view.
r_obs = distance of the observer to the looking point
foc = focal
view = ‘xz’ , ‘xy’ , ‘yz’
pNbody.geometry. rotate ( x, angle=0, axis=[1, 0, 0], point=[0, 0, 0] )
Rotate the positions and/or the velocities of the object around a specific axis
with respect to a specific point
angle : rotation angle in radian
axis : [x,y,z] : around this axis
point : [x,y,z] : rotation origin
use the euler rotation matrix
pNbody.geometry. viewport ( xn , shape=None )
viewport transformation
xn = position (output from frustum or ortho)
shape = shape of the image
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Grids.html b/Doc/newdoc/_build/html/rst/Grids.html
index 43b3218..12fdbd8 100644
--- a/Doc/newdoc/_build/html/rst/Grids.html
+++ b/Doc/newdoc/_build/html/rst/Grids.html
@@ -1,124 +1,124 @@
Generating grids — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/IcModule.html b/Doc/newdoc/_build/html/rst/IcModule.html
index 32268ff..6ad6e8f 100644
--- a/Doc/newdoc/_build/html/rst/IcModule.html
+++ b/Doc/newdoc/_build/html/rst/IcModule.html
@@ -1,375 +1,375 @@
the ic module — pNbody v4 documentation
the ic module
pNbody.ic. ComputeGridParameters ( n , args , rmax , M , pr_fct , mr_fct , Neps_des , rc , ng )
This function computes dR, the appropriate grid used to approximate Mr.
The grid is set in order to have “Neps_des” particles
in the first division of the grid. Then, the radius of the grid
follows an exponnential distribution up to rmax.
from the density distribution, the total mass and the number of particles,
using a newton algorithm, it computes eps, the radius that will contains “Neps_des” particles
once eps is set, we determine rc (the grid scale length) from eps and ng, in order to
have a grid with the a first cell equal to eps.
if the computation of rc fails, we use the default value of rc
The function takes the following arguments
n : number of particles
M : total mass
rmax : max radius
args : list of args for the profile
pr_fct : profile function
mr_fct : mass-radius function
Neps_des : desired number of point in the first beam
rc : default size of the first beam
ng : number of grid divisions
it returns :
Rs : grid points
eps : radius containing about Neps_des particles
Neps : number of particles in eps
pNbody.ic. ComputeGridParameters2 ( eps , nmax , args , rmax , M , pr_fct , mr_fct , Neps_des , rc , ng )
This function computes dR, the appropriate grid used to approximate Mr.
The number of particle of the model is set in order to have “Neps_des” particles
in the first division of the grid. Then, the radius of the grid
follows an exponnential distribution up to rmax.
n is set from the total mass and Neps_des
once n is set, we determine rc (the grid scale length) from eps and ng, in order to
have a grid with the a first cell equal to eps.
if the computation of rc fails, we use the default value of rc
The function takes the following arguments
eps : the desired grid resolution
nmax : max number of particles
M : total mass
rmax : max radius
args : list of args for the profile
pr_fct : profile function
mr_fct : mass-radius function
Neps_des : desired number of point in the first beam
rc : default size of the first beam
ng : number of grid divisions
it returns :
n : number of particles
Rs : grid points
rc : parameter of the scaling fct
g : scaling fct
gm : inverse of scaling fct
pNbody.ic. box ( n , a , b , c , name='box.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed
in an homogeneous box of dimension a,b,c, centred at the origin
radius rmax.
pNbody.ic. burkert ( n , rs , Rmax , dR , Rs=None , name='burkert.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules following
a burkert profile.
rhob = 1 / ( ( 1 + r/rs ) * ( 1 + (r/rs)**2 ) )
pNbody.ic. dl2 ( n , a , b , c , eps , rmax , name='dl2.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed as
rho = (1.-eps*(r/rmax)**2)
pNbody.ic. dl2_mr ( r , args )
Mass in the radius r for the distribution
rho = (1.-eps*(r/rmax)**2)
pNbody.ic. expd ( n , Hr , Hz , Rmax , Zmax , irand=1 , name='expd.dat' , ftype='binary' , verbose=False )
Exonential disk
rho = 1/(1+(r/rc)**2)
pNbody.ic. expd_mr ( r , args )
Mass in the radius r for the distribution
Sigma = epx(-r)
pNbody.ic. generic2c ( n , rs , a , b , Rmax , dR , Rs=None , name='nfwg.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules following
an nfw modifed profile.
rho = 1/( (r/rs)**a * (1+r/rs)**(b-a) )
pNbody.ic. generic_Mr ( n , rmax , R=None , Mr=None , name='sphere_Mr.dat' , ftype='binary' , verbose=False )
Distribute particles in order to reproduce M(R) given by Mr
pNbody.ic. generic_Mx ( n , xmax , x=None , Mx=None , name='box_Mx.dat' , ftype='binary' , verbose=False )
Distribute particles in a box. The density in x is defined in order to reproduce M(x) given by Mx
pNbody.ic. generic_alpha ( n , a , e , rmax , irand=1 , fct=None , name='generic_alpha.dat' , ftype='binary' , verbose=False )
Generic alpha distribution : rho ~ (r+e)^a
pNbody.ic. hernquist ( n , rs , Rmax , dR , Rs=None , name='hernquist.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules following
a hernquist modifed profile.
rho = 1/( (r/rs) * (1+r/rs)**3 )
pNbody.ic. homodisk ( n , a , b , dz , name='homodisk.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed
in an homogeneous oval of radius a and b, and of thickness dz.
pNbody.ic. homosphere ( n , a , b , c , name='homosphere.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed
in an homogeneous triaxial sphere of axis a,b,c.
pNbody.ic. invert ( x , rmin , rmax , fct , args , eps=1e-10 )
return vector r that corresponds to
fct(r,args)=x
This routine uses a simple bissector algorithm
pNbody.ic. isothm ( n , rc , rmax , name='isothm.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed as
rho = 1/(1+r/rc)**2
pNbody.ic. isothm_mr ( r , args )
Mass in the radius r for the distribution
rho = 1/(1+r/rc)**2
pNbody.ic. kuzmin ( n , eps , dz , name='kuzmin.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed
in a kuzmin (infinitely thin) disk
rho = eps*M/(2*pi*(R**2+eps**2)**(3/2))
pNbody.ic. miyamoto_nagai ( n , a , b , Rmax , Zmax , irand=1 , fct=None , fRmax=0 , name='miyamoto.dat' , ftype='binary' , verbose=False )
Miyamoto Nagai distribution
pNbody.ic. nfw ( n , rs , Rmax , dR , Rs=None , name='nfw.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules following
an nfw profile.
rho = 1/[ (r/rs)(1+r/rs)^2 ]
pNbody.ic. nfw_mr ( r , args )
Mass in the radius r for the nfw distribution
rho = rhos/[ (r/rs)(1+r/rs)^2 ]
mr = 4*pi*rhos*rs**3 * (log(1+r/rs)-r/(rs+r))
pNbody.ic. nfwg ( n , rs , gamma , Rmax , dR , Rs=None , name='nfwg.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules following
an nfw modifed profile.
rho = 1/[ ((r/rs))**(gamma)(1+r/rs)^2 ]**(0.5*(3-gamma))
pNbody.ic. pisothm ( n , rc , rmax , rmin=0 , name='pisothm.dat' , ftype='binary' , verbose=False )
Pseudo-isothermal sphere
Mass in the radius r for the distribution
rho = 1/(1+(r/rc)**2)
pNbody.ic. pisothm_mr ( r , args )
Mass in the radius r for the distribution
rho = 1/(1+(r/rc)**2)
pNbody.ic. plummer ( n , a , b , c , eps , rmax , M=1.0 , vel='no' , name='plummer.dat' , ftype='binary' , verbose=False )
Return an Nbody object that contains n particules distributed
in a triaxial plummer model of axis a,b,c and core radius eps
and max radius of rmax.
rho = (1.+(r/eps)**2)**(-5/2)
pNbody.ic. shell ( n , r , name='cell.dat' , ftype='binary' , verbose=False )
Shell of radius r
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/InitialConditions.html b/Doc/newdoc/_build/html/rst/InitialConditions.html
index f243d47..2e5c992 100644
--- a/Doc/newdoc/_build/html/rst/InitialConditions.html
+++ b/Doc/newdoc/_build/html/rst/InitialConditions.html
@@ -1,149 +1,149 @@
Generating initial conditions — pNbody v4 documentation
Generating initial conditions
pNbody provides a lots of different way
to generatin initial conditions, ready to be
run with evolution codes.
The generation of initial conditions is devided into
two parts. First, the generation of a mass profile by
distributing particles in space. Secondly, the determination
of the velocities for each of these particles.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Initialconditions.html b/Doc/newdoc/_build/html/rst/Initialconditions.html
deleted file mode 100644
index 1477ed6..0000000
--- a/Doc/newdoc/_build/html/rst/Initialconditions.html
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
- Generating initial conditions — pNbody v4 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Generating initial conditions
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Installation.html b/Doc/newdoc/_build/html/rst/Installation.html
index 72203a1..d929943 100644
--- a/Doc/newdoc/_build/html/rst/Installation.html
+++ b/Doc/newdoc/_build/html/rst/Installation.html
@@ -1,140 +1,140 @@
Installation — pNbody v4 documentation
Installation
pNbody is curently only supported by linux.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Installing_from_tarball.html b/Doc/newdoc/_build/html/rst/Installing_from_tarball.html
index 0374be1..7597a1a 100644
--- a/Doc/newdoc/_build/html/rst/Installing_from_tarball.html
+++ b/Doc/newdoc/_build/html/rst/Installing_from_tarball.html
@@ -1,163 +1,163 @@
Installing from source — pNbody v4 documentation
Installing from source
Decompress the tarball
Decompress the tarball file:
tar -xzf pNbody-4.x.tar.gz
enter the directory:
Compile
The compilation is performed using the standard command:
If one wants to install in another directory than the default
python one, it is possible to use the standard --prefix option:
python setup.py build --prefix other_directory
Install
Now, depending on your python installation you need to be root.
The module is installed with the following command:
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Io.html b/Doc/newdoc/_build/html/rst/Io.html
deleted file mode 100644
index c14e25e..0000000
--- a/Doc/newdoc/_build/html/rst/Io.html
+++ /dev/null
@@ -1,250 +0,0 @@
-
-
-
-
-
-
-
-
- the Io module — pNbody v4 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
the Io module
-
-
-pNbody.io. checkfile ( name )
-Check if a file exists. An error is generated if the file
-does not exists.
-
-
-
-
-Parameters : name : the path to a filename
-
-
-
-Examples
->>> io . checkfile ( 'an_existing_file' )
->>>
-
-
->>> io . checkfile ( 'a_non_existing_file' )
-Traceback (most recent call last):
- File "<stdin>" , line 1 , in <module>
- File "/home/epfl/revaz/local/lib64/python2.6/site-packages/pNbody/io.py" , line 33 , in checkfile
- raise IOError ( 915 , 'file %s not found ! Pease check the file name.' % ( name ))
-IOError : [Errno 915] file nofile not found ! Pease check the file name.
-
-
-
-
-
-
-pNbody.io. end_of_file ( f , pio='no' , MPI=None )
-Return True if we have reached the end of the file f, False instead
-
-
-
-
-Parameters : f : ndarray or matrix object
-
-an open file
-
-pio : ‘yes’ or ‘no’
-
-if the file is read in parallel or not
-
-MPI : MPI communicator
-
-
-Returns : status : Bool
-
-True if the we reached the end of the file
-False if not
-
-
-
-
-
-
-
-
-
-pNbody.io. write_array ( file , vec )
-Write an array to a file, in a very simple ascii format.
-
-
-
-
-Parameters : file : the path to a file
-vec : an ndarray object
-
-
-
-
-Examples
->>> from numpy import *
->>> x = array ([ 1 , 2 , 3 ])
->>> io . write_array ( '/tmp/array.dat' , x )
-
-
-
-
-
-
-pNbody.io. read_ascii ( file , columns=None , lines=None , dtype=<type 'float'> , skipheader=False , cchar='#' )
-Read an ascii file.
-The function allows to set the number of columns or line to read.
-If it contains a header, the header is used to label all column. In
-this case, a dictionary is returned.
-
-
-
-
-Parameters : file : the path to a file or an open file
-columns : list
-
-the list of the columns to read
-if none, all columns are read
-
-lines : list
-
-the list of the lines to read
-if none, all lines are read
-
-dtype : dtype
-
-the ndtype of the objects to read
-
-skipheader : bool
-
-if true, do not read the header
-if there is one
-
-cchar : char
-
-lines begining with cchar are skiped
-the first line is considered as the header
-
-
-
-Returns : data : Dict or ndarray
-
-A python dictionary or an ndarray object
-
-
-
-
-
-Examples
->>> from numpy import *
->>> x = arange ( 10 )
->>> y = x * x
->>> f = open ( 'afile.txt' , 'w' )
->>> f . write ( "# x y" )
->>> for i in xrange ( len ( x )):
-... f . write ( ' %g %g ' % ( x [ i ], y [ i ]))
-...
->>> f . close ()
->>> from pNbody import io
->>> data = io . read_ascii ( "afile.txt" )
->>> data [ 'x' ]
-array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
->>> data [ 'y' ]
-array([ 0., 1., 4., 9., 16., 25., 36., 49., 64., 81.])
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/IoModule.html b/Doc/newdoc/_build/html/rst/IoModule.html
index 12a0f73..170f041 100644
--- a/Doc/newdoc/_build/html/rst/IoModule.html
+++ b/Doc/newdoc/_build/html/rst/IoModule.html
@@ -1,319 +1,319 @@
the io module — pNbody v4 documentation
the io module
pNbody.io. checkfile ( name )
Check if a file exists. An error is generated if the file
does not exists.
Parameters : name : the path to a filename
Examples
>>> io . checkfile ( 'an_existing_file' )
>>>
>>> io . checkfile ( 'a_non_existing_file' )
Traceback (most recent call last):
File "<stdin>" , line 1 , in <module>
File "/home/epfl/revaz/local/lib64/python2.6/site-packages/pNbody/io.py" , line 33 , in checkfile
raise IOError ( 915 , 'file %s not found ! Pease check the file name.' % ( name ))
IOError : [Errno 915] file nofile not found ! Pease check the file name.
pNbody.io. end_of_file ( f , pio='no' , MPI=None )
Return True if we have reached the end of the file f, False instead
Parameters : f : ndarray or matrix object
-
+an open file
+
pio : ‘yes’ or ‘no’
-if the file is read in parallel or not
-
+if the file is read in parallel or not
+
MPI : MPI communicator
Returns : status : Bool
-True if the we reached the end of the file
+
True if the we reached the end of the file
False if not
-
+
pNbody.io. write_array ( file , vec )
Write an array to a file, in a very simple ascii format.
Parameters : file : the path to a file
vec : an ndarray object
Examples
>>> from numpy import *
>>> x = array ([ 1 , 2 , 3 ])
>>> io . write_array ( '/tmp/array.dat' , x )
pNbody.io. read_ascii ( file , columns=None , lines=None , dtype=<type 'float'> , skipheader=False , cchar='#' )
Read an ascii file.
The function allows to set the number of columns or line to read.
If it contains a header, the header is used to label all column. In
this case, a dictionary is returned.
Parameters : file : the path to a file or an open file
columns : list
-the list of the columns to read
+
the list of the columns to read
if none, all columns are read
-
+
lines : list
-the list of the lines to read
+
the list of the lines to read
if none, all lines are read
-
+
dtype : dtype
-the ndtype of the objects to read
-
+the ndtype of the objects to read
+
skipheader : bool
-if true, do not read the header
+
if true, do not read the header
if there is one
-
+
cchar : char
-lines begining with cchar are skiped
+
lines begining with cchar are skiped
the first line is considered as the header
-
+
Returns : data : Dict or ndarray
-A python dictionary or an ndarray object
-
+A python dictionary or an ndarray object
+
Examples
>>> from numpy import *
>>> x = arange ( 10 )
>>> y = x * x
>>> f = open ( 'afile.txt' , 'w' )
>>> f . write ( "# x y" )
>>> for i in xrange ( len ( x )):
... f . write ( ' %g %g ' % ( x [ i ], y [ i ]))
...
>>> f . close ()
>>> from pNbody import io
>>> data = io . read_ascii ( "afile.txt" )
>>> data [ 'x' ]
array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
>>> data [ 'y' ]
array([ 0., 1., 4., 9., 16., 25., 36., 49., 64., 81.])
pNbody.io. write_dmp ( file , data )
Write a dmp (pickle) file. In other word,
dump the data object.
Parameters : file : the path to a file
data : a pickable python object
Examples
>>> x = { 'a' : 1 , 'b' : 2 }
>>> io . write_dmp ( '/tmp/afile.dmp' , x )
pNbody.io. read_dmp ( file )
Read a dmp (pickle) file.
Parameters : file : the path to a file
Returns : data : a python object
Examples
>>> x = { 'a' : 1 , 'b' : 2 }
>>> io . write_dmp ( '/tmp/afile.dmp' , x )
>>> y = io . read_dmp ( '/tmp/afile.dmp' )
>>> y
{'a': 1, 'b': 2}
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/LibdiskModule.html b/Doc/newdoc/_build/html/rst/LibdiskModule.html
index 81d6191..c2261bc 100644
--- a/Doc/newdoc/_build/html/rst/LibdiskModule.html
+++ b/Doc/newdoc/_build/html/rst/LibdiskModule.html
@@ -1,143 +1,143 @@
the libdisk module — pNbody v4 documentation
the libdisk module
pNbody.libdisk. Diff ( f , x , s=None , k=2 )
First derivative of f(x)
pNbody.libdisk. get_Integral ( v , dr , ia , ib )
Integrate the vector v, between ia and ib, using trapezes.
v : values of cells (must be 1 dimensional)
dr : corresponding physical size of cells
ia : lower real indice WARNING : the indicies must now be integer !!!
ib : higher real indice WARNING : the indicies must now be integer !!!
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/LibgridModule.html b/Doc/newdoc/_build/html/rst/LibgridModule.html
index 953102b..37e2713 100644
--- a/Doc/newdoc/_build/html/rst/LibgridModule.html
+++ b/Doc/newdoc/_build/html/rst/LibgridModule.html
@@ -1,542 +1,542 @@
the libgrid module — pNbody v4 documentation
the libgrid module
pNbody.libgrid. get_AccelerationMap_On_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax , eps , Tree=None )
Return an array of points containing accelerations
pNbody.libgrid. get_AccumulatedMassMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing M(r) in each cell
pNbody.libgrid. get_Accumulation_Along_Axis ( mat , axis=0 )
Accumulate values along an axis
pNbody.libgrid. get_DensityMap_On_Carthesian_3d_Grid ( nb , nx , ny , nz , xmin , xmax , ymin , ymax , zmin , zmax )
Return an array of points containing density in each cell
pNbody.libgrid. get_DensityMap_On_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax )
Return an array of points containing density in each cell
pNbody.libgrid. get_DensityMap_On_Cylindrical_3d_Grid ( nb , nr , nt , nz , rmax , zmin , zmax )
Return an array of points containing density in each cell
pNbody.libgrid. get_DensityMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing density in each cell
pNbody.libgrid. get_DensityMap_On_Spherical_3d_Grid ( nb , nr , np , nt , rmax )
Return an array of points containing density in each cell
pNbody.libgrid. get_First_Derivative ( f , x , s=None , k=2 )
First derivative of f(x)
pNbody.libgrid. get_GenericMap_On_Spherical_1d_Grid ( nb , nr , rmax , val , f=None , fm=None )
Return an array of points containing mass*val
pNbody.libgrid. get_Integral ( v , dr , ia , ib )
Integrate the vector v, between ia and ib.
v : values of cells (must be 1 dimensional)
dr : corresponding physical size of cells
ia : lower real indice
ib : higher real indice
pNbody.libgrid. get_Interpolation_On_Cylindrical_2dv_Grid ( pos , mat , nr , nz , rmax , zmin , zmax , offr=0 , offz=0 )
Interpolates continuous value of pos, using matrix mat
pNbody.libgrid. get_Interpolation_On_Spherical_1d_Grid ( pos , mat , nr , rmax , offr=0 , f=None , fm=None )
Interpolates continuous value of pos, using matrix mat
pNbody.libgrid. get_LinearDensityMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing the linear density in each cell
pNbody.libgrid. get_MassMap_On_Carthesian_2d_Grid ( nb , nx , ny , xmin , xmax , ymin , ymax )
Return an array of points containing mass of particles
pNbody.libgrid. get_MassMap_On_Carthesian_3d_Grid ( nb , nx , ny , nz , xmin , xmax , ymin , ymax , zmin , zmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_MassMap_On_Cylindrical_2dh_Grid ( nb , nr , nt , rmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_MassMap_On_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_MassMap_On_Cylindrical_3d_Grid ( nb , nr , nt , nz , rmax , zmin , zmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_MassMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing mass of particles
pNbody.libgrid. get_MassMap_On_Spherical_3d_Grid ( nb , nr , np , nt , rmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_NumberMap_On_Carthesian_2d_Grid ( nb , nx , ny , xmin , xmax , ymin , ymax )
Return an array of points containing mass of particles
pNbody.libgrid. get_NumberMap_On_Carthesian_3d_Grid ( nb , nx , ny , nz , xmin , xmax , ymin , ymax , zmin , zmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_NumberMap_On_Cylindrical_2dh_Grid ( nb , nr , nt , rmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_NumberMap_On_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_NumberMap_On_Cylindrical_3d_Grid ( nb , nr , nt , nz , rmax , zmin , zmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_NumberMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing number of particles
pNbody.libgrid. get_NumberMap_On_Spherical_3d_Grid ( nb , nr , np , nt , rmax )
Return an array of points containing mass of particles
pNbody.libgrid. get_Points_On_Carthesian_2d_Grid ( nx , ny , xmin , xmax , ymin , ymax , offx=0 , offy=0 )
Return an array of points corresponding to the center of cells
af a 2d carthesian grid.
To get a nt X nr array from the returned vector (pos), do
x = copy(pos[:,0])
y = copy(pos[:,1])
z = copy(pos[:,2])
x.shape = (nx,ny)
y.shape = (nx,ny)
z.shape = (nx,ny)
pNbody.libgrid. get_Points_On_Carthesian_3d_Grid ( nx , ny , nz , xmin , xmax , ymin , ymax , zmin , zmax , offx=0 , offy=0 , offz=0 )
Return an array of points corresponding to the center of cells
af a 3d carthesian grid.
To get a nt X nr array from the returned vector (pos), do
x = copy(pos[:,0])
y = copy(pos[:,1])
z = copy(pos[:,2])
x.shape = (nx,ny,nz)
y.shape = (nx,ny,nz)
z.shape = (nx,ny,nz)
pNbody.libgrid. get_Points_On_Cylindrical_2dh_Grid ( nr , nt , rmax , offr=0 , offt=0 )
Return an array of points corresponding to the nodes of
a 2d cylindrical grid
To get a nt X nr array from the returned vector (pos), do
x = copy(pos[:,0])
y = copy(pos[:,1])
z = copy(pos[:,2])
x.shape = (nr,nt)
y.shape = (nr,nt)
z.shape = (nr,nt)
# to get r and theta
r = sqrt(x**2+y**2+z**2)
t = arctan2(y,x)*180/pi
pNbody.libgrid. get_Points_On_Cylindrical_2dv_Grid ( nr , nz , rmax , zmin , zmax , offr=0 , offz=0 )
Return an array of points corresponding to the nodes of
a 2d cylindrical grid
To get a nt X nr array from the returned vector (pos), do
x = copy(pos[:,0])
y = copy(pos[:,1])
z = copy(pos[:,2])
x.shape = (nr,nt)
y.shape = (nr,nt)
z.shape = (nr,nt)
# to get r and theta
r = sqrt(x**2+y**2+z**2)
t = arctan2(y,x)*180/pi
pNbody.libgrid. get_Points_On_Cylindrical_3d_Grid ( nr , nt , nz , rmax , zmin , zmax , offr=0 , offt=0 , offz=0 )
Return an array of points corresponding to the nodes of
a 2d cylindrical grid
To get a nt X nr array from the returned vector (pos), do
x = pos[:,0]
y = pos[:,0]
z = pos[:,0]
x.shape = (nr,nt,nz)
y.shape = (nr,nt,nz)
z.shape = (nr,nt,nz)
# to get r and theta
r = sqrt(x**2+y**2+z**2)
t = arctan2(y,x)*180/pi
pNbody.libgrid. get_Points_On_Spherical_1d_Grid ( nr , rmax , offr=0 , f=None , fm=None )
Return an array of points corresponding to the nodes of
a 1d spherical grid
To get a nt X nr array from the returned vector (pos), do
x = pos[:,0]
y = pos[:,0]
z = pos[:,0]
x.shape = (nr,np,nt)
y.shape = (nr,np,nt)
z.shape = (nr,np,nt)
pNbody.libgrid. get_Points_On_Spherical_3d_Grid ( nr , np , nt , rmax , offr=0 , offp=0 , offt=0 )
Return an array of points corresponding to the nodes of
a 3d spherical grid
To get a nt X nr array from the returned vector (pos), do
x = pos[:,0]
y = pos[:,0]
z = pos[:,0]
x.shape = (nr,np,nt)
y.shape = (nr,np,nt)
z.shape = (nr,np,nt)
pNbody.libgrid. get_PotentialMap_On_Carthesian_2d_Grid ( nb , nx , ny , xmin , xmax , ymin , ymax , eps , Tree=None )
Return an array of points containing potential
pNbody.libgrid. get_PotentialMap_On_Carthesian_3d_Grid ( nb , nx , ny , nz , xmin , xmax , ymin , ymax , zmin , zmax , eps , Tree=None )
Return an array of points containing potential
pNbody.libgrid. get_PotentialMap_On_Cylindrical_2dh_Grid ( nb , nr , nt , rmax , eps , Tree=None )
Return an array of points containing potential
pNbody.libgrid. get_PotentialMap_On_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax , eps , Tree=None )
Return an array of points containing potential
pNbody.libgrid. get_PotentialMap_On_Cylindrical_3d_Grid ( nb , nr , nt , nz , rmax , zmin , zmax , eps , Tree=None )
Return an array of points containing potential
pNbody.libgrid. get_PotentialMap_On_Spherical_1d_Grid ( nb , nr , rmax , eps , Tree=None , f=None , fm=None )
Return an array of points containing potential
pNbody.libgrid. get_PotentialMap_On_Spherical_3d_Grid ( nb , nr , np , nt , rmax , eps , Tree=None )
Return an array of points containing potential
pNbody.libgrid. get_SurfaceDensityMap_From_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax )
Return an array of points containing the surface density along r
pNbody.libgrid. get_SurfaceDensityMap_On_Carthesian_2d_Grid ( nb , nx , ny , xmin , xmax , ymin , ymax )
Return an array of points containing density in each cell
pNbody.libgrid. get_SurfaceDensityMap_On_Cylindrical_2dh_Grid ( nb , nr , nt , rmax )
Return an array of points containing density in each cell
pNbody.libgrid. get_SurfaceMap_On_Carthesian_2d_Grid ( nb , nx , ny , xmin , xmax , ymin , ymax )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_SurfaceMap_On_Cylindrical_2dh_Grid ( nb , nr , nt , rmax )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_SurfaceMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing surface (volume)
of each cell.
pNbody.libgrid. get_Symetrisation_Along_Axis ( mat , axis=1 )
Return an array where the two half are symetrized
pNbody.libgrid. get_Symetrisation_Along_Axis_Old ( mat , axis=1 )
Return an array where the two half are symetrized
Old but more correct than new one
pNbody.libgrid. get_VolumeMap_On_Carthesian_3d_Grid ( nb , nx , ny , nz , xmin , xmax , ymin , ymax , zmin , zmax )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_VolumeMap_On_Cylindrical_2dv_Grid ( nb , nr , nz , rmax , zmin , zmax )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_VolumeMap_On_Cylindrical_3d_Grid ( nb , nr , nt , nz , rmax , zmin , zmax )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_VolumeMap_On_Spherical_1d_Grid ( nb , nr , rmax , f=None , fm=None )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_VolumeMap_On_Spherical_3d_Grid ( nb , nr , np , nt , rmax )
Return an array of points containing corresponding physical
volumes of each cell (usefull to compute density)
pNbody.libgrid. get_r_Interpolation_On_Cylindrical_2dv_Grid ( pos , mat , nr , nz , rmax , zmin , zmax , offr=0 )
Interpolates continuous value of pos, using matrix mat
only along first axis.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/LiblogModule.html b/Doc/newdoc/_build/html/rst/LiblogModule.html
index f7e9f79..2bf203e 100644
--- a/Doc/newdoc/_build/html/rst/LiblogModule.html
+++ b/Doc/newdoc/_build/html/rst/LiblogModule.html
@@ -1,146 +1,146 @@
the liblog module — pNbody v4 documentation
the liblog module
class pNbody.liblog. Log ( directory , show='yes' , append='no' , filename=None , logframe=None )
a log class
Methods
close ( )
close the file
write ( line , name=None )
write a line
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/LibmiyamotoModule.html b/Doc/newdoc/_build/html/rst/LibmiyamotoModule.html
index ff066d8..e6743b2 100644
--- a/Doc/newdoc/_build/html/rst/LibmiyamotoModule.html
+++ b/Doc/newdoc/_build/html/rst/LibmiyamotoModule.html
@@ -1,206 +1,206 @@
the libmiyamoto module — pNbody v4 documentation
the libmiyamoto module
pNbody.libmiyamoto. Density ( G , M , a , b , R , z )
Miyamoto-Nagai Density
pNbody.libmiyamoto. Kappa ( G , M , a , b , R )
Miyamoto-Nagai Kappa
pNbody.libmiyamoto. Omega ( G , M , a , b , R )
Miyamoto-Nagai Omega
pNbody.libmiyamoto. Potential ( G , M , a , b , R , z )
Miyamoto-Nagai Potential
pNbody.libmiyamoto. Sigma_t ( G , M , a , b , R , z )
Return sigma_z from Jeans equation : 1/rho Int( rho * dzPhi * dz )
sigma_t^2 = R*d/dr(Phi) + R/rho*d/dr(rho*sigma_z^2)
pNbody.libmiyamoto. Sigma_z ( G , M , a , b , R , z )
Return sigma_z from Jeans equation : 1/rho Int( rho * dzPhi * dz )
pNbody.libmiyamoto. Sigma_zbis ( G , M , a , b , R , z )
Same than Sigma_z, but optimized
pNbody.libmiyamoto. SurfaceDensity ( G , M , a , b , R )
Miyamoto-Nagai Surface density
pNbody.libmiyamoto. Vcirc ( G , M , a , b , R )
Miyamoto-Nagai Circular velocity
pNbody.libmiyamoto. d2R_Potential ( G , M , a , b , R , z )
second derivative in R
pNbody.libmiyamoto. d2z_Potential ( G , M , a , b , R , z )
second derivative in R
pNbody.libmiyamoto. dR_Potential ( G , M , a , b , R , z )
first derivative in R
pNbody.libmiyamoto. dz_Potential ( G , M , a , b , R , z )
first derivative in R
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/LibqtModule.html b/Doc/newdoc/_build/html/rst/LibqtModule.html
index ae60e4c..8df4475 100644
--- a/Doc/newdoc/_build/html/rst/LibqtModule.html
+++ b/Doc/newdoc/_build/html/rst/LibqtModule.html
@@ -1,146 +1,146 @@
the libqt module — pNbody v4 documentation
the libqt module
class pNbody.libqt. QNumarrayImage ( data , palette_name )
QNumarrayImage class
Methods
pNbody.libqt. display ( imagePIL )
display a PIL image
pNbody.libqt. qtplot ( mat , palette='light' )
plot a matrix using qt
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/LibutilModule.html b/Doc/newdoc/_build/html/rst/LibutilModule.html
index 8f0beaa..18d3707 100644
--- a/Doc/newdoc/_build/html/rst/LibutilModule.html
+++ b/Doc/newdoc/_build/html/rst/LibutilModule.html
@@ -1,421 +1,421 @@
the libutil module — pNbody v4 documentation
the libutil module
pNbody.libutil. Extract1dMeanFrom2dMap ( x , y , mass , val , kx , ky , nmin , momentum=0 )
Extract the mean along one axis, from a 2d mean or sigma matrix
x : pos in first dim. (beetween 0 and 1)
y : pos in sec dim. (beetween 0 and 1)
mass : mass of particles
val : value to compute
kx : number of bins in x
ky : number of bins in y
nmin : min number of particles needed to compute value
momentum : 0,1,2 (-1=number)
pNbody.libutil. GetMassMap ( pos , mass , shape )
pNbody.libutil. GetMeanMap ( m0 , m1 )
Return a MeanMap using the 0 and 1 momentum
m0 : zero momentum
m1 : first momentum
pNbody.libutil. GetMeanValMap ( pos , mass , val , shape )
pNbody.libutil. GetNumberMap ( pos , shape )
pNbody.libutil. GetSigmaMap ( m0 , m1 , m2 )
Return a MeanMap using the 0 and 1 and 2 momentum
m0 : zero momentum
m1 : first momentum
m2 : second momentum
pNbody.libutil. GetSigmaValMap ( pos , mass , val , shape )
pNbody.libutil. RotateAround ( angle , axis , point , ObsM )
this should be C
pNbody.libutil. add_box ( matint , shape=(256 , 256) , size=(30.0 , 30.0) , center=None , box_opts=(1 , None , None , 255) )
add a box on the frame
pNbody.libutil. apply_filter ( mat , name=None , opt=None )
Apply a filter to an image
pNbody.libutil. compress_from_lst ( x , num , lst , reject=False )
Return the compression of x
pNbody.libutil. contours ( m , matint , nl , mn , mx , kx , ky , color , crush='no' )
Compute iso-contours on a n x m float array.
If “l_min” equal “l_max”, levels are automatically between the minimum and
maximum values of the matrix “mat”.
m = matrice (real values)
matint = matrice (interger values)
kx = num of sub-boxes
ky = num of sub-boxes
nl = # of levels
mn = min
mx = max
color = color of contours
pNbody.libutil. drawxticks ( matint , m0 , d0 , n0 , h0 , shape , size , center , color )
draw x ticks in a matrix
pNbody.libutil. drawyticks ( matint , m0 , d0 , n0 , h0 , shape , size , center , color )
draw x ticks in a matrix
pNbody.libutil. extract_parameters ( arg , kw , defaultparams )
this function extract parameters given to a function
it returns a dictionary of parameters with respective value
defaultparams : dictionary of default parameters
pNbody.libutil. get_eyes ( x0 , xp , alpha , dr )
Return the position of two eyes.
x0 : position of the head
xp : looking point
theta : rotation of the head
dr : distance of the eyes
pNbody.libutil. get_image ( mat , name=None , palette_name='light' , mode='RGB' )
Return an image (PIL object).
data : numpy 2x2 object
name : name of the output
palette_name : name of a palette
pNbody.libutil. geter ( n , rmin , rmax , g , gm )
Generate a one dimentional non linear array of r
pNbody.libutil. geter2 ( n , rmin , rmax , g , gm )
Generate a one dimentional non linear array of r
pNbody.libutil. getr ( nr=31 , nt=32 , rm=100.0 )
Return a sequence of number (n x 1 array),
where n=nr+1 defined by: Pfenniger & Friedli (1994)
pNbody.libutil. getval ( nb , mode='m' , obs=None )
For each point, return a specific value linked to this point
0 : moment 0
m : moment 0
x : first moment in x
y : first moment in y
z : first moment in z
y2 : second moment in x
y2 : second moment in y
z2 : second moment in z
vx : first velocity moment in x
vy : first velocity moment in y
vz : first velocity moment in z
vx2 : second velocity moment in x
vy2 : second velocity moment in y
vz2 : second velocity moment in z
Lx : kinetic momemtum in x
Ly : kinetic momemtum in y
Lz : kinetic momemtum in z
lx : specific kinetic momemtum in x
ly : specific kinetic momemtum in y
lz : specific kinetic momemtum in z
u : specific energy
rho : density
T : temperature
A : entropy
P : pressure
Tcool : cooling time
Lum : luminosity
Ne : local electro density
# depends on projection
r : first momemtum of radial distance
r2 : second momemtum of radial distance
vr : first momemtum of radial velocity
vr2 : second momemtum of radial velocity
vxyr : first momemtum of radial velocity in the plane
vxyr2 : second momemtum of radial velocity in the plane
vtr : first momemtum of tangential velocity in the plane
vtr2 : second momemtum of tangential velocity in the plane
pNbody.libutil. getvaltype ( mode='m' )
list values that depends on projection
pNbody.libutil. invgetr ( r , nr=31 , nt=32 , rm=100.0 )
From r, return the corresponding indexes.
Inverse of getr function.
pNbody.libutil. log_filter ( x , xmin , xmax , xc , kx=1.0 )
map a value between 0 and kx
pNbody.libutil. log_filter_inv ( k , xmin , xmax , xc , kx=1.0 )
map a value betwen xmin and xmax
pNbody.libutil. mplot ( mat , palette='light' , save=None , marker=None , header=None )
plot a 2d array
pNbody.libutil. myhistogram ( a , bins )
Return the histogram (n x 1 float array) of the
n x 1 array “a”.
“bins” (m x 1 array) specify the bins of the histogram.
pNbody.libutil. phys2img ( shape , size , center , x , y )
convert physical position into the image pixel
pNbody.libutil. sbox ( shape , size , lweight=1 , xticks=None , yticks=None , color=255 )
simple box
return a matrix of integer, containing a box with labels
xticks = (m0,d0,h0,m1,d1,h1)
0 = big
1 = small
m0,m1 = dist between ticks
d0,d1 = first tick
h0,h1 = height of the ticks
pNbody.libutil. set_ranges ( mat , scale='log' , mn=None , mx=None , cd=None )
Transform an n x m float array into an n x m int array that will be
used to create an image. The float values are rescaled and cutted in order to range
between 0 and 255.
mat : the matrice
scale : lin or log
mn : lower value for the cutoff
mx : higer value for the cutoff
cd : parameter
pNbody.libutil. tranfert_functions ( rmin , rmax , g=None , gm=None )
This function computes the normalized tranfer fonction from g and gm
It is very usefull to tranform a linear vetor in a non linear one
example of g:
-g = lambda r:log(r/rc+1)
-gm = lambda r:rc*(exp(r)-1)
+g = lambda r:log(r/rc+1)
+gm = lambda r:rc*(exp(r)-1)
pNbody.libutil. vel_cart2cyl ( pos , vel )
Transform velocities in carthesian coordinates vx,vy,vz into cylindrical
coodinates vr,vz,vz.
Pos is the position of particles in cart. coord.
Vel is the velocity in cart. coord.
Return a 3xn float array.
pNbody.libutil. vel_cyl2cart ( pos=None , vel=None )
Transform velocities in cylindrical coordinates vr,vt,vz into carthesian
coodinates vx,vy,vz.
Pos is the position of particles in cart. coord.
Vel is the velocity in cylindrical coord.
Return a 3xn float array.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Main.html b/Doc/newdoc/_build/html/rst/Main.html
deleted file mode 100644
index 6d268b1..0000000
--- a/Doc/newdoc/_build/html/rst/Main.html
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
-
- the main module — pNbody v4 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
the main module
-
This python module is useful to manipulate N-body data.
-It allows to compute simple pysical values like energy,
-kinetic momentum, intertial momentum, centrer of mass etc.
-It also allows to modify the data with rotation, translations,
-select some particules, add particles etc.
-Associated scripts like “gdisp”, “mkmovie” or “movie” allow
-to visualise the N-body data in different ways : surface density,
-velocity map, velocity dispertion map, etc.
-
Yves Revaz 14.05.05
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/MainModule.html b/Doc/newdoc/_build/html/rst/MainModule.html
index 27b39fc..90e9bbf 100644
--- a/Doc/newdoc/_build/html/rst/MainModule.html
+++ b/Doc/newdoc/_build/html/rst/MainModule.html
@@ -1,1642 +1,1661 @@
the main module — pNbody v4 documentation
the main module
pNbody.main. Nbody ( *arg , **kw )
The aim of this function is simply to return to the right class
class pNbody.main. NbodyDefault ( p_name=None , pos=None , vel=None , mass=None , num=None , tpe=None , ftype=None , status='old' , byteorder='little' , pio='no' , local=False , log=None , unitsfile=None )
This is the reference Nbody class.
This is the constructor for the Nbody object. Optional arguments are:
p_name : name of the file
in case of multiple files, files must be included in a list [“file1”,”file2”]
pos : positions (3xN array)
vel : positions (3xN array)
mass : positions (1x array)
num : id of particles (1xN array)
tpe : type of particles (1xN array)
ftype : type of input file (binary,ascii)
status : ‘old’ : open an old file
‘new’ : create a new object
byteorder : ‘little’ or ‘big’
pio : parallel io : ‘yes’ or ‘no’
local : True=local object, False=global object (paralellized) Not implemeted Yet
log : log file
unitsfile : define the type of units
by default this class initialize the following variables :
-self.p_name : name of the file(s) to read or write
+
self.p_name : name of the file(s) to read or write
self.pos : array of positions
self.vel : array of velocities
self.mass : array of masses
self.num : array of id
self.tpe : array of types
self.ftype : type of the file
self.status : object status (‘old’ or ‘new’)
self.byteorder : byter order (‘little’ or ‘big’)
self.pio : parallel io (‘yes’ or ‘no’)
self.log : log object
# new variables
self.nbody : local number of particles
self.nbody_tot : total number of particles
self.mass_tot : total mass
self.npart : number of particles of each type
self.npart_tot : total number of particles of each type
self.spec_vars : dictionary of variables specific for the format used
self.spec_vect : dictionary of vector specific for the format used
-
+
Methods
A ( )
Return the gas entropy of the model.
The output is an nx1 float array.
Accel ( x , eps )
Return the acceleration at a given position, using the softening lenght eps.
x : position (array vector)
eps : softening
CombiMap ( *arg , **kw )
Return an image in form of a matrix (nx x ny float array).
Contrary to ComputeMap, CombiMap compose different output of ComputeMap.
pos : position of particles (moment 0)
sr : dispertion in r (with respect to xp)
svr : dispertion in vr
vxyr : mean velocity in the plane
svxyr: dispertion in vxy
vtr : mean tangential velocity in the plane
svtr : dispertion in vt
szr : ratio sigma z/sigma r
ComputeDensityAndHsml ( pos=None , Hsml=None , DesNumNgb=None , MaxNumNgbDeviation=None , Tree=None )
Compute Density and Hsml (for a specific place)
ComputeHisto ( bins , mode , space )
Compute and histogram
ComputeMap ( *arg , **kw )
Return an image in form of a matrix (nx x ny float array)
obs : position of observer
x0 : eye position
xp : focal position
alpha : angle of the head
view : ‘xy’ ‘xz’ ‘yz’
eye : ‘right’ ‘left’
dist_eye : distance between eyes
mode : mode of map
space : pos or vel
persp : ‘on’ ‘off’
clip : (near,far)
size : (maxx,maxy)
cut : ‘yes’ ‘no’
frsp : factor for rsp
shape : shape of the map
ComputeMeanHisto ( bins , mode1 , space )
Compute the mean map of an observable.
ComputeMeanMap ( *arg , **kw )
Compute the mean map of an observable.
ComputeObjectMap ( *arg , **kw )
IN DEVELOPPEMENT : allow to draw an object like a box, a grid... * * *
Return an image in form of a matrix (nx x ny float array)
obs : position of observer
x0 : eye position
xp : focal position
alpha : angle of the head
view : ‘xy’ ‘xz’ ‘yz’
eye : ‘right’ ‘left’
dist_eye : distance between eyes
mode : mode of map
space : pos or vel
persp : ‘on’ ‘off’
clip : (near,far)
size : (maxx,maxy)
cut : ‘yes’ ‘no’
frsp : factor for rsp
shape : shape of the map
ComputeSigmaHisto ( bins , mode1 , mode2 , space )
Compute the histogram of an observable.
ComputeSigmaMap ( *arg , **kw )
Compute the sigma map of an observable.
ComputeSph ( DesNumNgb=None , MaxNumNgbDeviation=None , Tree=None )
Compute self.Density and self.Hsml using sph approximation
Ekin ( )
Return the total kinetic energy
Epot ( eps )
Return the total potential energy using the softening lenght eps.
eps : softening
WARNING : THIS FUNCTION DO NOT WORK IN MPI MODE
ExchangeParticles ( )
Exchange particles betwee procs, using peano-hilbert decomposition computed in ptree
+
+
+Get_Velocities_From_AdaptativeSpherical_Grid ( select=None , eps=0.10000000000000001 , n=1000 , UseTree=True , Tree=None , phi=None , ErrTolTheta=0.5 )
+Computes velocities using the jeans equation in spherical coordinates.
+An adaptative grid is set automatically.
+
+
+
+
+Get_Velocities_From_Cylindrical_Grid ( select='disk', disk=('gas', 'disk'), eps=0.10000000000000001, nR=32, nz=32, nt=2, Rmax=100, zmin=-10, zmax=10, params=[None, None, None], UseTree=True, Tree=None, Phi=None, ErrTolTheta=0.5, AdaptativeSoftenning=False, g=None, gm=None )
+Computes velocities using the jeans equation in cylindrical coordinates.
+
+
+
+
+Get_Velocities_From_Spherical_Grid ( select=None , eps=0.10000000000000001 , nr=128 , rmax=100.0 , UseTree=True , Tree=None , phi=None , ErrTolTheta=0.5 , g=None , gm=None , NoDispertion=False , omega=None )
+Computes velocities using the jeans equation in spherical coordinates.
+
+
Get_Velocities_From_Virial_Approximation ( select=None , vf=1.0 , eps=0.10000000000000001 , UseTree=True , Tree=None , ErrTolTheta=0.5 )
-does not work well
+This routine does not work ! Do not use it, or check !
InitSpec ( )
This function allows to initialize specific parameters.
It must be defined in format files.
IntegrateUsingRK ( tstart=0 , dt=1 , dt0=1.0000000000000001e-05 , epsx=1e-13 , epsv=1e-13 )
Integrate the equation of motion using RK78 integrator.
tstart : initial time
dt : interval time
dt0 : inital dt
epsx : position precision
epsv : velocity precision
tmin,tmax,dt,dtout,epsx,epsv,filename
L ( )
Return the angular momentum in x,y,z of all particles.
The output is an 3xn float array.
Ltot ( )
Return the total angular momentum.
The output is an 3x1 float array.
Lum ( )
Return the luminosty of the model, defined as
Lum = m*u/Tcool = m*Lambda/rho
The output is an nx1 float array.
Map ( *arg , **kw )
Return 2 final images (float and int)
MeanWeight ( )
Return the mean weight of a model, taking into account
heating by UV source.
The output is an nx1 float array.
Mr_Spherical ( nr=25 , rmin=0 , rmax=50 )
Return the mass inside radius r (supposing a spherical density distribution).
The output is 2 n x 1 float arrays.
nr : number of bins (size of the output)
rmin : minimal radius (this must be zero, instead it is wrong...)
rmax : maximal radius
Ne ( )
Return the electron density of the model.
The output is an nx1 float array.
P ( )
Return the gas pressure of the model.
The output is an nx1 float array.
Pot ( x , eps )
Return the potential at a given position, using the softening lenght eps.
x : position (array vector)
eps : softening
R ( )
Return a 1xn float array that corresponds to
the projected distance from the center of each particle.
Rho ( )
Return the gas density of the model.
The output is an nx1 float array.
S ( )
Return the entropy of the model, defined as
S = T * Ne^(1-gamma)
The output is an nx1 float array.
SendAllToAll ( )
Send all particles to all nodes
at the end of the day, all nodes have the same nbody object
SphEvaluate ( val , pos=None , vel=None , hsml=None , DesNumNgb=None , MaxNumNgbDeviation=None , Tree=None )
Return an sph evaluation of the variable var
T ( )
Return the gas temperature of the model.
The output is an nx1 float array.
Tcool ( coolingfile=None )
Return the cooling time of the model.
The output is an nx1 float array.
Tmu ( )
Return the gas temperature of the model.
The output is an nx1 float array.
TreeAccel ( pos , eps , Tree=None )
Return the acceleration at a given position, using the softening lenght eps
and using a tree.
pos : position (array vector)
eps : softening
Tree: gravitational tree if already computed
WARNING : this function do not work in parallel
TreePot ( pos , eps , Tree=None )
Return the potential at a given position, using the softening lenght eps
and using a tree.
pos : position (array vector)
eps : softening
Tree: gravitational tree if already computed
WARNING : this function do not work in parallel
U ( )
Return the gas specific energy of the model.
The output is an nx1 float array.
Vr ( )
Return the radial velocies of particles
The output is an 3xn float array.
Vt ( )
Return the tangential velocies of particles
The output is an 3xn float array.
Vz ( )
Return a 1xn float array containing z velocity
align ( axis , mode='a' , sgn='+' , fact=None )
Rotate the object in order to align the axis ‘axis’ with the z axis.
axis : [x,y,z]
mode : ‘p’ : only position
-‘v’ : only velocities
-‘a’ : both (default)
+‘v’ : only velocities
+‘a’ : both (default)
sgn : ‘+’ : normal rotation
‘-‘ : reverse sense of rotation
fact : int : factor to increase the angle
align2 ( axis1=[1, 0, 0], axis2=[0, 0, 1], point=[0, 0, 0] )
Rotate the object in order to align the axis ‘axis’ with the z axis.
axis1 : [x,y,z]
axis2 : [x,y,z]
point : [x,y,z]
align_with_main_axis ( mode='a' )
Rotate the object in order to align it’s major axis with
the axis of its inertial tensor.
mode : ‘p’ : only position
‘v’ : only velocities
‘a’ : both (default)
append ( solf , do_not_sort=False )
Add to the current N-body object, particles form the
N-body object “new”.
solf : Nbody object
cart2sph ( pos=None )
Transform carthesian coodinates x,y,z into spherical
coordinates r,p,t
Return a 3xn float array.
check_arrays ( )
check if the array contains special values like NaN or Inf
cm ( )
Return the mass center of the model.
The output is an 3x1 float array.
cmcenter ( )
Move the N-body object in order
to center the mass center at the origin.
cv ( )
Return the center of the velocities of the model.
The output is an 3x1 float array.
cvcenter ( )
Center the center of velocities at the origin.
dens ( r=None , nb=25 , rm=50 )
Return the number density at radius r (supposing a spherical density distribution).
If r is not specified, it is computed with nb and rm.
The output is an n x 1 float array.
!!! This routine do not use masses !!!
r : radius
nb : number of bins (size of the output)
rm : maximal radius
display ( *arg , **kw )
Display the model
dmodes ( nr=32 , nm=16 , rm=32 )
Compute the density modes of a model
nm = 16 : number of modes
nr = 32 : number of radius
rm = 50 : max radius
return
r : the radius used
m : the modes computed
m1 : the matrix of the amplitude
m2 : the matrix of the phases
dv_mean ( )
Return the average relative speed between particles.
dx_mean ( )
Return the average distance between particles.
ekin ( )
Return the total specific kinetic energy
epot ( eps )
Return the total specific potential energy using the softening lenght eps.
eps : softening
WARNING : THIS FUNCTION DO NOT WORK IN MPI MODE
expose ( obs , eye=None , dist_eye=None , foc=None , space='pos' , pos=None , vel=None )
Rotate and translate the object in order to be seen as if the
observer was in x0, looking at a point in xp.
obs : observer matrix
eye : ‘right’ or ‘left’
dist_eye : distance between eyes (separation = angle)
space : pos or vel
foc : focal
find_vars ( )
This function return a list of variables defined in the current object
gather_mass ( )
Gather in a unique array all mass of all nodes.
gather_num ( )
Gather in a unique array all num of all nodes.
gather_pos ( )
Gather in a unique array all positions of all nodes.
gather_vec ( vec )
Gather in a unique array all vectors vec of all nodes.
gather_vel ( )
Gather in a unique array all velocites of all nodes.
getAccelerationInCylindricalGrid ( eps , z , Rmax , nr=32 , nt=32 , UseTree=False )
Compute the Acceleration in cells of a cylindrical grid
getNumberParticlesInCylindricalGrid ( Rmax , nr=32 , nt=32 )
Compute the number of particles in cells of a cylindrical grid
getPotentialInCylindricalGrid ( eps , z , Rmax , nr=32 , nt=32 , UseTree=False )
Compute the potential in cells of a cylindrical grid
getRadialVelocityDispersionInCylindricalGrid ( Rmax , nr=32 , nt=32 )
Compute the radial velocity dispersion in cells of a cylindrical grid
getRadiusInCylindricalGrid ( z , Rmax , nr=32 , nt=32 )
Compute the radius in cells of a cylindrical grid
getSurfaceDensityInCylindricalGrid ( Rmax , nr=32 , nt=32 )
Compute the surface density in cells of a cylindrical grid
getTree ( force_computation=False , ErrTolTheta=0.80000000000000004 )
Return a Tree object
get_default_spec_vars ( )
return specific variables default values for the class
get_default_spec_vect ( )
return specific vector default values for the class
get_histocenter ( rbox=50 , nb=500 )
Return the position of the higher density region
in x,y,z (not good)
found by the function “histocenter”.
rbox : size of the box
nb : number of bins in each dimension
get_histocenter2 ( rbox=50 , nb=64 )
Return the position of the higher density region
in x,y,z (not good)
found by the function “histocenter”.
rbox : size of the box
nb : number of bins in each dimension
get_list_of_array ( )
Return the list of numpy vectors of size nbody.
get_list_of_method ( )
Return the list of instance methods (functions).
get_list_of_vars ( )
Get the list of vars that are linked to the model
get_mass_tot ( )
Return the total mass of system.
get_mxntpe ( )
Return the max number of type for this format
get_nbody ( )
Return the local number of particles.
get_nbody_tot ( )
Return the total number of particles.
get_npart ( )
Return the local number of particles of each types,
based on the variable tpe
get_npart_all ( npart_tot , NTask )
From npart_tot, the total number of particles per type,
return npart_per_proc, an array where each element corresponds
to the value of npart of each process.
get_npart_and_npart_all ( npart )
From npart (usually read for the header of a file), compute :
npart : number of particles in each type
npart_tot : total number of particles in each type
npart_all : npart for each process.
get_npart_tot ( )
Return the total number of particles of each types.
get_ns ( )
Return in an array the number of particles of each node.
get_ntype ( )
return the number of paticles types
get_num ( )
Compute the num variable in order to be consistent with particles types
get_rotation_matrix_to_align_with_main_axis ( )
Get the rotation matrix used to rotate the object in order to align
it’s main axis with the axis of its inertial tensor.
get_rsp_approximation ( DesNumNgb=None , MaxNumNgbDeviation=None , Tree=None )
Return an aproximation of rsp, based on the tree.
getindex ( num )
Return an array of index of a particle from its specific number id.
The array is empty if no particle corresponds to the specific number id.
num : Id of the particle
has_array ( name )
Return true if the object pNbody has
an array called self.name
has_var ( name )
Return true if the object pNbody has
a variable called self.name
hdcenter ( )
Move the N-body object in order to center the higher
density region found.
histocenter ( rbox=50 , nb=500 )
Move the N-body object in order to center the higher
density region found near the mass center.
The higher density region is determined whith density histograms.
rbox : box dimension, where to compute the histograms
nb : number of bins for the histograms
histocenter2 ( rbox=50 , nb=64 )
Move the N-body object in order to center the higher
density region found near the mass center.
The higher density region is determined whith density histograms.
rbox : box dimension, where to compute the histograms
nb : number of bins for the histograms
histovel ( nb=100 , vmin=None , vmax=None , mode='n' )
Return or plot the histrogram of the norm of velocities or of the radial velocities.
The output is a list (r,h) of 2 nx1 float arrays,
where r is the radius and h the values of the histogram.
nb : number of bins (size of the output)
vmax : maximum velocity
vmin : minimum velocity
mode : ‘n’ (norme of the velocities)
-‘r’ (radial velocities)
+‘r’ (radial velocities)
inertial_tensor ( )
Return the inertial tensor.
info ( )
Write info
init ( )
Initialize normal and specific class variables
init_units ( )
This function is responsible for the units initialization.
It will create :
-self.unitsparameters
+
self.unitsparameters
-
+
that contains parameters like
the hydrogen mass fraction,
the metalicity ionisation flag
the adiabatic index
...
-
-
+
+
and
-self.localsystem_of_units
+
self.localsystem_of_units
-a UnitSystem object that really defines the system of units
+
a UnitSystem object that really defines the system of units
in the Nbody object. It uses the values :
-UnitLength_in_cm
+UnitLength_in_cm
UnitMass_in_g
-UnitVelocity_in_cm_per_s
-
-
+UnitVelocity_in_cm_per_s
+
+
All physical values computed in pNbody should use self.localsystem_of_units to
be converted in other units.
self.unitsparameters is usefull if other parameters needs to be known, like
the adiabatic index, etc.
l ( )
Return the specific angular momentum in x,y,z of all particles.
The output is an 3xn float array.
ltot ( )
Return the specific total angular momentum.
The output is an 3x1 float array.
make_default_vars_global ( )
Make specific variables global
mdens ( r=None , nb=25 , rm=50 )
Return the density at radius r (supposing a spherical density distribution).
If r is not specified, it is computed with nb and rm.
The output is an n x 1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
memory_info ( )
Write info on memory size of the current object (only counting arrays size)
minert ( )
Return the diagonal of the intertial momentum.
mr ( r=None , nb=25 , rm=50 )
Return the mass inside radius r (supposing a spherical density distribution).
If r is not specified, it is computed with nb and rm.
The output is an n x 1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
msdens ( r=None , nb=25 , rm=50 )
Return the mass surface density at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
nodes_info ( )
Write info on nodes
object_info ( )
Write class(object) info
open_and_read ( name , readfct )
open and read file name
name : name of the input
readfct : function used to read the file
open_and_write ( name , writefct )
Open and write file
name : name of the output
writefct : function used to write the file
phi_xy ( )
Return a 1xn float array that corresponds to
the azimuth in cylindrical coordinate of each particle.
phi_xyz ( )
Return a 1xn float array that corresponds to
the azimuth in spherical coordinate of each particle.
print_filenames ( )
Print files names
r ( center=None )
Return a 1xn float array that corresponds to
the distance from the center of each particle.
read ( )
Read the particle file(s)
read_num ( name )
Read a num file
name : name of the input
real_numngb ( num )
number of particles wor wich r<h
rebox ( boxsize=None , mode=None )
Translate the positions of the object in order that all particles
being contained in a box of size boxsize.
boxsize : size of the box
if boxsize is not defined, we try first to see if self.boxsize
is defined.
mode : type of reboxing
None : -> [0,boxsize]
centred : -> [-boxsize/2,boxsize/2]
[x,y,z] :
redistribute ( )
This function redistribute particles amoung all nodes in order to
have a similar number of particles per nodes
reduc ( n , mass=False )
Return an N-body object that contain a fraction 1/n of particles.
n : inverse of the fraction of particule to be returned
rename ( p_name=None )
Rename the files
p_name : new name(s)
rotate ( angle=0, axis=[1, 0, 0], point=[0, 0, 0], mode='a' )
Rotate the positions and/or the velocities of the object around a specific axis
defined by a vector and an point.
angle : rotation angle in radian
axis : direction of the axis
point : center of the rotation
mode : ‘p’ : rotate only position
‘v’ : rotate only velocities
‘a’ : rotate both (default)
rotateR ( R , mode='a' )
Rotate the model using the matrix R
mode : ‘p’ : only position
‘v’ : only velocities
‘a’ : both (default)
rotate_old ( angle=0 , mode='a' , axis='x' )
Rotate the positions and/or the velocities of the object around a specific axis.
angle : rotation angle in radian
axis : ‘x’ : around x
-
-‘y’ : around y
-‘z’ : around z
+
+‘y’ : around y
+‘z’ : around z
: [x,y,z] : around this axis
-
+
mode : ‘p’ : rotate only position
‘v’ : rotate only velocities
‘a’ : rotate both (default)
rxy ( )
Return a 1xn float array that corresponds to
the projected distance from the center of each particle.
rxyz ( center=None )
Return a 1xn float array that corresponds to
the distance from the center of each particle.
sdens ( r=None , nb=25 , rm=50 )
Return the surface density at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
!!! This routine do not uses masses !!!
r : radius
nb : number of bins (size of the output)
rm : maximal radius
select ( i=0 )
Return an N-body object that contain only particles of type i
selectc ( c , local=False )
Return an N-body object that contain only particles where the
corresponding value in c is not zero.
c is a nx1 Nbody array.
c : the condition vector
local : local selection (True) or global selection (False)
selecti ( i , local=False )
Return an N-body object that contain only particles having
their index (not id) in i.
i : vector containing indexes
local : local selection (True) or global selection (False)
selectp ( lst=None , file=None , reject=False , local=False , from_num=True )
Return an N-body object that contain only particles with specific number id.
The list of id’s is given either by lst (nx1 int array) or
by the name (“file”) of a file containing the list of id’s.
lst : vector list (integer)
reject : True/False : if True, reject particles in lst (default = False)
local : local selection (True) or global selection (False)
frum_num : if True, use self.num to select particules
if False, use arange(self.nbody)
set_filenames ( p_name , pio=None )
Set the local and global names
p_name : new name(s)
pio : ‘yes’ or ‘no’
set_ftype ( ftype='binary' )
Change the type of the file
ftype : type of the file
set_local_system_of_units ( params=None , UnitLength_in_cm=None , UnitVelocity_in_cm_per_s=None , UnitMass_in_g=None , unitparameterfile=None , gadgetparameterfile=None )
Set local system of units using UnitLength_in_cm,UnitVelocity_in_cm_per_s,UnitMass_in_g
if nothing is given, we use self.unitsparameters to obtain these values
if UnitLength_in_cm
UnitVelocity_in_cm_per_s
UnitMass_in_g
are given, we use them
2b) if UnitLength_in_cm,UnitVelocity_in_cm_per_s,UnitMass_in_g
are given in a dictionary
if unitparameterfile is given we read the parameters from the file (units parameter format)
if gadgetparameterfile is given we read the parameters from the file (gadget param format)
set_npart ( npart )
Set the local number of particles of each types.
This function modifies the variable self.tpe
set_parameters ( params )
Set parameters for the class
set_pio ( pio )
Set parallel input/output or not io
pio : ‘yes’ or ‘no’
set_tpe ( tpe )
Set all particles to the type tpe
set_unitsparameters ( unitsparams )
Set units parameters for the class.
show ( *arg , **kw )
Display the model
this is an alias to display
sigma ( r=None , nb=25.0 , rm=50.0 )
Return the 3 velocity dispersion (in cylindrical coordinates) and the mean azimuthal velocity curve.
If r is not specified, it is computed with nb and rm.
The output is a list (r,sr,st,sz,mt) of 5 $n imes 1$ float arrays,
where r is the radius, sr the radial velocity dispersion, st, the azimuthal velocity dispersion,
sz, the vertical velocity dispersion and mt, the mean azimuthal velocity curve.
!!! This routine works only if particles have equal masses !!!
r : radius where to compute the values
nb : number of bins (size of the output)
rm : maximal radius
return : r,sr,st,sz,mt
sigma_vz ( r=None , nb=25 , rm=50 )
Return the vertical dispertion in z at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
sigma_z ( r=None , nb=25 , rm=50 )
Return the vertical dispertion in z at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
size ( )
Estimate the model size, using the inertial momentum
sort ( )
sort particles according to their num variable
sort_type ( )
Contrary to sort, this fonction sort particles
respecting their type.
spec_info ( )
Write specific info
sph2cart ( pos=None )
Transform spherical coordinates r,p,t into carthesian
coodinates x,y,z
Return a 3xn float array.
spin ( omega=None , L=None , j=None , E=None )
Spin the object with angular velocity “omega” (rigid rotation).
Omega is a 1 x 3 array object
If L (total angular momentum) is explicitely given, compute Omega from L (1 x 3 array object).
omega : angular speed (array vector)
L : desired angular momentum
j : desired energy fraction in rotation
E : Total energy (without rotation)
sub ( n1=0 , n2=None )
Return an N-body object that have particles whith indicies in the range [n1:n2].
n1 : number of the first particule
n2 : number of the last particule
Note : the first particle is 0
theta_xyz ( )
Return a 1xn float array that corresponds to
the elevation angle in spherical coordinate of each particle.
tork ( acc )
Return the total tork on the system due to the force
acting on each particle (acc).
The output is an 3xn float array.
acc : 3xn float array
translate ( dx , mode='p' )
Translate the positions or the velocities of the object.
dx : shift (array vector)
mode : ‘p’ : translate positions
-‘v’ : translate velocities
+‘v’ : translate velocities
usual_numngb ( num )
usual way to compute the number of neighbors
v_sigma ( )
Return the norm of the velocity dispersions.
vel_cart2cyl ( )
Transform velocities in carthesian coordinates vx,vy,vz into cylindrical
coodinates vr,vz,vz.
Pos is the position of particles in cart. coord.
Vel is the velocity in cart. coord.
Return a 3xn float array.
vel_cyl2cart ( pos=None , vel=None )
Transform velocities in cylindrical coordinates vr,vt,vz into carthesian
coodinates vx,vy,vz.
Pos is the position of particles in cart. coord.
Vel is the velocity in cylindrical coord.
Return a 3xn float array.
vn ( )
Return a 1xn float array that corresponds to
the norm of velocities
vrxyz ( )
Return a 1xn float array that corresponds to
the radial velocity in spherical system
vx ( )
Return a 1xn float array containing x velocity
vy ( )
Return a 1xn float array containing y velocity
vz ( )
Return a 1xn float array containing z velocity
weighted_numngb ( num )
num = particle where to compute weighted_numngb
see Springel 05
write ( )
Write the particle file(s)
write_num ( name )
Write a num file
name : name of the output
x ( )
Return a 1xn float array containing x coordinate
x_sigma ( )
Return the norm of the position dispersions.
y ( )
Return a 1xn float array containing y coordinate
z ( )
Return a 1xn float array containing z coordinate
zmodes ( nr=32 , nm=16 , rm=32 )
Compute the vertical modes of a model
nm = 16 : number of modes
nr = 32 : number of radius
rm = 50 : max radius
return
r : the radius used
m : the modes computed
m1 : the matrix of the amplitude
m2 : the matrix of the phases
zprof ( z=None , r=2.5 , dr=0.5 , nb=25 , zm=5.0 )
Return the z-profile in a vector for a given radius
!!! This routine works only if particles have equal masses !!!
z : bins in z (optional)
r : radius of the cut
dr : width in r of the cut
nb : number of bins (size of the output)
zm : maximal height
class pNbody.main. Nbody_default ( p_name=None , pos=None , vel=None , mass=None , num=None , tpe=None , ftype=None , status='old' , byteorder='little' , pio='no' , local=False , log=None , unitsfile=None )
This class is usefull to create an empty Nbody object
Methods
pNbody.main. get_known_formats ( )
return the name of known Nbody formats
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/MontecarloModule.html b/Doc/newdoc/_build/html/rst/MontecarloModule.html
deleted file mode 100644
index a432986..0000000
--- a/Doc/newdoc/_build/html/rst/MontecarloModule.html
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
-
-
-
- the montecarlo module — pNbody v4 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
the montecarlo module
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/MovieModule.html b/Doc/newdoc/_build/html/rst/MovieModule.html
index d2339da..5874b65 100644
--- a/Doc/newdoc/_build/html/rst/MovieModule.html
+++ b/Doc/newdoc/_build/html/rst/MovieModule.html
@@ -1,161 +1,161 @@
the Movie module — pNbody v4 documentation
the Movie module
class pNbody.Movie. Movie ( name , mode=None )
a Movie class
Methods
get_img ( data )
can be replaced by read_one with option “image”
info ( )
give info
open ( mode='r' , readall=0 )
open a file
read ( skip=0 , mode='array' )
skip = 0 : read image at the current position
skip = 1 : skip an image
skip = -1 : read the image before (go back)
skip = -2 : skip an image before (go back)
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/MpiModule.html b/Doc/newdoc/_build/html/rst/MpiModule.html
index d9b20d2..360e942 100644
--- a/Doc/newdoc/_build/html/rst/MpiModule.html
+++ b/Doc/newdoc/_build/html/rst/MpiModule.html
@@ -1,347 +1,347 @@
the mpi module — pNbody v4 documentation
the mpi module
pNbody.mpi. mpi_AllgatherAndConcatArray ( vec )
AllGather array vec and concatenate it in a unique array
(concatenation order is reversed).
pNbody.mpi. mpi_ExchangeFromTable ( T , procs , ids , vec , num )
Exchange an array according to a transfer array T
T : exchange table
procs : list of processor (from Tree.GetExchanges())
ids : list of id (from Tree.GetExchanges())
vec : vector to exchange
num : id correspondings to particles
pNbody.mpi. mpi_GatherAndWriteArray ( f , data , byteorder='little' , npart=None )
Gather and array and write it in a binary block.
data = array
shape = tuple
pNbody.mpi. mpi_GetExchangeTable ( n_i )
This function returns the exchange table
pNbody.mpi. mpi_OldGatherAndWriteArray ( f , data , byteorder='little' , nlocal=None )
Gather and array and write it in a binary block.
data = array
shape = tuple
pNbody.mpi. mpi_OldReadAndSendArray ( f , data_type , shape=None , skip=None , byteorder='little' , nlocal=None )
Read and Brodcast a binary block assuming it contains an array.
The array is splitted acroding to the variable nlocal.
data_type = array type
shape = tuple
nlocal : array NTask x Npart
array NTask
pNbody.mpi. mpi_ReadAndSendArray ( f , data_type , shape=None , byteorder='little' , npart=None )
Read and Brodcast a binary block assuming it contains an array.
pNbody.mpi. mpi_ReadAndSendBlock ( f , data_type , shape=None , byteorder='little' , split=None )
Read and brodcast a binary block.
data_type = int,float32,float
or
data_type = array
shape = tuple
pNbody.mpi. mpi_allgather ( x )
Gather x from all to all.
Returns a list.
-pNbody.mpi. mpi_allreduce ( x , op=<mpi4py.MPI.Op object at 0x3aaa420> )
+pNbody.mpi. mpi_allreduce ( x , op=<mpi4py.MPI.Op object at 0x2fd74e0> )
Reduce x from all node for all nodes.
When there is only one is defined, the function return x.
pNbody.mpi. mpi_arange ( n )
Create an integer array containing elements from 0 to n
spreaded over all nodes.
pNbody.mpi. mpi_argmax ( x )
Find the arument of the amximum value in x.
idx = (p,i) : where i = index in proc p
pNbody.mpi. mpi_argmin ( x )
Find the arument of the maximum value in x.
idx = (p,i) : where i = index in proc p
pNbody.mpi. mpi_bcast ( x , root=0 )
Broadcast from node root the variable x.
When there is only one is defined, it simplay returns x.
pNbody.mpi. mpi_find_a_toTask ( begTask , fromTask , ex_table , delta_n )
This function is used to find recursively an exange table
pNbody.mpi. mpi_gather ( x , root=0 )
Gather x from all nodes to node dest.
Returns a list.
pNbody.mpi. mpi_getval ( x , idx )
Return the value of array x corresponding to the index idx.
idx = (p,i) : where i = index in proc p
equivalent to x[i] from proc p
pNbody.mpi. mpi_histogram ( x , bins )
Return an histogram of vector x binned using binx.
pNbody.mpi. mpi_iprint ( msg , mode=None )
Synchronized print, including info on node.
pNbody.mpi. mpi_len ( x )
Lenght of array x.
pNbody.mpi. mpi_max ( x )
Maximum element of array x.
pNbody.mpi. mpi_mean ( x )
Mean of elements of array x.
pNbody.mpi. mpi_min ( x )
Minimum element of array x.
pNbody.mpi. mpi_pprint ( msg )
Synchronized print.
pNbody.mpi. mpi_recv ( source )
Return a variable sent by node ar{source}.
When there is only one is defined, it does nothing.
-pNbody.mpi. mpi_reduce ( x , root=0 , op=<mpi4py.MPI.Op object at 0x3aaa420> )
+pNbody.mpi. mpi_reduce ( x , root=0 , op=<mpi4py.MPI.Op object at 0x2fd74e0> )
Reduce x from all node only for root.
When there is only one is defined, the function return x.
pNbody.mpi. mpi_rprint ( msg )
Rooted print.
pNbody.mpi. mpi_sarange ( npart_all )
Create an integer array containing elements from 0 to n,
spreaded over all nodes. The repartition of elements and
type of elements over nodes is given by the array npart_all
pNbody.mpi. mpi_send ( x , dest )
Send x to node dest.
When there is only one is defined, it does nothing.
pNbody.mpi. mpi_sendrecv ( x , dest , source )
pNbody.mpi. mpi_sum ( x )
Sum elements of array x.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Overview.html b/Doc/newdoc/_build/html/rst/Overview.html
index 231f7dc..77d0132 100644
--- a/Doc/newdoc/_build/html/rst/Overview.html
+++ b/Doc/newdoc/_build/html/rst/Overview.html
@@ -1,138 +1,138 @@
Overview — pNbody v4 documentation
Overview
pNbody is a parallelized python module toolbox designed to manipulate and display
interactively very lage N-body systems.
Its oriented object approche allows the user to perform complicate manipulation
with only very few commands.
As python is an interpreted language, the user can load an N-body system and explore it
interactively using the python interpreter. pNbody may also be used in python scripts.
The module also contains graphical facilities desinged to create maps of physical values of
the system, like density maps, temperture maps, velocites maps, etc. Stereo capabilities are
also implemented.
pNbody is not limited by file format. Each user may redefine in a parameter file how to read
its prefered format.
Its new parallel (mpi) facilities make it works on computer cluster without being limitted by
memory consumption. It has already been tested with several millions of particles.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/PaletteModule.html b/Doc/newdoc/_build/html/rst/PaletteModule.html
index 392fdb2..01272c4 100644
--- a/Doc/newdoc/_build/html/rst/PaletteModule.html
+++ b/Doc/newdoc/_build/html/rst/PaletteModule.html
@@ -1,134 +1,134 @@
the palette module — pNbody v4 documentation
the palette module
this module is used to deal with color palettes.
-pNbody.palette. readlut ( filename='/home/revaz/.pNbody/rgb_tables/light' )
+pNbody.palette. readlut ( filename='/home/epfl/revaz/.pNbody/rgb_tables/light' )
Read a lut file.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/ParamModule.html b/Doc/newdoc/_build/html/rst/ParamModule.html
index aa0ea66..e65daa2 100644
--- a/Doc/newdoc/_build/html/rst/ParamModule.html
+++ b/Doc/newdoc/_build/html/rst/ParamModule.html
@@ -1,195 +1,195 @@
the param module — pNbody v4 documentation
the param module
class pNbody.param. Params ( filename , master )
params = [[‘imwidth’,’image width’,’i’,512],
[‘imheight’,’image height’,’i’,384],
[‘winwidth’,’window width’,’f’,50.],
[‘winheight’,’window height’,’f’,37.5]]
Methods
get ( name )
return the value of a parameter
get_dic ( )
return values of parameters in a dictionary
get_string ( name )
return the value of a parameter in a string
get_type ( name )
return the type of a parameter
lists ( )
print the list of the content of the class
save ( filename=None )
[‘cd’, ‘cd’, ‘Float’, 0.0]
set ( name , value )
set the value of a parameter
pNbody.param. read_ascii_value ( value , tpe , name )
from a name and type, return
an object corresponding to the value given
pNbody.param. write_ascii_value ( value , tpe , name )
from a name and type and value, return
an ascii representation of the object
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/ParameterModule.html b/Doc/newdoc/_build/html/rst/ParameterModule.html
index 7bfb166..6e4b0d4 100644
--- a/Doc/newdoc/_build/html/rst/ParameterModule.html
+++ b/Doc/newdoc/_build/html/rst/ParameterModule.html
@@ -1,127 +1,127 @@
the parameters module — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/PhotModule.html b/Doc/newdoc/_build/html/rst/PhotModule.html
index 5a91f2e..739c123 100644
--- a/Doc/newdoc/_build/html/rst/PhotModule.html
+++ b/Doc/newdoc/_build/html/rst/PhotModule.html
@@ -1,145 +1,145 @@
the phot module — pNbody v4 documentation
the phot module
pNbody.phot. LvtoMv ( Lv , Mvsun=4.8300000000000001 , Lvsun=1.0 )
Lv : V-band luminosity in solar luminosity unit
Mvsun : magnitude of the sun in V-band
Lvsun : V-band solar luminosity in solar luminosity unit
Return the magnitude in V-band
pNbody.phot. MvtoLv ( Mv , Mvsun=4.8300000000000001 , Lvsun=1.0 )
Mv : magnitude in V-band
Mvsun : magnitude of the sun in V-band
Lvsun : V-band solar luminosity in solar luminosity unit
Return the corresponding V-band luminosity in solar luminosity unit.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/PlummerModule.html b/Doc/newdoc/_build/html/rst/PlummerModule.html
index 4f2bd64..9bc0053 100644
--- a/Doc/newdoc/_build/html/rst/PlummerModule.html
+++ b/Doc/newdoc/_build/html/rst/PlummerModule.html
@@ -1,164 +1,164 @@
the plummer module — pNbody v4 documentation
the plummer module
plummer model
pNbody.plummer. Density ( G , M , a , r )
Plummer Density
pNbody.plummer. LDensity ( G , M , a , r )
Plummer Linear Density
pNbody.plummer. Potential ( G , M , a , r )
Plummer Potential
pNbody.plummer. Sigma ( G , M , a , r )
Return sigma (radial) from Jeans equation : 1/rho Int( rho * drPhi * dr )
pNbody.plummer. Vcirc ( G , M , a , r )
Plummer circular velocity
pNbody.plummer. dPotential ( G , M , a , r )
Plummer first derivative of Potential
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Prerequiste.html b/Doc/newdoc/_build/html/rst/Prerequiste.html
index e4eeaff..1fed86b 100644
--- a/Doc/newdoc/_build/html/rst/Prerequiste.html
+++ b/Doc/newdoc/_build/html/rst/Prerequiste.html
@@ -1,163 +1,163 @@
Prerequiste — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/ProfilesModule.html b/Doc/newdoc/_build/html/rst/ProfilesModule.html
index ff28702..3598c56 100644
--- a/Doc/newdoc/_build/html/rst/ProfilesModule.html
+++ b/Doc/newdoc/_build/html/rst/ProfilesModule.html
@@ -1,304 +1,304 @@
the profiles module — pNbody v4 documentation
the profiles module
pNbody.profiles. burkert_mr ( r , rs , rho0=1.0 )
Burkert profile
rhob = rho0 / ( ( 1 + r/rs ) * ( 1 + (r/rs)**2 ) )
Burkert, Astrophys. J. 447 (1995) L25.
pNbody.profiles. burkert_profile ( r , rs , rho0=1.0 )
Burkert profile
rhob = rho0 / ( ( 1 + r/rs ) * ( 1 + (r/rs)**2 ) )
Burkert, Astrophys. J. 447 (1995) L25.
pNbody.profiles. generic2c_mr ( r , rs , a , b , rho0=1.0 )
Mass in the radius r for the distribution
rho = 1/( (r/rs)**a * (1+r/rs)**(b-a) )
pNbody.profiles. generic2c_profile ( r , rs , a , b , rho0=1.0 )
generic2c profile
rho = 1/( (r/rs)**a * (1+r/rs)**(b-a) )
pNbody.profiles. hernquist_mR ( R , rs , rho0=1 )
Mass in the projected radius R for the distribution
rho = 1/( (r/rs) * (1+r/rs)**3 )
(Hernquist 90, Eq. 37)
Warning : the function diverges in r=0 and r/rs=1.
Warning : it is badly implemented for arrays
pNbody.profiles. hernquist_mr ( r , rs , rho0=1.0 )
Mass in the radius r for the distribution
rho = 1/( (r/rs) * (1+r/rs)**3 )
pNbody.profiles. hernquist_profile ( r , rs , rho0=1.0 )
hernquist profile
rho = 1/( (r/rs) * (1+r/rs)**3 )
pNbody.profiles. jaffe_mr ( r , rs , rho0=1.0 )
Mass in the radius r for the distribution
rho = 1/( (r/rs)**2 * (1+r/rs)**2 )
pNbody.profiles. jaffe_profile ( r , rs , rho0=1.0 )
jaffe profile
rho = 1/( (r/rs)**2 * (1+r/rs)**2 )
pNbody.profiles. king_Rc ( rs , rt )
Core radius
Find R such that
Sigma(Rc) = Sigma(0)/2.
pNbody.profiles. king_profile ( r , rs , rt )
King profile
(see King 62)
pNbody.profiles. king_profile_Rz ( R , z , rs , rt )
King profile in cyclindrical coord (needed for surface density computation)
(see King 62)
pNbody.profiles. king_surface_density ( R , rs , rt )
Surface density of King profile
(see King 62)
pNbody.profiles. king_surface_density_old ( R , rs , rt )
Obsolete implementation
pNbody.profiles. nfw_mr ( r , rs , rho0=1.0 )
Mass in the radius r for the distribution
rho = rho0/((r/rs)*(1+r/rs)**2)
pNbody.profiles. nfw_profile ( r , rs , rho0=1.0 )
NFW profile
rho = rho0/((r/rs)*(1+r/rs)**2)
pNbody.profiles. nfwg_mr ( r , rs , gamma , rho0=1.0 )
Mass in the radius r for the distribution
rho = rho0/((r/rs)**(gamma)*(1+(r/rs)**2)**(0.5*(3.-gamma)))
pNbody.profiles. nfwg_profile ( r , rs , gamma , rho0=1.0 )
NFW modified profile
rho = rho0/((r/rs)**(gamma)*(1+(r/rs)**2)**(0.5*(3.-gamma)))
pNbody.profiles. nfws_mr ( r , rhos , rs , r0 )
Mass in the radius r for the distribution
rho = rhos/((r/rs)*(1+r/rs)**2)
pNbody.profiles. nfws_profile ( r , rhos , rs , r0 )
NFW softened profile
rho = rhos/(((r+r0)/rs)*(1+r/rs)**2)
pNbody.profiles. pisothm_mr ( r , rs , rho0=1.0 )
Mass in the radius r for the distribution
rho = 1/(1+(r/rs)**2)
pNbody.profiles. pisothm_profile ( r , rs , rho0=1.0 )
Pseudo-isothermal profile
rho = 1/(1+(r/rs)**2)
pNbody.profiles. plummer_mr ( r , rc , rho0=1.0 )
Mass in the radius r for the distribution
rho = 1/(1+(r/rc)**2)**(5/2)
pNbody.profiles. plummer_profile ( r , rc , rho0=1.0 )
Plummer profile
rho = 1/(1+(r/rc)**2)**(5/2)
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/PyfitsModule.html b/Doc/newdoc/_build/html/rst/PyfitsModule.html
index 86948e9..8a6bb79 100644
--- a/Doc/newdoc/_build/html/rst/PyfitsModule.html
+++ b/Doc/newdoc/_build/html/rst/PyfitsModule.html
@@ -1,891 +1,891 @@
the pyfits module — pNbody v4 documentation
the pyfits module
A module for reading and writing FITS files and manipulating their contents.
A module for reading and writing Flexible Image Transport System
(FITS) files. This file format was endorsed by the International
Astronomical Union in 1999 and mandated by NASA as the standard format
for storing high energy astrophysics data. For details of the FITS
standard, see the NASA/Science Office of Standards and Technology
publication, NOST 100-2.0.
License: http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE
For detailed examples of usage, see the I{PyFITS User’s Manual} available from
U{http://www.stsci.edu/resources/software_hardware/pyfits/Users_Manual1.pdf }
Epydoc markup used for all docstrings in this module.
@group Header-related Classes: Card, CardList, _Card_with_continue,
Header, _Hierarch
@group HDU Classes: _AllHDU, BinTableHDU, _CorruptedHDU, _ExtensionHDU,
GroupsHDU, ImageHDU, _ImageBaseHDU, PrimaryHDU, TableHDU,
_TableBaseHDU, _TempHDU, _ValidHDU
@group Table-related Classes: ColDefs, Column, FITS_rec, _FormatP,
_FormatX, _VLF
class pNbody.pyfits. BinTableHDU ( data=None , header=None , name=None )
Binary table HDU class.
Methods
class pNbody.pyfits. CardList ( cards= [ ] , keylist=None )
FITS header card list class.
Methods
append ( card , useblanks=1 , bottom=0 )
Append a Card to the CardList.
card: The Card to be appended.
useblanks: Use any extra blank cards? default=1.
-If useblanks != 0, and if there are blank cards directly
+If useblanks != 0, and if there are blank cards directly
before END, it will use this space first, instead of
appending after these blank cards, so the total space
will not increase (default). When useblanks == 0, the
card will be appended at the end, even if there are
-blank cards in front of END.
+blank cards in front of END.
bottom: If =0 (default) the card will be appended after the last
non-commentary card. If =1, the card will be appended
after the last non-blank card.
copy ( )
Make a (deep)copy of the CardList.
count_blanks ( )
Find out how many blank cards are directly before the END card.
index_of ( key , backward=0 )
Get the index of a keyword in the CardList.
key: the keyword name (a string) or the index (an integer).
backward: search the index from the END, i.e. backward? default=0.
-If backward = 1, search from the end.
+If backward = 1, search from the end.
insert ( pos , card , useblanks=1 )
Insert a Card to the CardList.
pos: The position (index, keyword name will not be allowed) to
insert. The new card will be inserted before it.
card: The Card to be inserted.
useblanks: Use any extra blank cards? default=1.
-If useblanks != 0, and if there are blank cards directly
+If useblanks != 0, and if there are blank cards directly
before END, it will use this space first, instead of
appending after these blank cards, so the total space
will not increase (default). When useblanks == 0, the
card will be appended at the end, even if there are
-blank cards in front of END.
+blank cards in front of END.
keys ( )
Return a list of all keywords from the CardList.
class pNbody.pyfits. ColDefs ( input , tbtype='BinTableHDU' )
Column definitions class. It has attributes corresponding to the
Column attributes (e.g. ColDefs has the attribute .names while Column
has .name), Each attribute in ColDefs is a list of corresponding
attribute values from all Columns.
Methods
add_col ( column )
Append one Column to the column definition.
change_attrib ( col_name , attrib , new_value )
Change an attribute (in the commonName list) of a Column.
change_name ( col_name , new_name )
Change a Column’s name.
change_unit ( col_name , new_unit )
Change a Column’s unit.
del_col ( col_name )
Delete (the definition of) one Column.
info ( attrib='all' )
Get attribute(s) information of the column definition.
class pNbody.pyfits. Column ( name=None , format=None , unit=None , null=None , bscale=None , bzero=None , disp=None , start=None , dim=None , array=None )
Column class which contains the definition of one column, e.g.
ttype, tform, etc. and the array. Does not support theap yet.
Methods
class pNbody.pyfits. Delayed ( hdu=None , field=None )
Delayed file-reading data.
class pNbody.pyfits. ErrorURLopener ( *args , **kwargs )
A class to use with urlretrieve to allow IOError exceptions to be
raised when a file specified by a URL cannot be accessed
Methods
class pNbody.pyfits. FITS_rec
FITS record array class. FITS record array is the data part of a
table HDU’s data part. This is a layer over the recarray, so we
can deal with scaled columns.
Methods
field ( key )
A view of a Column’s data as an array.
class pNbody.pyfits. FITS_record ( input , row=0 )
FITS record class. FITS record class is used to access records of
the FITS_rec object. This will allow us to deal with scaled columns.
The FITS_record class expects a FITS_rec object as input
Methods
field ( fieldName )
Get the field data of the record.
setfield ( fieldName , value )
Set the field data of the record.
class pNbody.pyfits. GroupData
Random groups data object.
Allows structured access to FITS Group data in a manner analogous to tables
Methods
par ( parName )
Get the group parameter values.
setpar ( parName , value )
Set the group parameter values.
class pNbody.pyfits. GroupsHDU ( data=None , header=None , name=None )
FITS Random Groups HDU class.
Methods
size ( )
Returns the size (in bytes) of the HDU’s data part.
class pNbody.pyfits. HDUList ( hdus= [ ] , file=None )
HDU list class. This is the top-level FITS object. When a FITS
file is opened, a HDUList object is returned.
Methods
append ( hdu )
Append a new HDU to the HDUList.
close ( output_verify='exception' , verbose=0 )
Close the associated FITS file and memmap object, if any.
output_verify: output verification option, default = ‘exception’.
verbose: print out verbose messages? default = 0.
This simply calls the close method of the _File class. It has this
two-tier calls because _File has ts own private attribute __file.
flush ( output_verify='exception' , verbose=0 , classExtensions={} )
Force a write of the HDUList back to the file (for append and
update modes only).
output_verify: output verification option, default = ‘exception’.
verbose: print out verbose messages? default = 0.
classExtensions: A dictionary that maps pyfits classes to extensions
-of those classes. When present in the dictionary,
+of those classes. When present in the dictionary,
the extension class will be constructed in place of
-the pyfits class.
+the pyfits class.
index_of ( key )
Get the index of an HDU from the HDUList. The key can be an
integer, a string, or a tuple of (string, integer).
info ( )
Summarize the info of the HDU’s in this HDUList.
readall ( )
Read data of all HDU’s into memory.
update_extend ( )
Make sure if the primary header needs the keyword EXTEND or if
it has the proper value.
update_tbhdu ( )
Update all table HDU’s for scaled fields.
writeto ( name , output_verify='exception' , clobber=False , classExtensions={} )
Write the HDUList to a new file.
name: output FITS file name to be written to.
output_verify: output verification option, default = ‘exception’.
clobber: Overwrite the output file if exists, default = False.
classExtensions: A dictionary that maps pyfits classes to extensions
-of those classes. When present in the dictionary,
+of those classes. When present in the dictionary,
the extension class will be constructed in place of
-the pyfits class.
+the pyfits class.
class pNbody.pyfits. Header ( cards= [ ] )
FITS header class.
Methods
add_blank ( value='' , before=None , after=None )
Add a blank card.
value: Text to be added.
before: [same as in update()]
after: [same as in update()]
add_comment ( value , before=None , after=None )
Add a COMMENT card.
value: Comment text to be added.
before: [same as in update()]
after: [same as in update()]
add_history ( value , before=None , after=None )
Add a HISTORY card.
value: History text to be added.
before: [same as in update()]
after: [same as in update()]
ascardlist ( )
Returns a CardList.
copy ( )
Make a copy of the Header.
get ( key , default=None )
Get a keyword value from the CardList.
If no keyword is found, return the default value.
key: keyword name or index
default: if no keyword is found, the value to be returned.
get_comment ( )
Get all comments as a list of string texts.
get_history ( )
Get all histories as a list of string texts.
has_key ( key )
Check for existence of a keyword. Returns 1 if found, otherwise, 0.
key: keyword name. If given an index, always returns 0.
items ( )
Return a list of all keyword-value pairs from the CardList.
rename_key ( oldkey , newkey , force=0 )
Rename a card’s keyword in the header.
oldkey: old keyword, can be a name or index.
newkey: new keyword, must be a string.
force: if new key name already exist, force to have duplicate name.
update ( key , value , comment=None , before=None , after=None )
Update one header card.
class pNbody.pyfits. ImageHDU ( data=None , header=None , name=None )
FITS image extension HDU class.
Methods
class pNbody.pyfits. PrimaryHDU ( data=None , header=None )
FITS primary HDU class.
Methods
class pNbody.pyfits. Section ( hdu )
Image section.
class pNbody.pyfits. StreamingHDU ( name , header )
A class that provides the capability to stream data to a FITS file
instead of requiring data to all be written at once.
The following psudo code illustrates its use:
header = pyfits.Header()
for all the cards you need in the header:
header.update(key,value,comment)
shdu = pyfits.StreamingHDU(‘filename.fits’,header)
for each piece of data:
shdu.write(data)
shdu.close()
Methods
close ( )
Close the ‘physical’ FITS file.
Parameters : None
Returns : None
size ( )
Return the size (in bytes) of the data portion of the HDU.
Parameters : None
Returns :
size : integer
The number of bytes of data required to fill the stream
per the header provided in the constructor.
write ( data )
Write the given data to the stream.
Parameters :
data : ndarray
Data to stream to the file.
Returns :
writeComplete : integer
Flag that when true indicates that all of the required data
has been written to the stream.
Notes
Only the amount of data specified in the header provided to the
class constructor may be written to the stream. If the provided
data would cause the stream to overflow, an IOError exception is
raised and the data is not written. Once sufficient data has been
written to the stream to satisfy the amount specified in the header,
the stream is padded to fill a complete FITS block and no more data
will be accepted. An attempt to write more data after the stream
has been filled will raise an IOError exception. If the dtype of
the input data does not match what is expected by the header, a
TypeError exception is raised.
class pNbody.pyfits. TableHDU ( data=None , header=None , name=None )
FITS ASCII table extension HDU class.
Methods
class pNbody.pyfits. Undefined
Undefined value.
exception pNbody.pyfits. VerifyError
Verify exception class.
pNbody.pyfits. append ( filename , data , header=None , classExtensions={} )
Append the header/data to FITS file if filename exists, create if not.
If only data is supplied, a minimal header is created
-@type filename: string
+
@type filename: string
@param filename: name of the file to append to
@type data: array, table, or group data object
@param data: the new data used for appending
@type header: L{Header} object or None
@param header: the header associated with ‘data’, if None,
-an appropriate header will be created for the data object
-supplied.
+an appropriate header will be created for the data object
+supplied.
@type classExtensions: dictionary
@param classExtensions: A dictionary that maps pyfits classes to
-extensions of those classes. When present in
+extensions of those classes. When present in
the dictionary, the extension class will be
-constructed in place of the pyfits class.
-
+constructed in place of the pyfits class.
+
pNbody.pyfits. fitsopen ( name , mode='copyonwrite' , memmap=0 , classExtensions={} )
Factory function to open a FITS file and return an HDUList object.
name: Name of the FITS file to be opened or already opened file object.
mode: Open mode, ‘readonly’ (default), ‘update’, or ‘append’.
memmap: Is memmory mapping to be used? default=0.
classExtensions: A dictionary that maps pyfits classes to extensions of
-those classes. When present in the dictionary, the
+those classes. When present in the dictionary, the
extension class will be constructed in place of the
-pyfits class.
+pyfits class.
pNbody.pyfits. getdata ( filename , *ext , **extkeys )
Get the data from an extension of a FITS file (and optionally the header).
@type filename: string
@param filename: input FITS file name
@keyword classExtensions: (optional) A dictionary that maps pyfits
classes to extensions of those classes. When present in the
dictionary, the extension class will be constructed in place
of the pyfits class.
@param ext: The rest of the arguments are for extension specification. They are
flexible and are best illustrated by examples:
No extra arguments implies the primary header
By extension number:
>>> getdata ( 'in.fits' , 0 ) # the primary header
>>> getdata ( 'in.fits' , 2 ) # the second extension
>>> getdata ( 'in.fits' , ext = 2 ) # the second extension
By name, i.e., EXTNAME value (if unique):
>>> getdata ( 'in.fits' , 'sci' )
>>> getdata ( 'in.fits' , extname = 'sci' ) # equivalent
Note EXTNAMEs are not case sensitive
By combination of EXTNAME and EXTVER, as separate arguments or as a tuple:
>>> getdata ( 'in.fits' , 'sci' , 2 ) # EXTNAME='SCI' & EXTVER=2
>>> getdata ( 'in.fits' , extname = 'sci' , extver = 2 ) # equivalent
>>> getdata ( 'in.fits' , ( 'sci' , 2 )) # equivalent
Ambiguous or conflicting specifications will raise an exception, e.g.,
>>> getdata ( 'in.fits' , ext = ( 'sci' , 1 ), extname = 'err' , extver = 2 )
@return: an array, record array (i.e. table), or groups data object
depending on the type of the extension being referenced
If the optional keyword ‘header’ is set to True, this function will
return a (data, header) tuple.
pNbody.pyfits. getheader ( filename , *ext , **extkeys )
Get the header from an extension of a FITS file.
@param filename: input FITS file name
@type: string
@keyword classExtensions: (optional) A dictionary that maps pyfits
-classes to extensions of those classes. When present in the
+classes to extensions of those classes. When present in the
dictionary, the extension class will be constructed in place
-of the pyfits class.
+of the pyfits class.
@param ext: The rest of the arguments are for extension specification.
See L{getdata} for explanations/examples.
@rtype: L{Header} object
@return: header
pNbody.pyfits. getval ( filename , key , *ext , **extkeys )
Get a keyword’s value from a header in a FITS file.
@type filename: string
@param filename: input FITS file name
@type key: string
@param key: keyword name
@keyword classExtensions: (optional) A dictionary that maps pyfits
-classes to extensions of those classes. When present in the
+classes to extensions of those classes. When present in the
dictionary, the extension class will be constructed in place
-of the pyfits class.
+of the pyfits class.
@param ext: The rest of the arguments are for extension specification.
See L{getdata} for explanations/examples.
@return: keyword value
@rtype: string, integer, or float
pNbody.pyfits. info ( filename , classExtensions={} )
Print the summary information on a FITS file.
This includes the name, type, length of header, data shape and type
for each extension.
@type filename: string
@param filename: input FITS file name
@type classExtensions: dictionary
@param classExtensions: A dictionary that maps pyfits classes to
-extensions of those classes. When present in
+extensions of those classes. When present in
the dictionary, the extension class will be
-constructed in place of the pyfits class.
+constructed in place of the pyfits class.
pNbody.pyfits. new_table ( input , header=None , nrows=0 , fill=0 , tbtype='BinTableHDU' )
Create a new table from the input column definitions.
pNbody.pyfits. open ( name , mode='copyonwrite' , memmap=0 , classExtensions={} )
Factory function to open a FITS file and return an HDUList object.
name: Name of the FITS file to be opened or already opened file object.
mode: Open mode, ‘readonly’ (default), ‘update’, or ‘append’.
memmap: Is memmory mapping to be used? default=0.
classExtensions: A dictionary that maps pyfits classes to extensions of
-those classes. When present in the dictionary, the
+those classes. When present in the dictionary, the
extension class will be constructed in place of the
-pyfits class.
+pyfits class.
pNbody.pyfits. update ( filename , data , *ext , **extkeys )
Update the specified extension with the input data/header.
@type filename: string
@param filename: name of the file to be updated
data: the new data used for updating
@keyword classExtensions: (optional) A dictionary that maps pyfits
-classes to extensions of those classes. When present in the
+classes to extensions of those classes. When present in the
dictionary, the extension class will be constructed in place
-of the pyfits class.
+of the pyfits class.
The rest of the arguments are flexible:
the 3rd argument can be the header associated with the data.
If the 3rd argument is not a header, it (and other positional
arguments) are assumed to be the extension specification(s).
Header and extension specs can also be keyword arguments.
For example:
>>> update ( file , dat , hdr , 'sci' ) # update the 'sci' extension
>>> update ( file , dat , 3 ) # update the 3rd extension
>>> update ( file , dat , hdr , 3 ) # update the 3rd extension
>>> update ( file , dat , 'sci' , 2 ) # update the 2nd SCI extension
>>> update ( file , dat , 3 , header = hdr ) # update the 3rd extension
>>> update ( file , dat , header = hdr , ext = 5 ) # update the 5th extension
pNbody.pyfits. writeto ( filename , data , header=None , **keys )
Create a new FITS file using the supplied data/header.
@type filename: string
@param filename: name of the new FITS file to write to
@type data: array, record array, or groups data object
@param data: data to write to the new file
@type header: L{Header} object or None
@param header: the header associated with ‘data’, if None, a
-header of the appropriate type is created for the supplied
-data. This argument is optional.
+header of the appropriate type is created for the supplied
+data. This argument is optional.
@keyword classExtensions: (optional) A dictionary that maps pyfits
classes to extensions of those classes. When present in the
dictionary, the extension class will be constructed in place
of the pyfits class.
@keyword clobber: (optional) if True and if filename already exists, it
will overwrite the file. Default is False.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/RecModule.html b/Doc/newdoc/_build/html/rst/RecModule.html
index cf74d6e..f0f688e 100644
--- a/Doc/newdoc/_build/html/rst/RecModule.html
+++ b/Doc/newdoc/_build/html/rst/RecModule.html
@@ -1,127 +1,127 @@
the rec module — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Reference.html b/Doc/newdoc/_build/html/rst/Reference.html
index 3b25825..7b440bc 100644
--- a/Doc/newdoc/_build/html/rst/Reference.html
+++ b/Doc/newdoc/_build/html/rst/Reference.html
@@ -1,179 +1,179 @@
Reference — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/TalkgdispModule.html b/Doc/newdoc/_build/html/rst/TalkgdispModule.html
index 8ce8a0b..bc76788 100644
--- a/Doc/newdoc/_build/html/rst/TalkgdispModule.html
+++ b/Doc/newdoc/_build/html/rst/TalkgdispModule.html
@@ -1,134 +1,134 @@
the talkgdisp module — pNbody v4 documentation
the talkgdisp module
class pNbody.talkgdisp. TalkServer ( address=None , module=None , cl=None )
talk server class
Methods
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Test_the_installation.html b/Doc/newdoc/_build/html/rst/Test_the_installation.html
index 617088a..88ff58c 100644
--- a/Doc/newdoc/_build/html/rst/Test_the_installation.html
+++ b/Doc/newdoc/_build/html/rst/Test_the_installation.html
@@ -1,164 +1,164 @@
Check the installation — pNbody v4 documentation
Check the installation
You can check the installation by simply running the following
command:
This command must of course be in your path. This will be the case
if you did not specified any --prefix . On the contrary if --prefix
is set to for example, localdir you should have your PATH environment
variable should contains:
and you PYTHONPATH environment should contains:
localdir/lib/python2.x/site-packages/
to ensure that the pNbody package will be found.
If everything goes well, you should see a lots of outputs on your screen,
as well as a window displaying an edge-on disk.
Close it when you see it.
The script should finally ends up with something like
########################################################################
Good News ! pNbody with format gadget is working !
########################################################################
You are currently using the following paths
HOME : /home/leo
PNBODYPATH : /home/leo/local/lib/python2.6/site-packages/pNbody
CONFIGDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config
PARAMETERFILE : /home/leo/local/lib/python2.6/site-packages/pNbody/config/defaultparameters
UNITSPARAMETERFILE : /home/leo/local/lib/python2.6/site-packages/pNbody/config/unitsparameters
PALETTEDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/rgb_tables
PLUGINSDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/plugins
OPTDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/opt
FORMATSDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/formats
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/ThermodynModule.html b/Doc/newdoc/_build/html/rst/ThermodynModule.html
index 754bc68..92b33f9 100644
--- a/Doc/newdoc/_build/html/rst/ThermodynModule.html
+++ b/Doc/newdoc/_build/html/rst/ThermodynModule.html
@@ -1,201 +1,201 @@
the thermodyn module — pNbody v4 documentation
the thermodyn module
pNbody.thermodyn. Arp ( rho , P )
pNbody.thermodyn. Art ( rho , T )
pNbody.thermodyn. Aru ( rho , U )
pNbody.thermodyn. ElectronDensity ( rho , pars )
Electron density for a mixture of H + He
pNbody.thermodyn. Lambda ( rho , u , localsystem , thermopars , coolingfile )
This corresponds to Lambda normalized
Ln = L / nh 2
nh = (xi*rho/mh)
pNbody.thermodyn. Pra ( rho , A )
pNbody.thermodyn. Prt ( rho , T )
pNbody.thermodyn. Pru ( rho , U )
pNbody.thermodyn. Tra ( rho , A )
pNbody.thermodyn. Trp ( rho , P )
pNbody.thermodyn. Tru ( rho , U )
pNbody.thermodyn. Ura ( rho , A )
pNbody.thermodyn. Urp ( rho , P )
pNbody.thermodyn. Urt ( rho , T )
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Tutorial.html b/Doc/newdoc/_build/html/rst/Tutorial.html
index da5037a..940fac9 100644
--- a/Doc/newdoc/_build/html/rst/Tutorial.html
+++ b/Doc/newdoc/_build/html/rst/Tutorial.html
@@ -1,142 +1,142 @@
Tutorial — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Tutorial_interpreter.html b/Doc/newdoc/_build/html/rst/Tutorial_interpreter.html
index 8e3418b..893f8bc 100644
--- a/Doc/newdoc/_build/html/rst/Tutorial_interpreter.html
+++ b/Doc/newdoc/_build/html/rst/Tutorial_interpreter.html
@@ -1,409 +1,409 @@
Using pNbody with the python interpreter — pNbody v4 documentation
Using pNbody with the python interpreter
In order to use this tutorial, you first need to copy some examples provided
with pNbody . This can be done by typing:
by default, this create a directory in your home ~/pnbody_examples .
Move to this directory:
Then you can simply follow the instructions below.
First, start the python interpreter:
leo@obsrevaz:~/pnbody_examples python
Python 2.4.2 (#2, Jul 13 2006, 15:26:48)
[GCC 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Now, you can load the pNbody module:
Creating pNbody objects from scratch
We can first start by creating a default pNbody objet and get info about it
>>> nb = Nbody ()
>>> nb . info ()
-----------------------------------
particle file : ['file.dat']
ftype : 'Nbody_default'
mxntpe : 6
nbody : 0
nbody_tot : 0
npart : [0, 0, 0, 0, 0, 0]
npart_tot : [0, 0, 0, 0, 0, 0]
mass_tot : 0.0
byteorder : 'little'
pio : 'no'
>>>
All variables linked to the object nb are accesible by typing nb. followed by the associated variables :
>>> nb . nbody
0
>>> nb . mass_tot
0.0
>>> nb . pio
'no'
Now, you can create an object by giving the positions of particles:
>>> pos = ones (( 10 , 3 ), float32 )
>>> nb = Nbody ( pos = pos )
>>> nb . info ()
-----------------------------------
particle file : ['file.dat']
ftype : 'Nbody_default'
mxntpe : 6
nbody : 10
nbody_tot : 10
npart : array([10, 0, 0, 0, 0, 0])
npart_tot : array([10, 0, 0, 0, 0, 0])
mass_tot : 1.00000011921
byteorder : 'little'
pio : 'no'
len pos : 10
pos[0] : array([ 1., 1., 1.], dtype=float32)
pos[-1] : array([ 1., 1., 1.], dtype=float32)
len vel : 10
vel[0] : array([ 0., 0., 0.], dtype=float32)
vel[-1] : array([ 0., 0., 0.], dtype=float32)
len mass : 10
mass[0] : 0.10000000149
mass[-1] : 0.10000000149
len num : 10
num[0] : 0
num[-1] : 9
len tpe : 10
tpe[0] : 0
tpe[-1] : 0
In this case, you can see that the class automatically intitialize other arrays variables
(vel, mass, num and rsp) with default values. Only the first and the last element of
each defined vector are displyed by the methode info. All defined arrays and array elements
may be easily accessible using the numarray convensions. For exemple, to display and
change the positions of the tree first particles, type:
>>> nb . pos [: 3 ]
array([[ 1., 1., 1.],
[ 1., 1., 1.],
[ 1., 1., 1.]], type=float32)
>>> nb . pos [: 3 ] = 2 * ones (( 3 , 3 ), float32 )
>>> nb . pos [: 3 ]
array([[ 2., 2., 2.],
[ 2., 2., 2.],
[ 2., 2., 2.]], type=float32)
Open from existing file
Now, lets try to open the gadget snapshot gadget_z00.dat. This is achieved by typing:
>>> nb = Nbody ( 'gadget_z00.dat' , ftype = 'gadget' )
Again, informatins on this snapshot may be obtained using the instance info():
>>> nb . info ()
-----------------------------------
particle file : ['gadget_z00.dat']
ftype : 'Nbody_gadget'
mxntpe : 6
nbody : 20560
nbody_tot : 20560
npart : array([ 9160, 10280, 0, 0, 1120, 0])
npart_tot : array([ 9160, 10280, 0, 0, 1120, 0])
mass_tot : 79.7066955566
byteorder : 'little'
pio : 'no'
len pos : 20560
pos[0] : array([-1294.48828125, -2217.09765625, -9655.49609375], dtype=float32)
pos[-1] : array([ -986.0625 , -2183.83203125, 4017.04296875], dtype=float32)
len vel : 20560
vel[0] : array([ -69.80491638, 60.56475067, -166.32981873], dtype=float32)
vel[-1] : array([-140.59715271, -66.44669342, -37.01613235], dtype=float32)
len mass : 20560
mass[0] : 0.00108565215487
mass[-1] : 0.00108565215487
len num : 20560
num[0] : 21488
num[-1] : 1005192
len tpe : 20560
tpe[0] : 0
tpe[-1] : 4
atime : 1.0
redshift : 2.22044604925e-16
flag_sfr : 1
flag_feedback : 1
nall : [ 9160 10280 0 0 1120 0]
flag_cooling : 1
num_files : 1
boxsize : 100000.0
omega0 : 0.3
omegalambda : 0.7
hubbleparam : 0.7
flag_age : 0
flag_metals : 0
nallhw : [0 0 0 0 0 0]
flag_entr_ic : 0
critical_energy_spec: 0.0
len u : 20560
u[0] : 6606.63037109
u[-1] : 0.0
len rho : 20560
rho[0] : 7.05811936674e-11
rho[-1] : 0.0
len rsp : 20560
rsp[0] : 909.027587891
rsp[-1] : 0.0
len opt : 20560
opt[0] : 446292.5625
opt[-1] : 0.0
You can obtain informations on physical values, like the center of mass
or the total angular momentum vector by typing:
>>> nb . cm ()
array([-1649.92651346, 609.98256428, -1689.04011033])
>>> nb . Ltot ()
array([-1112078.125 , -755964.1875, -1536667.125 ], dtype=float32)
In order to visualise the model in position space, it is possible to
generate a surface density map of it using the display instance:
>>> nb . display ( size = ( 10000 , 10000 ), shape = ( 256 , 256 ), palette = 'light' )
You can now performe some operations on the model in order to explore a specific
region. First, translate the model in position space:
>>> nb . translate ([ 3125 , - 4690 , 1720 ])
>>> nb . display ( size = ( 10000 , 10000 ), shape = ( 256 , 256 ), palette = 'light' )
>>> nb . display ( size = ( 1000 , 1000 ), shape = ( 256 , 256 ), palette = 'light' )
Ou can now rotate around:
>>> nb . rotate ( angle = pi )
>>> nb . display ( size = ( 1000 , 1000 ), shape = ( 256 , 256 ), palette = 'light' )
You can now display a temperature map of the model. First,
create a new object with only the gas particles:
>>> nb_gas = nb . select ( 'gas' )
>>> nb_gas . display ( size = ( 1000 , 1000 ), shape = ( 256 , 256 ), palette = 'light' )
now, display the temperture mass-weighted map:
>>> nb_gas . display ( size = ( 1000 , 1000 ), shape = ( 256 , 256 ), palette = 'rainbow4' , mode = 'T' , filter_name = 'gaussian' )
Selection of particles
You can select only particles within a radius smaller tha 500 (in user units)
with respect to the center:
>>> nb_sub = nb . selectc (( nb . rxyz () < 500 ))
>>> nb_sub . display ( size = ( 1000 , 1000 ), shape = ( 256 , 256 ), palette = 'light' )
Now, rename the new model and save it:
>>> nb_sub . rename ( 'gadget_z00_sub.dat' )
>>> nb_sub . write ()
A new gadget file has been created and saved in the current directory.
We can now select particles as a function of the temperature.
First, display the maximum temperature among all gas particles,
then selectc particles and finally save in ‘T11.num’ the identifier (variable num) of these particles:
>>> log10 ( max ( nb_gas . T ()))
12.8707923889
>>> nb_sub = nb_gas . selectc ( ( nb_gas . T () > 1e11 ) )
>>> nb_sub . write_num ( 'T11.num' )
Now open a new snapshot, from the same simulation, but at different redshift and find the
particles in previous snapshot with temperature higher than $10^{11}$:
>>> nb = Nbody ( 'gadget_z40.dat' , ftype = 'gadget' )
>>> nb . display ( size = ( 10000 , 10000 ), shape = ( 256 , 256 ), palette = 'light' )
>>> nb_sub = nb . selectp ( file = 'T11.num' )
>>> nb_sub . display ( size = ( 10000 , 10000 ), shape = ( 256 , 256 ), palette = 'light' )
Now, instead of saving it in a gadget file, save it in a binary file type.
You simply need to call the set_ftype instance before saving it:
>>> nb = nb . set_ftype ( 'binary' )
>>> nb . rename ( 'binary.dat' )
>>> nb . write ()
Merging two models
As a last example, we show how two pNbody models can be easyly merged with only 11 lines:
>>> nb1 = Nbody ( 'disk.dat' , ftype = 'gadget' )
>>> nb2 = Nbody ( 'disk.dat' , ftype = 'gadget' )
>>> nb1 . rotate ( angle = pi / 4 , axis = [ 0 , 1 , 0 ])
>>> nb1 . translate ([ - 150 , 0 , 0 ])
>>> nb1 . vel = nb1 . vel + [ 50 , 0 , 0 ]
>>> nb2 . rotate ( angle = pi / 4 , axis = [ 1 , 0 , 0 ])
>>> nb2 . translate ([ + 150 , 0 , 50 ])
>>> nb2 . vel = nb2 . vel - [ 50 , 0 , 0 ]
>>> nb3 = nb1 + nb2
>>> nb3 . rename ( 'merge.dat' )
>>> nb3 . write ()
Now display the result from different point of view:
>>> nb3 . display ( size = ( 300 , 300 ), shape = ( 256 , 256 ), palette = 'lut2' )
>>> nb3 = nb3 . select ( 'disk' )
>>> nb3 . display ( size = ( 300 , 300 ), shape = ( 256 , 256 ), palette = 'lut2' , view = 'xz' )
>>> nb3 . display ( size = ( 300 , 300 ), shape = ( 256 , 256 ), palette = 'lut2' , view = 'xy' )
>>> nb3 . display ( size = ( 300 , 300 ), shape = ( 256 , 256 ), palette = 'lut2' , view = 'yz' )
>>> nb3 . display ( size = ( 300 , 300 ), shape = ( 256 , 256 ), palette = 'lut2' , xp = [ - 100 , 0 , 0 ])
or save it into a gif file:
>>> nb3 . display ( size = ( 300 , 300 ), shape = ( 256 , 256 ), palette = 'lut2' , xp = [ - 100 , 0 , 0 ], save = 'image.gif' )
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Tutorial_parallel.html b/Doc/newdoc/_build/html/rst/Tutorial_parallel.html
index 95f82dc..f21f962 100644
--- a/Doc/newdoc/_build/html/rst/Tutorial_parallel.html
+++ b/Doc/newdoc/_build/html/rst/Tutorial_parallel.html
@@ -1,266 +1,266 @@
Using pNbody in parallel — pNbody v4 documentation
Using pNbody in parallel
With pNbody , it is possible to run scripts in parallel, using the mpi libary.
You need to have of course mpi and mpi4py installed.
To check your installation, try:
you should get:
This is task 0 over 2
This is task 1 over 2
but if you get:
This is task 0 over 1
This is task 0 over 1
this means that something is not working correctly, and you should check your path or mpi and mpi4py installation
before reading further.
The prevous scripts scripts/slice.py can diretely be run in paralle.
This is simply obtained by calling the mpirun command:
mpirun -np 2 scripts/slice.py gadget_z*0.dat
In this simple script, only the processus of rank 0 (the master) open the file.
The content of the file (particles) is then distributed among all the other processors.
Eeach processor recives a fraction of the particles.
Then, the selection of gas gas particles and the slice are preformed by all processors on
their local particles.
Finally, the nb.write() command, run by the master, gather all particles and write the output file.
Parallel output
With pNbody , its possible to write files in parallel, i.e., each task write its own file.
We can do this in the previous script simply by adding the line nb.set_pio('yes') . This
tells pNbody to write files in parallel when nb.write() is called.
The content of the new scripts scripts/slice-p1.py is:
#!/usr/bin/env python
import sys
from pNbody import *
files = sys . argv [ 1 :]
for file in files :
print "slicing" , file
nb = Nbody ( file , ftype = 'gadget' )
nb = nb . select ( 'gas' )
nb = nb . selectc (( fabs ( nb . pos [:, 1 ]) < 1000 ))
nb . rename ( file + '.slice' )
nb . set_pio = 'yes'
nb . write ()
We can now run it:
mpirun -np 2 scripts/slice-p1.py gadget_z00.dat
This creates two new files:
gadget_z00.dat.slice.1
gadget_z00.dat.slice.0
The files have the same name than the initial name given in Nbody() with an extention .i where i
corresponds to the processus rank. Each file contains the particles attributed to the corresponding task.
More on parallelisme
Lets try two other scripts. The first one (findmax.py ) try to find the radial maximum distance among
all particles and the center. It illustrate the difference between using max()
wich gives the local maximum (maximum among particles of the node) and mpi.mpi_max()
which gives the global maximum among all particles:
#!/usr/bin/env python
import sys
from pNbody import *
file = sys . argv [ 1 ]
nb = Nbody ( file , ftype = 'gadget' , pio = 'yes' )
local_max = max ( nb . rxyz ())
global_max = mpi . mpi_max ( nb . rxyz ())
print "proc %d local_max = %f global_max = %f " % ( mpi . ThisTask , local_max , global_max )
When running it, you should get:
mpirun -np 2 ./scripts/findmax.py gadget_z00.dat.slice
proc 1 local_max = 8109.682129 global_max = 8109.682129
proc 0 local_max = 7733.846680 global_max = 8109.682129
which illustrate clearly the point. Finally, the latter script shows that even graphical
functions support parallelisme. The script showmap.py illustrate this point by computing
a map of the model:
#!/usr/bin/env python
import sys
from pNbody import *
file = sys . argv [ 1 ]
nb = Nbody ( file , ftype = 'gadget' , pio = 'yes' )
nb . display ( size = ( 10000 , 10000 ), shape = ( 256 , 256 ), palette = 'light' )
When running
mpirun -np 2 ./scripts/showmap.py gadget_z00.dat.slice
you get an image of the model. The mapping has been performed independently by two processors.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Tutorial_scripts.html b/Doc/newdoc/_build/html/rst/Tutorial_scripts.html
index 49286ab..bb6d531 100644
--- a/Doc/newdoc/_build/html/rst/Tutorial_scripts.html
+++ b/Doc/newdoc/_build/html/rst/Tutorial_scripts.html
@@ -1,159 +1,159 @@
Using pNbody with scripts — pNbody v4 documentation
Using pNbody with scripts
In addition to using pNbody in the python interpreter,
it is very useful to use pNbody in python scripts. Usually a python script
begin by the line #!/usr/bin/env python and must be executable:
The following example (slice.py), we show how to write a script that opens a gadget file,
select gas particles and cut a thin slice
The new files are saved using the extension .slice.
#!/usr/bin/env python
import sys
from pNbody import *
files = sys . argv [ 1 :]
for file in files :
print "slicing" , file
nb = Nbody ( file , ftype = 'gadget' , pio = 'yes' )
nb = nb . select ( 'gas' )
nb = nb . selectc (( fabs ( nb . pos [:, 1 ]) < 1000 ))
nb . rename ( file + '.slice' )
nb . write ()
In your pnbody_example directory, you can run this script with the command:
./scripts/slice.py gadget_z*0.dat
or:
python ./scripts/slice.py gadget_z*0.dat
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/Units.html b/Doc/newdoc/_build/html/rst/Units.html
index b401ce7..ed2f39f 100644
--- a/Doc/newdoc/_build/html/rst/Units.html
+++ b/Doc/newdoc/_build/html/rst/Units.html
@@ -1,124 +1,124 @@
How to deal with units ? — pNbody v4 documentation
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/UnitsModule.html b/Doc/newdoc/_build/html/rst/UnitsModule.html
index bdab06d..09bba01 100644
--- a/Doc/newdoc/_build/html/rst/UnitsModule.html
+++ b/Doc/newdoc/_build/html/rst/UnitsModule.html
@@ -1,200 +1,200 @@
the units module — pNbody v4 documentation
the units module
class pNbody.units. PhysCte ( value , Unit )
Physical constant
Methods
pNbody.units. Set_SystemUnits_From_Params ( params )
return a system of units from given parameters
params is a dictionary that must constains at least
params[‘UnitVelocity_in_cm_per_s’]
params[‘UnitMass_in_g’]
params[‘UnitLength_in_cm’]
class pNbody.units. UnitSystem ( UnitSysName , UnitLst )
Units system
Methods
convertionFactorTo ( newUnits )
return the conversion factor to obtain the new units
info ( )
print some info
into ( newUnits )
return into the new units
class pNbody.units. Units ( symbol , factor=1.0 , power=1 , ulist= [ ] )
Units
Methods
GatherBaseUnits ( )
create the self.bases list (recursively)
pNbody.units. gal
constantes are now defined in ctes.py
slight = PhysCte(2.99792458e8,Unit_m/Unit_s)
G = PhysCte(6.6732e-11,Unit_G)
q_electron = PhysCte(1.6022e-19,Unit_C)
planck = PhysCte(6.6262e-34,Unit_J*Unit_s)
boltzmann = PhysCte(1.3807e-23,Unit_J/Unit_K)
m_electron = PhysCte(9.1095e-31,Unit_kg)
m_proton = PhysCte(1.6726e-27,Unit_kg)
m_neutron = PhysCte(1.6750e-27,Unit_kg)
Na = PhysCte(6.0220e+23,Unit_mol)
R = PhysCte(8.3144e+00,Unit_J/Unit_mol)
Av = PhysCte(6.828e-50 ,Unit_Pa*Unit_m**6)
Bv = PhysCte(4.419e-29,Unit_m**3)
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/rst/nbodymodule.html b/Doc/newdoc/_build/html/rst/nbodymodule.html
deleted file mode 100644
index 1e8ccc7..0000000
--- a/Doc/newdoc/_build/html/rst/nbodymodule.html
+++ /dev/null
@@ -1,213 +0,0 @@
-
-
-
-
-
-
-
-
- the C nbody module — pNbody v4 documentation
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
the C nbody module
-
-
-pNbody.nbodymodule. acceleration ( )
-Calculate the acceleration at a given position, with a given softening.
-
-
-
-
-pNbody.nbodymodule. am ( )
-Calculate the angular momentum of the model.
-
-
-
-
-pNbody.nbodymodule. ampmap ( )
-Return a map of amplitude of the given points.
-
-
-
-
-pNbody.nbodymodule. amxyz ( )
-Calculate the angular momentum in x,y,z for all particles.
-
-
-
-
-pNbody.nbodymodule. convol ( )
-Return a 2d convolution of a with kernel b.
-
-
-
-
-pNbody.nbodymodule. epot ( )
-Calculate the total potential energy.
-
-
-
-
-pNbody.nbodymodule. pamap ( )
-Return a map of the given points.
-
-
-
-
-pNbody.nbodymodule. pdmap ( )
-Return a ponderated map of the given points.
-
-
-
-
-pNbody.nbodymodule. perspective ( )
-Return a 3d projection of the given points.
-
-
-
-
-pNbody.nbodymodule. potential ( )
-Calculate the potential at a given position, with a given softening.
-
-
-
-
-pNbody.nbodymodule. rotx ( )
-Rotation around the x axis.
-
-
-
-
-pNbody.nbodymodule. roty ( )
-Rotation around the y axis.
-
-
-
-
-pNbody.nbodymodule. rotz ( )
-Rotation around the z axis.
-
-
-
-
-pNbody.nbodymodule. samxyz ( )
-Calculate the specific angular momentum in x,y,z for all particles.
-
-
-
-
-pNbody.nbodymodule. sphmap ( )
-Return a sphmap of the given points.
-
-
-
-
-pNbody.nbodymodule. spin ( )
-Spin the model around an axis.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/search.html b/Doc/newdoc/_build/html/search.html
index f14c32e..2eb24be 100644
--- a/Doc/newdoc/_build/html/search.html
+++ b/Doc/newdoc/_build/html/search.html
@@ -1,111 +1,111 @@
Search — pNbody v4 documentation
Search
Please activate JavaScript to enable the search
functionality.
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.
\ No newline at end of file
diff --git a/Doc/newdoc/_build/html/searchindex.js b/Doc/newdoc/_build/html/searchindex.js
index 9d1f016..ff001ed 100644
--- a/Doc/newdoc/_build/html/searchindex.js
+++ b/Doc/newdoc/_build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({objects:{"PyGadget.gadget":{Acceleration:[59,8,1],GetAllHsml:[59,8,1],Density:[59,8,1],LoadParticles2:[59,8,1],GetAllIDQ:[59,8,1],GetAllAcceleration:[59,8,1],GetAllPositions:[59,8,1],GetAllVelocities:[59,8,1],SetParameters:[59,8,1],GetPos:[59,8,1],GetAllPotential:[59,8,1],GetAllTypes:[59,8,1],GetAllMasses:[59,8,1],GetAllMassesQ:[59,8,1],Ngbs:[59,8,1],InitMPI:[59,8,1],Info:[59,8,1],GetAllPositionsQ:[59,8,1],GetAllDensities:[59,8,1],InitDefaultParameters:[59,8,1],GetAllTypesQ:[59,8,1],InitHsml:[59,8,1],SphEvaluate:[59,8,1],GetAllVelocitiesQ:[59,8,1],GetAllID:[59,8,1],LoadParticlesQ:[59,8,1],AllAcceleration:[59,8,1],LoadParticles:[59,8,1],Potential:[59,8,1],AllPotential:[59,8,1],GetParameters:[59,8,1]},"pNbody.cooling_with_metals":{get_lambda_normalized_from_Temperature_FeH:[37,8,1],integrate1:[37,8,1],PrintParameters:[37,8,1],integrate2:[37,8,1],get_cooling_time_from_Density_EnergyInt_FeH:[37,8,1],get_cooling_time_from_Density_Temperature_FeH:[37,8,1],get_lambda_from_Density_Temperature_FeH:[37,8,1],get_lambda_from_Density_EnergyInt_FeH:[37,8,1],get_lambda_from_Density_Entropy_FeH:[37,8,1],init_cooling:[37,8,1]},"pNbody.Movie":{Movie:[9,10,1]},"pNbody.units.UnitSystem":{info:[41,9,1],into:[41,9,1],convertionFactorTo:[41,9,1]},"pNbody.tessel":{info:[24,8,1],ComputeIsoContours:[24,8,1],GetVoronoi:[24,8,1],ConstructDelaunay:[24,8,1],TriangleMedians:[24,8,1],InCircumCircle:[24,8,1],InTriangleOrOutside:[24,8,1],GetTriangles:[24,8,1],test:[24,8,1],CircumCircleProperties:[24,8,1],InTriangle:[24,8,1]},"pNbody.asciilib":{read:[22,8,1]},"pNbody.main":{get_known_formats:[64,8,1],Nbody_default:[64,10,1],NbodyDefault:[64,10,1],Nbody:[64,8,1]},"pNbody.pyfits.StreamingHDU":{write:[5,9,1],close:[5,9,1],size:[5,9,1]},"pNbody.libqt":{qtplot:[21,8,1],QNumarrayImage:[21,10,1],display:[21,8,1]},"pNbody.coolinglib":{cooling:[10,8,1],cooling_from_nH_and_T:[10,8,1]},"pNbody.param":{read_ascii_value:[46,8,1],Params:[46,10,1],write_ascii_value:[46,8,1]},"pNbody.cosmo":{setdefault:[3,8,1],Rho_c:[3,8,1],Age_a:[3,8,1],A_z:[3,8,1],Hubble_a:[3,8,1],Z_a:[3,8,1],Adot_a:[3,8,1],CosmicTime_a:[3,8,1],a_CosmicTime:[3,8,1]},"pNbody.nbodymodule":{acceleration:[26,8,1],rotx:[26,8,1],pdmap:[26,8,1],pamap:[26,8,1],epot:[26,8,1],sphmap:[26,8,1],samxyz:[26,8,1],am:[26,8,1],ampmap:[26,8,1],convol:[26,8,1],amxyz:[26,8,1],rotz:[26,8,1],perspective:[26,8,1],roty:[26,8,1],spin:[26,8,1],potential:[26,8,1]},"pNbody.geometry":{rotate:[4,8,1],viewport:[4,8,1],frustum:[4,8,1],align:[4,8,1],boxcut_segments:[4,8,1],inv_viewport:[4,8,1],ortho:[4,8,1],get_obs:[4,8,1],perspective:[4,8,1],boxcut:[4,8,1],expose:[4,8,1],norm:[4,8,1]},"pNbody.ic":{plummer:[7,8,1],ComputeGridParameters:[7,8,1],nfw_mr:[7,8,1],pisothm_mr:[7,8,1],shell:[7,8,1],hernquist:[7,8,1],invert:[7,8,1],isothm:[7,8,1],kuzmin:[7,8,1],burkert:[7,8,1],isothm_mr:[7,8,1],expd_mr:[7,8,1],homosphere:[7,8,1],generic_Mx:[7,8,1],generic_Mr:[7,8,1],dl2_mr:[7,8,1],generic2c:[7,8,1],ComputeGridParameters2:[7,8,1],box:[7,8,1],homodisk:[7,8,1],pisothm:[7,8,1],nfw:[7,8,1],dl2:[7,8,1],generic_alpha:[7,8,1],nfwg:[7,8,1],miyamoto_nagai:[7,8,1],expd:[7,8,1]},"pNbody.pygsl":{sobol_sequence:[56,8,1]},"pNbody.plummer":{Vcirc:[29,8,1],Density:[29,8,1],dPotential:[29,8,1],LDensity:[29,8,1],Potential:[29,8,1],Sigma:[29,8,1]},"pNbody.io":{checkfile:[27,8,1],read_ascii:[27,8,1],read_dmp:[27,8,1],write_array:[27,8,1],end_of_file:[27,8,1],write_dmp:[27,8,1]},"pNbody.fortranfile":{FortranFile:[51,10,1]},"pNbody.liblog.Log":{write:[57,9,1],close:[57,9,1]},"pNbody.main.NbodyDefault":{align_with_main_axis:[64,9,1],show:[64,9,1],getRadialVelocityDispersionInCylindricalGrid:[64,9,1],phi_xyz:[64,9,1],has_var:[64,9,1],sort_type:[64,9,1],Get_Velocities_From_Virial_Approximation:[64,9,1],inertial_tensor:[64,9,1],set_ftype:[64,9,1],selectc:[64,9,1],sigma_z:[64,9,1],rotate_old:[64,9,1],get_ntype:[64,9,1],epot:[64,9,1],histovel:[64,9,1],Accel:[64,9,1],tork:[64,9,1],MeanWeight:[64,9,1],init:[64,9,1],getRadiusInCylindricalGrid:[64,9,1],get_npart_and_npart_all:[64,9,1],get_list_of_method:[64,9,1],align2:[64,9,1],dmodes:[64,9,1],getNumberParticlesInCylindricalGrid:[64,9,1],sdens:[64,9,1],zmodes:[64,9,1],set_tpe:[64,9,1],get_rsp_approximation:[64,9,1],read:[64,9,1],minert:[64,9,1],get_nbody_tot:[64,9,1],L:[64,9,1],P:[64,9,1],memory_info:[64,9,1],T:[64,9,1],ComputeSigmaMap:[64,9,1],SphEvaluate:[64,9,1],redistribute:[64,9,1],ComputeMeanHisto:[64,9,1],get_histocenter2:[64,9,1],dx_mean:[64,9,1],l:[64,9,1],get_mxntpe:[64,9,1],gather_num:[64,9,1],get_num:[64,9,1],check_arrays:[64,9,1],get_default_spec_vars:[64,9,1],get_npart_tot:[64,9,1],dv_mean:[64,9,1],theta_xyz:[64,9,1],Epot:[64,9,1],sigma_vz:[64,9,1],get_default_spec_vect:[64,9,1],set_local_system_of_units:[64,9,1],Lum:[64,9,1],append:[64,9,1],cart2sph:[64,9,1],has_array:[64,9,1],weighted_numngb:[64,9,1],sub:[64,9,1],nodes_info:[64,9,1],gather_pos:[64,9,1],set_filenames:[64,9,1],Tmu:[64,9,1],ComputeMap:[64,9,1],getindex:[64,9,1],vx:[64,9,1],get_rotation_matrix_to_align_with_main_axis:[64,9,1],object_info:[64,9,1],ltot:[64,9,1],S:[64,9,1],get_mass_tot:[64,9,1],get_npart_all:[64,9,1],x:[64,9,1],ComputeHisto:[64,9,1],cvcenter:[64,9,1],make_default_vars_global:[64,9,1],z:[64,9,1],Ekin:[64,9,1],rxyz:[64,9,1],msdens:[64,9,1],ComputeDensityAndHsml:[64,9,1],SendAllToAll:[64,9,1],get_list_of_vars:[64,9,1],spec_info:[64,9,1],vel_cyl2cart:[64,9,1],Mr_Spherical:[64,9,1],cm:[64,9,1],set_npart:[64,9,1],Ne:[64,9,1],Ltot:[64,9,1],set_parameters:[64,9,1],histocenter2:[64,9,1],CombiMap:[64,9,1],cv:[64,9,1],select:[64,9,1],size:[64,9,1],ComputeObjectMap:[64,9,1],selecti:[64,9,1],rebox:[64,9,1],open_and_read:[64,9,1],vrxyz:[64,9,1],init_units:[64,9,1],real_numngb:[64,9,1],read_num:[64,9,1],vel_cart2cyl:[64,9,1],getSurfaceDensityInCylindricalGrid:[64,9,1],translate:[64,9,1],selectp:[64,9,1],sort:[64,9,1],getTree:[64,9,1],getPotentialInCylindricalGrid:[64,9,1],expose:[64,9,1],ComputeMeanMap:[64,9,1],usual_numngb:[64,9,1],gather_mass:[64,9,1],R:[64,9,1],ExchangeParticles:[64,9,1],TreePot:[64,9,1],find_vars:[64,9,1],spin:[64,9,1],rotateR:[64,9,1],info:[64,9,1],get_npart:[64,9,1],zprof:[64,9,1],hdcenter:[64,9,1],sph2cart:[64,9,1],align:[64,9,1],getAccelerationInCylindricalGrid:[64,9,1],InitSpec:[64,9,1],get_ns:[64,9,1],r:[64,9,1],mr:[64,9,1],x_sigma:[64,9,1],display:[64,9,1],rename:[64,9,1],Tcool:[64,9,1],open_and_write:[64,9,1],ekin:[64,9,1],get_nbody:[64,9,1],print_filenames:[64,9,1],vn:[64,9,1],vy:[64,9,1],ComputeSph:[64,9,1],write_num:[64,9,1],vz:[64,9,1],Map:[64,9,1],get_histocenter:[64,9,1],cmcenter:[64,9,1],write:[64,9,1],ComputeSigmaHisto:[64,9,1],histocenter:[64,9,1],Rho:[64,9,1],Vt:[64,9,1],phi_xy:[64,9,1],A:[64,9,1],U:[64,9,1],TreeAccel:[64,9,1],IntegrateUsingRK:[64,9,1],reduc:[64,9,1],set_pio:[64,9,1],gather_vel:[64,9,1],dens:[64,9,1],Pot:[64,9,1],get_list_of_array:[64,9,1],rxy:[64,9,1],mdens:[64,9,1],Vr:[64,9,1],gather_vec:[64,9,1],y:[64,9,1],v_sigma:[64,9,1],Vz:[64,9,1],set_unitsparameters:[64,9,1],sigma:[64,9,1],rotate:[64,9,1]},"pNbody.mapping":{mkmap1d:[2,8,1],mkmap2d:[2,8,1],mkmap1dn:[2,8,1],create_line:[2,8,1],mkmap2dw:[2,8,1],mkmap3dw:[2,8,1],mkmap2dsph:[2,8,1],mkmap1dw:[2,8,1],mkmap2dn:[2,8,1],mkmap3dsortedsph:[2,8,1],create_line3:[2,8,1],create_line2:[2,8,1],mkmap2dnsph:[2,8,1],mkmap3d:[2,8,1],mkmap3dn:[2,8,1],mkmap3dslicesph:[2,8,1]},"pNbody.pyfits.Header":{add_comment:[5,9,1],get_comment:[5,9,1],get:[5,9,1],items:[5,9,1],update:[5,9,1],rename_key:[5,9,1],get_history:[5,9,1],has_key:[5,9,1],ascardlist:[5,9,1],add_history:[5,9,1],copy:[5,9,1],add_blank:[5,9,1]},"pNbody.Movie.Movie":{read:[9,9,1],info:[9,9,1],open:[9,9,1],get_img:[9,9,1]},"pNbody.libdisk":{Diff:[63,8,1],get_Integral:[63,8,1]},"pNbody.peanolib":{xyz2peano:[44,8,1],peano2xyz:[44,8,1]},"pNbody.talkgdisp":{TalkServer:[0,10,1]},"pNbody.ctes":{convert_ctes:[65,8,1]},"pNbody.libgrid":{get_VolumeMap_On_Carthesian_3d_Grid:[45,8,1],get_MassMap_On_Cylindrical_2dv_Grid:[45,8,1],get_PotentialMap_On_Cylindrical_2dv_Grid:[45,8,1],get_AccumulatedMassMap_On_Spherical_1d_Grid:[45,8,1],get_NumberMap_On_Cylindrical_2dv_Grid:[45,8,1],get_MassMap_On_Cylindrical_3d_Grid:[45,8,1],get_SurfaceDensityMap_On_Carthesian_2d_Grid:[45,8,1],get_PotentialMap_On_Carthesian_3d_Grid:[45,8,1],get_MassMap_On_Cylindrical_2dh_Grid:[45,8,1],get_Points_On_Carthesian_3d_Grid:[45,8,1],get_PotentialMap_On_Spherical_1d_Grid:[45,8,1],get_LinearDensityMap_On_Spherical_1d_Grid:[45,8,1],get_Points_On_Cylindrical_2dh_Grid:[45,8,1],get_MassMap_On_Carthesian_3d_Grid:[45,8,1],get_SurfaceDensityMap_From_Cylindrical_2dv_Grid:[45,8,1],get_MassMap_On_Spherical_3d_Grid:[45,8,1],get_NumberMap_On_Spherical_3d_Grid:[45,8,1],get_PotentialMap_On_Cylindrical_2dh_Grid:[45,8,1],get_DensityMap_On_Spherical_1d_Grid:[45,8,1],get_PotentialMap_On_Spherical_3d_Grid:[45,8,1],get_MassMap_On_Spherical_1d_Grid:[45,8,1],get_GenericMap_On_Spherical_1d_Grid:[45,8,1],get_DensityMap_On_Carthesian_3d_Grid:[45,8,1],get_VolumeMap_On_Spherical_3d_Grid:[45,8,1],get_NumberMap_On_Carthesian_2d_Grid:[45,8,1],get_DensityMap_On_Cylindrical_3d_Grid:[45,8,1],get_SurfaceMap_On_Carthesian_2d_Grid:[45,8,1],get_Accumulation_Along_Axis:[45,8,1],get_SurfaceDensityMap_On_Cylindrical_2dh_Grid:[45,8,1],get_NumberMap_On_Carthesian_3d_Grid:[45,8,1],get_Points_On_Spherical_3d_Grid:[45,8,1],get_NumberMap_On_Spherical_1d_Grid:[45,8,1],get_Points_On_Spherical_1d_Grid:[45,8,1],get_Interpolation_On_Cylindrical_2dv_Grid:[45,8,1],get_PotentialMap_On_Cylindrical_3d_Grid:[45,8,1],get_r_Interpolation_On_Cylindrical_2dv_Grid:[45,8,1],get_MassMap_On_Carthesian_2d_Grid:[45,8,1],get_DensityMap_On_Spherical_3d_Grid:[45,8,1],get_PotentialMap_On_Carthesian_2d_Grid:[45,8,1],get_Integral:[45,8,1],get_First_Derivative:[45,8,1],get_VolumeMap_On_Cylindrical_2dv_Grid:[45,8,1],get_DensityMap_On_Cylindrical_2dv_Grid:[45,8,1],get_VolumeMap_On_Cylindrical_3d_Grid:[45,8,1],get_Symetrisation_Along_Axis_Old:[45,8,1],get_AccelerationMap_On_Cylindrical_2dv_Grid:[45,8,1],get_SurfaceMap_On_Spherical_1d_Grid:[45,8,1],get_Points_On_Carthesian_2d_Grid:[45,8,1],get_SurfaceMap_On_Cylindrical_2dh_Grid:[45,8,1],get_VolumeMap_On_Spherical_1d_Grid:[45,8,1],get_Points_On_Cylindrical_2dv_Grid:[45,8,1],get_Interpolation_On_Spherical_1d_Grid:[45,8,1],get_Points_On_Cylindrical_3d_Grid:[45,8,1],get_NumberMap_On_Cylindrical_3d_Grid:[45,8,1],get_Symetrisation_Along_Axis:[45,8,1],get_NumberMap_On_Cylindrical_2dh_Grid:[45,8,1]},"pNbody.units":{Units:[41,10,1],gal:[41,11,1],PhysCte:[41,10,1],Set_SystemUnits_From_Params:[41,8,1],UnitSystem:[41,10,1]},"pNbody.fortranfile.FortranFile":{writeString:[51,9,1],readReals:[51,9,1],readString:[51,9,1],readRecord:[51,9,1],writeReals:[51,9,1],readInts:[51,9,1],ENDIAN:[51,13,1],writeRecord:[51,9,1],writeInts:[51,9,1],HEADER_PREC:[51,13,1]},"pNbody.pyfits.CardList":{insert:[5,9,1],keys:[5,9,1],index_of:[5,9,1],count_blanks:[5,9,1],copy:[5,9,1],append:[5,9,1]},"pNbody.libmiyamoto":{Sigma_z:[49,8,1],Vcirc:[49,8,1],Kappa:[49,8,1],Density:[49,8,1],SurfaceDensity:[49,8,1],Sigma_zbis:[49,8,1],Sigma_t:[49,8,1],d2z_Potential:[49,8,1],Potential:[49,8,1],dz_Potential:[49,8,1],d2R_Potential:[49,8,1],Omega:[49,8,1],dR_Potential:[49,8,1]},PyGadget:{gadget:[59,7,1]},"pNbody.param.Params":{set:[46,9,1],get:[46,9,1],lists:[46,9,1],get_type:[46,9,1],get_string:[46,9,1],save:[46,9,1],get_dic:[46,9,1]},"pNbody.thermodyn":{Arp:[11,8,1],ElectronDensity:[11,8,1],Art:[11,8,1],Ura:[11,8,1],Tra:[11,8,1],Urp:[11,8,1],Aru:[11,8,1],Urt:[11,8,1],Prt:[11,8,1],Pra:[11,8,1],Trp:[11,8,1],Pru:[11,8,1],Tru:[11,8,1],Lambda:[11,8,1]},"pNbody.pyfits.ColDefs":{info:[5,9,1],add_col:[5,9,1],change_unit:[5,9,1],change_name:[5,9,1],del_col:[5,9,1],change_attrib:[5,9,1]},"pNbody.iclib":{generic_Mx:[31,8,1],exponential_disk:[31,8,1],generic_Mr:[31,8,1],miyamoto_nagai_f:[31,8,1],generic_Mx1D:[31,8,1],generic_alpha:[31,8,1],nfwg:[31,8,1],miyamoto_nagai:[31,8,1],burkert:[31,8,1]},"pNbody.units.Units":{GatherBaseUnits:[41,9,1]},"pNbody.mpi":{mpi_recv:[43,8,1],mpi_GatherAndWriteArray:[43,8,1],mpi_ExchangeFromTable:[43,8,1],mpi_ReadAndSendArray:[43,8,1],mpi_find_a_toTask:[43,8,1],mpi_allreduce:[43,8,1],mpi_getval:[43,8,1],mpi_GetExchangeTable:[43,8,1],mpi_max:[43,8,1],mpi_rprint:[43,8,1],mpi_sendrecv:[43,8,1],mpi_argmin:[43,8,1],mpi_gather:[43,8,1],mpi_AllgatherAndConcatArray:[43,8,1],mpi_min:[43,8,1],mpi_allgather:[43,8,1],mpi_send:[43,8,1],mpi_histogram:[43,8,1],mpi_pprint:[43,8,1],mpi_sarange:[43,8,1],mpi_len:[43,8,1],mpi_argmax:[43,8,1],mpi_bcast:[43,8,1],mpi_arange:[43,8,1],mpi_ReadAndSendBlock:[43,8,1],mpi_iprint:[43,8,1],mpi_mean:[43,8,1],mpi_sum:[43,8,1],mpi_OldGatherAndWriteArray:[43,8,1],mpi_reduce:[43,8,1],mpi_OldReadAndSendArray:[43,8,1]},"pNbody.profiles":{burkert_mr:[66,8,1],nfws_profile:[66,8,1],nfw_mr:[66,8,1],jaffe_mr:[66,8,1],pisothm_mr:[66,8,1],generic2c_profile:[66,8,1],king_profile:[66,8,1],burkert_profile:[66,8,1],king_Rc:[66,8,1],hernquist_profile:[66,8,1],jaffe_profile:[66,8,1],nfwg_mr:[66,8,1],plummer_mr:[66,8,1],king_surface_density_old:[66,8,1],hernquist_mr:[66,8,1],plummer_profile:[66,8,1],generic2c_mr:[66,8,1],pisothm_profile:[66,8,1],nfws_mr:[66,8,1],king_profile_Rz:[66,8,1],nfwg_profile:[66,8,1],hernquist_mR:[66,8,1],nfw_profile:[66,8,1],king_surface_density:[66,8,1]},"pNbody.pyfits.FITS_rec":{field:[5,9,1]},"pNbody.cosmolib":{Age_a:[36,8,1]},"pNbody.pyfits.FITS_record":{field:[5,9,1],setfield:[5,9,1]},"pNbody.pyfits.GroupData":{par:[5,9,1],setpar:[5,9,1]},"pNbody.nbdrklib":{Compute:[39,8,1],IntegrateOverDt:[39,8,1]},"pNbody.palette":{readlut:[6,8,1]},"pNbody.pyfits":{getheader:[5,8,1],TableHDU:[5,10,1],new_table:[5,8,1],PrimaryHDU:[5,10,1],open:[5,8,1],append:[5,8,1],ColDefs:[5,10,1],Header:[5,10,1],writeto:[5,8,1],Delayed:[5,10,1],StreamingHDU:[5,10,1],GroupsHDU:[5,10,1],Section:[5,10,1],Undefined:[5,10,1],ErrorURLopener:[5,10,1],getval:[5,8,1],Column:[5,10,1],update:[5,8,1],HDUList:[5,10,1],GroupData:[5,10,1],VerifyError:[5,12,1],fitsopen:[5,8,1],getdata:[5,8,1],info:[5,8,1],CardList:[5,10,1],FITS_record:[5,10,1],BinTableHDU:[5,10,1],ImageHDU:[5,10,1],FITS_rec:[5,10,1]},"pNbody.fourier":{fourier:[30,8,1]},"pNbody.libutil":{vel_cyl2cart:[14,8,1],add_box:[14,8,1],apply_filter:[14,8,1],tranfert_functions:[14,8,1],drawxticks:[14,8,1],GetMassMap:[14,8,1],GetMeanValMap:[14,8,1],get_eyes:[14,8,1],GetSigmaMap:[14,8,1],GetSigmaValMap:[14,8,1],log_filter:[14,8,1],getval:[14,8,1],mplot:[14,8,1],geter2:[14,8,1],vel_cart2cyl:[14,8,1],contours:[14,8,1],compress_from_lst:[14,8,1],getr:[14,8,1],drawyticks:[14,8,1],getvaltype:[14,8,1],Extract1dMeanFrom2dMap:[14,8,1],geter:[14,8,1],myhistogram:[14,8,1],extract_parameters:[14,8,1],phys2img:[14,8,1],invgetr:[14,8,1],RotateAround:[14,8,1],get_image:[14,8,1],sbox:[14,8,1],log_filter_inv:[14,8,1],GetMeanMap:[14,8,1],set_ranges:[14,8,1],GetNumberMap:[14,8,1]},"pNbody.liblog":{Log:[57,10,1]},"pNbody.montecarlolib":{mc2d:[42,8,1],mc3d:[42,8,1],mc1d:[42,8,1]},pNbody:{montecarlolib:[42,7,1],plummer:[29,7,1],Movie:[9,7,1],ic:[7,7,1],pygsl:[56,7,1],treelib:[48,7,1],myNumeric:[34,7,1],pyfits:[5,7,1],ctes:[65,7,1],palette:[6,7,1],parameters:[60,7,1],peanolib:[44,7,1],libdisk:[63,7,1],param:[46,7,1],units:[41,7,1],rec:[32,7,1],main:[64,7,1],cooling_with_metals:[37,7,1],nbdrklib:[39,7,1],cosmo:[3,7,1],thermodyn:[11,7,1],mapping:[2,7,1],mpi:[43,7,1],liblog:[57,7,1],talkgdisp:[0,7,1],nbodymodule:[26,7,1],tessel:[24,7,1],asciilib:[22,7,1],libmiyamoto:[49,7,1],phot:[61,7,1],libgrid:[45,7,1],fortranfile:[51,7,1],geometry:[4,7,1],cosmolib:[36,7,1],libqt:[21,7,1],profiles:[66,7,1],iclib:[31,7,1],libutil:[14,7,1],coolinglib:[10,7,1],fourier:[30,7,1]},"pNbody.pyfits.HDUList":{info:[5,9,1],readall:[5,9,1],update_tbhdu:[5,9,1],writeto:[5,9,1],index_of:[5,9,1],flush:[5,9,1],close:[5,9,1],append:[5,9,1],update_extend:[5,9,1]},"pNbody.myNumeric":{roty:[34,8,1],rotx:[34,8,1],Interpolate_From_2d_Array:[34,8,1],rotz:[34,8,1],hnd:[34,8,1],whistogram:[34,8,1],turnup:[34,8,1],quadinterp1d:[34,8,1],spline3d:[34,8,1],quaddinterp1d:[34,8,1],splint:[34,8,1],polint:[34,8,1],getmask:[34,8,1],histogram2d:[34,8,1],vprod:[34,8,1],ratint:[34,8,1],Interpolate_From_1d_Array:[34,8,1],lininterp1d:[34,8,1],test:[34,8,1],spline:[34,8,1],expand:[34,8,1]},"pNbody.pyfits.GroupsHDU":{size:[5,9,1]},"pNbody.phot":{LvtoMv:[61,8,1],MvtoLv:[61,8,1]}},terms:{entropi:[64,14],secondli:18,prefix:[40,8],dist:[25,14],palettedir:8,whose:51,typeerror:5,"_validhdu":5,openmpi:23,compress_from_lst:14,under:[16,52,55,58,12,15],mr_spheric:64,keylist:5,spec:[10,5],everi:[],rec:[12,16,32],getpo:59,libgrid:[12,16,20,13,45],gnu:23,computedensityandhsml:64,exponnenti:[7,20],vector:[47,34,20,4,45,7,43,63,64],matric:[2,14],verif:5,get_npart_tot:64,nfw_profil:66,initialis:[],nb_halo:20,throught:[],direct:[20,13,64],second:[37,49,14,5],allgath:43,follow:[1,47,51,20,23,40,7,8,5,64,31],even:[54,5],mpeg:23,weighted_numngb:64,a_non_existing_fil:27,lunix:[],commonnam:5,neg:[],generatin:18,"new":[1,33,54,45,64,23,8,5,41,13,47,67],max_buffer_s:[],nep:7,intriangl:24,never:[12,16,55],here:[20,13],get_mass_tot:64,set_unitsparamet:64,argv:[1,54],path:[33,17,8,27,54],interpret:[62,1,47,67,16],phys2img:14,dedict:20,precis:[64,51],credit:47,permit:[],spec_info:64,fourier:[12,16,30],offp:45,offr:45,offt:45,immin:[],offx:45,logfram:57,mkmap2dsph:2,miyamoto_nagai_f:31,unix:[],offi:45,total:[7,26,64,47,5],univ:36,unit:[16,33,50,3,37,41,61,5,12,64,65,47],plot:[20,13,21,14,64],describ:[],would:5,rebox:64,peanolib:[12,16,44],call:[47,64,54,27,5],type:[46,33,34,5,64,25,59,27,43,13,47],tell:54,relat:5,inv_viewport:4,warn:[63,64,66],"0x2db70c0":[],set_paramet:64,exce:[],isatti:[],loss:[],recommand:33,must:[1,33,45,59,8,10,5,41,63,64],insterest:20,word:27,err:5,setup:40,work:[64,8,67,54],strerror:[],root:[40,43],get_histocent:64,line_buff:[],overrid:[],defer:[],integrate2:37,kinet:[64,14],"99792458e8":41,give:[47,54,20,51,59,9,13],begtask:43,indic:[16,63,45,5],want:40,end:[64,8,54,27,5],"22044604925e":47,how:[1,13,50,16,5,47,67],gather_mass:64,env:[1,54],numarrai:47,verifi:5,config:[25,33,8],asciilib:[12,16,22],updat:5,montecarlolib:[12,16,42],lam:[],recogn:[],less:[],initial_valu:[],after:5,index_of:5,paticl:64,befor:[51,20,54,9,5,47],wrong:64,box_mx:7,mvsun:61,parallel:[16,54,23,27,62,64,67],averag:64,attempt:5,obsolet:[12,16,66,15],get_first_deriv:45,curent:19,get_interpolation_on_spherical_1d_grid:45,enter:40,lambda:[13,37,10,11,64,14],order:[64,47,4,23,7,43,13,14],output_verifi:5,make_default_vars_glob:64,over:[2,39,54,5,43],becaus:5,veri:[1,13,27,14,67],rgb_tabl:[33,8,6],afil:27,flexibl:5,vari:[20,51],irand:7,zmode:64,getallhsml:59,directli:5,fit:5,sigma_r:[],fix:[],"1xn":64,frsp:[25,64],unit_pa:41,offic:5,isotrop:13,urlretriev:5,mpich:[],split:43,getvoronoi:24,them:64,thei:[20,5],"_tablebasehdu":5,unitmass_in_g:[41,25,64],band:61,memory_info:64,ascardlist:5,software_hardwar:5,nfws_mr:66,grmin:13,each:[13,18,51,47,20,54,45,59,5,64,14,67],coolinglib:[12,16,10],dv_mean:64,mean:[16,64,54,25,59,43,13,14],extract:[20,14],nbodymodul:[12,16,26],goe:[20,8],facil:67,content:[16,46,33,54,5,12],prerequist:[16,23,19],adapt:13,reader:[],lib64:27,linear:[34,20,45,29,13,14],object_info:64,get_points_on_spherical_3d_grid:45,mden:64,standard:[40,23,5],npart_per_proc:64,coolingfil:[25,64,11],angl:[25,64,4,14,47],traceback:27,cosmic:3,filter:[25,14],iso:[24,14],isn:[],"0x3850690":[],rang:[64,34,14],render:[20,25],independ:54,get_r:[20,13],localsystem:11,instruct:47,alreadi:[64,67,5],thick:7,primari:5,seekabl:[],top:5,getaccelerationincylindricalgrid:64,evolut:18,master:[46,54],too:[],get_potentialmap_on_spherical_1d_grid:45,computesigmamap:64,cheeseshop:23,npart_al:[64,43],writecomplet:5,somewhat:[],psudo:5,read_dump:[],get_npart:64,keyword:5,convert_ct:65,provid:[13,48,18,20,33,5,17,47],tree:[47,64,48,45,43],"final":[47,54,20,64,8,13],project:[20,4,26,14,64,66],mpi_argmax:43,aproch:[],king_surface_dens:66,expd:[7,20],gif:[23,47],pnbody_checkal:8,raw:[],manner:5,seen:[20,64,4],newunit:41,seek:[],imagepil:21,simplai:43,maxx:64,latter:[33,54],mkmap3dslicesph:2,maxi:64,fname:51,initmpi:59,prevou:54,mpi_bcast:43,object:[16,46,64,34,54,47,20,5,4,7,27,43,62,13,14,67],what:[25,5],boltzmann:41,talkgdisp:[0,12,16],phase:64,jean:[16,49,13,18,29],bytesio:[],get_accumulation_along_axi:45,doc:[],log_filt:14,metal:[25,64],log_filter_inv:14,doe:[64,5,27,43],dummi:[],declar:[],groupshdu:5,tform:5,rk78:64,section:5,has_kei:5,trianl:24,random:5,radiu:[47,20,64,7,13,66],get_rsp_approxim:64,gettriangl:24,protocol:[],gadget_z00_sub:47,absolut:[],get_volumemap_on_carthesian_3d_grid:45,libari:54,configur:[16,33,19],geter2:14,burkert:[7,31,20,66],new_unit:5,displi:47,infti:[],report:[],toolbox:67,loadparticl:59,byteord:[20,64,47,43],method:[0,46,64,51,21,57,9,5,41,13,47],twice:[],"_formatp":5,"_formatx":5,fieldnam:5,get_npart_and_npart_al:64,num:[47,20,64,14,43],result:[20,47],memmori:5,fail:7,best:5,rename_kei:5,tensor:64,integrateusingrk:64,variat:20,an_existing_fil:27,imagehdu:5,attribut:[54,5],nbody_default:[64,47],accord:[20,64,43],triplet:44,"085e":25,vprod:34,bufferedrandom:[],xrang:27,get_potentialmap_on_spherical_3d_grid:45,omp:[12,16,52],ymax:45,extent:54,exponential_disk:31,steep:20,howev:13,dtout:64,com:23,"2nd":5,diff:63,assum:[31,5,43],summar:5,duplic:5,mpi_exchangefromt:43,integrateoverdt:39,union:5,numpi:[64,20,23,27,13,14],mplot:14,been:[54,67,47,5],ntask:[64,43],mode_sigma_p:13,desing:67,basic:23,mode_sigma_z:[],vcirc:[29,49],getval:[14,5],xxx:[],get_imag:14,ani:[20,8,5],extract_paramet:14,dl2_mr:7,configuratio:33,spin:[26,64],ident:20,formatsdir:8,properti:24,acrod:43,aim:[13,64],calcul:[26,34],mpi_sum:43,pickabl:27,persp:[25,64],higer:14,have:[34,54,20,7,8,27,5,64],kwarg:[51,5],n_i:43,sever:67,perform:[40,47,67,54],make:[64,67,5],thermodyn:[12,16,11],"435693e":25,unitsystem:[41,64],complex:13,get_potentialmap_on_carthesian_3d_grid:45,getexchang:43,electro:14,complet:[59,5],dr_potenti:49,galact:13,get_mxntp:64,rais:[27,5],squar:20,redefin:67,kept:[],epx:7,inherit:[],client:[],centrer:[],everyth:[20,8],tha:47,left:[64,4],intriangleoroutsid:24,just:51,pygadget:[12,16,59,48],newton:7,getsurfacedensityincylindricalgrid:64,end_of_fil:27,getalltypesq:59,yet:[64,5],languag:67,mplayerhq:23,expos:[64,4],defaultparamet:[25,33,8],change_nam:5,fortran:51,spread:43,save:[1,46,47,14],opt:[33,8,14,47],applic:23,offz:45,box_opt:14,interpolate_from_2d_arrai:34,background:25,get_volumemap_on_spherical_3d_grid:45,rotate2:[],plummer_profil:66,specif:[33,47,4,26,5,64,14],manual:5,gather_num:64,localdir:8,underli:[],www:[23,5],right:[13,4,64],old:[64,45,5],deal:[16,51,50,6,5],interv:[20,64],maxim:[13,64],init_unit:64,intern:[3,5],get_list_of_var:64,interg:14,get_default_spec_var:64,cart2sph:64,ymin:45,bottom:5,subclass:[],python_directori:[],suffici:5,t11:47,readblock:[],foc:[25,64,4],condit:[16,64,18],nallhw:47,core:[7,66],immut:[],generic2c:[7,20,66],epfl:27,rotate_old:64,obj:4,simul:47,getradiusincylindricalgrid:64,closefd:[],attrib:5,qnumarrayimag:21,mplayer:23,vel_cyl2cart:[64,14],surfacedens:49,"float":[46,51,43,25,27,5,64,14],encod:[],get_surfacedensitymap_on_carthesian_2d_grid:45,mpi_readandsendblock:43,wrap:23,wai:[13,18,64],support:[54,19,5],transform:[64,4,14],avail:[52,58,5,55,15],width:[46,64],kuzmin:[7,20],fraction:[25,64,54],overhead:59,head:[25,64,14],form:64,offer:13,forc:[64,54,5],epsilon:[],read_dmp:27,heat:64,fitsopen:5,gamma_halo:20,solar:61,sigma_z:[64,49],"true":[64,13,27,5],circumcircleproperti:24,get_surfacedensitymap_from_cylindrical_2dv_grid:45,new_nam:5,get_sigmavalmap:13,maximum:[47,64,54,14,43],until:[],url:5,new_tabl:5,linux2:47,repartit:43,"abstract":[],hernquist_profil:66,computesigmahisto:64,computegridparamet:7,exist:[62,16,47,27,5],readreal:51,pnbodi:[0,1,2,3,22,5,6,7,8,9,10,11,17,14,16,13,18,19,20,21,4,24,25,26,27,29,30,31,33,34,36,37,39,40,41,42,43,44,45,46,47,49,51,54,56,57,23,59,61,62,63,64,65,66,67],check:[16,33,19,54,20,64,8,27,5,13],change_attrib:5,pipe:[],readonli:5,nx1:64,generic2c_profil:66,get_numbermap_on_spherical_1d_grid:45,when:[5,8,54,43],test:[24,34,67],snapshot:47,node:[2,54,45,43,64,13],get_numbermap_on_carthesian_3d_grid:45,intend:[],findmax:54,stringio:[],turnup:34,nb_sub:47,consid:27,omega:[64,49],writefct:64,m_electron:41,deafult_buffer_s:[],writeblock:[],pseudo:[7,20,66],ignor:[],nmin:14,time:[3,37,64,14],shdu:5,backward:5,update_extend:5,unitparameterfil:64,skip:[9,43],global:[64,54],testfct:[],checkfil:27,lvtomv:61,primer:20,row:5,mpi_max:[54,43],get_points_on_cylindrical_2dh_grid:45,hold:13,depend:[40,13,14,5],graph:20,get_ey:14,readabl:[],inerti:64,yve:[],vec:[64,27,43],getparamet:59,vel:[13,20,64,7,47,14],mkmap2d:2,luminos:[61,14],king_rc:66,sourc:[40,16,64,19,43],string:[25,51,46,5],cool:[16,37,25,10,12,64,53,14],dim:[34,14,5],level:[20,25,14,5],did:8,proc:[64,54,43],iter:[],item:5,r_ob:[25,4],"828e":41,plummer:[16,18,20,7,12,29,13,66],peek:[],rho_1:[],rho_2:[],"419e":41,ptree:64,current:[47,52,25,55,58,59,8,9,64,15],pnbody_copi:[33,13,47],deriv:[49,51,45,29,63,13],rho_c:3,boxsiz:[64,47],gener:[16,47,18,20,7,27,28,13,14],rs_halo:20,satisfi:5,linalgerror:[],modif:7,address:0,extver:5,along:[20,13,45,14],box:[20,4,25,7,64,14],mxntpe:[20,47],shift:64,computemeanmap:64,primaryhdu:5,vectori:34,get_densitymap_on_spherical_3d_grid:45,apply_filt:14,getsigmamap:14,nmax:7,useful:[64,20,45,23,13,14],pluginsdir:8,bzero:5,modul:[0,2,3,22,5,6,7,9,10,11,12,14,15,16,20,21,4,23,24,26,27,29,30,31,34,32,36,37,39,40,42,43,44,45,46,47,48,49,51,52,53,55,56,57,58,59,60,61,41,63,64,65,66,67],loadparticles2:59,prefer:67,nodispert:[],get_cooling_time_from_density_temperature_feh:37,marker:14,instal:[16,33,19,54,40,8],should:[48,64,8,14,54],planck:41,add_blank:5,adaptativesoften:[],selecti:64,memori:[59,64,67,5],univers:[],selectc:[1,64,47,54],prec:51,impos:20,vel_cart2cyl:[64,14],epsx:64,epsv:64,exonenti:7,selectp:[64,47],set_local_system_of_unit:64,loadparticlesq:59,set_rang:14,rigid:64,vmax:64,tranfer:14,logarithm:13,graphic:[33,67,54],peano2xyz:44,mkmap1dn:2,uniqu:[64,5,43],mkmap1dw:2,descriptor:[],can:[1,33,51,20,54,8,9,5,47,67],purpos:13,readrecord:51,gadget_z:[1,54],stream:5,sph:[59,25,2,64],critic:3,cube:20,hydrogen:[25,64,10],mpi_gatherandwritearrai:43,alwai:5,multipl:64,ptreelib:[12,16,15],skiphead:27,write:[1,47,54,51,43,57,27,5,64],consist:[64,51],streaminghdu:5,map:[16,2,54,52,25,26,5,12,64,47,14,67],product:[23,34],mat:[21,45,14],max:[64,54,25,7,47,14],rmax:[64,20,45,7,13,14],set_tp:64,usabl:[],xtick:14,xzf:40,mpi_reduc:43,"_extensionhdu":5,mai:[20,13,67,47,5],data:[51,21,43,9,27,5,14],newlin:[],array_lik:[],divid:31,explicit:64,predic:[],brodcast:43,inform:[47,5],"switch":[],combin:5,block:[5,43],talk:0,epydoc:5,interpolate_from_1d_arrai:34,zmax:[7,45],file2:64,trianglemedian:24,nfw_mr:[7,66],file1:64,increas:[20,64,5],lst:[64,14],still:[52,58,55,15],dynam:13,equiv:[],group:5,polici:[],check_arrai:64,tork:64,pyathonpath:[],platform:[],window:[46,8],vtr:[64,14],main:[12,16,64],xyz:44,non:[13,14,5],initi:[16,13,54,18,64],histogram2d:34,lunch:54,half:45,now:[33,54,20,40,47,41,63,13],nor:13,name:[46,33,54,20,25,64,7,9,27,5,13,14,57],perspect:[25,26,4],revers:[64,43],baserawio:[],separ:[59,64,4,5],mkmap2dnsph:2,get_points_on_cylindrical_3d_grid:45,readfit:[],compil:[40,16,23,59,19],replac:[48,9],spline3d:34,gaussian:47,redistribut:64,tempertur:[47,67],exang:43,referenc:5,vtr2:14,space:[25,64,18,47,5],hernquist_mr:66,profil:[16,64,18,20,7,12,13,66],"5mdk":47,factori:5,nofil:27,million:67,cart:[64,14],get_cooling_time_from_density_energyint_feh:37,maxnumngbdevi:64,force_comput:64,blksize:[],org:23,"byte":[51,5],card:5,header_prec:51,libmiyamoto:[12,16,49],setdefault:3,badli:66,open_and_writ:64,synchron:43,genericdistribut:20,motion:64,turn:34,place:[64,5],mkmap3d:2,first:[64,18,54,47,37,45,7,63,27,5,29,13,14,49],origin:[7,64,4],usetre:[13,64],easyli:47,onc:[7,5],arrai:[47,34,51,24,20,5,4,45,66,9,27,43,64,14],has_arrai:64,q_electron:41,stsci:5,open:[1,47,16,54,9,27,5,62,64],angular:[26,47,64],size:[47,51,20,54,4,25,45,7,5,63,64,14],convens:47,given:[46,2,34,51,3,31,5,54,64,24,7,26,43,41,13,65,14,59],pamap:26,local_max:54,nbodydefault:[13,64],mpi_gath:43,cumul:20,bufferedread:[],circl:[24,20],whith:64,isothm:[7,20],frame:14,copi:[47,33,45,5],specifi:[64,8,51,14,5],broadcast:43,liblog:[12,16,57],lage:67,than:[40,47,49,45,54],denot:[],"6732e":41,f_m:30,aproxim:64,posit:[47,31,4,25,26,9,5,64,14,59],l_n:25,cosmolog:3,seri:[20,17],pra:11,flag_cool:47,age_a:[3,36],elev:64,argument:[7,64,54,20,5],nbodi:[1,47,54,20,25,7,64],pru:11,prt:11,setparamet:59,getalltyp:59,rotatearound:14,readal:[9,5],mesur:13,phi_xi:64,note:[64,54,5],take:[7,13,20,64],users_manual1:5,environ:8,noth:[64,43],libutil:[12,16,14],begin:[1,27],sure:5,fct:7,normal:[37,64,14,11],buffer:[],get_symetrisation_along_axi:45,compress:14,beta:[],"0x3aaa420":43,pair:5,renam:[1,64,54,47,5],getallid:59,readint:51,get_points_on_cylindrical_2dv_grid:45,runtim:51,generic_alpha:[7,31,20],defaultconfig:33,axi:[64,34,20,4,25,45,7,26,47,13,14],sigma:[64,20,7,66,29,13,14],slope:[20,34],currentmodul:[],show:[1,64,54,20,57,47,13],ndtype:27,phi_xyz:64,convol:26,ratint:34,mvtolv:61,getmeanvalmap:14,help:47,onli:[47,19,54,31,43,4,45,5,64,67],ratio:64,elemet:34,nall:47,get_massmap_on_carthesian_2d_grid:45,dict:27,unitmass:25,homospher:[7,20],get:[46,64,54,24,37,4,45,59,5,13,47],fortranfil:[12,16,51],newkei:5,cannot:5,physct:41,requir:5,fileno:[],unitlength:25,get_histocenter2:64,sbox:14,get_velocities_from_adaptativespherical_grid:13,median:24,yield:[],xmax:[7,45,14],bscale:5,where:[33,34,51,20,54,45,64,43,17,14],has_var:64,summari:5,kernel:26,polint:34,infinit:7,samxyz:26,frustrum:4,label:[20,27,14],between:[54,20,4,45,25,63,64,14],"import":[1,13,54,20,27,47],read_ascii_valu:46,getindex:64,assumpt:51,betwen:14,get_genericmap_on_spherical_1d_grid:45,screen:8,num_fil:47,virial:[],mpi_rprint:43,region:[20,13,47,64],pisothm:[7,20],voronoi:24,mont:42,tutori:[62,16,47],mani:5,l_min:[25,14],cosmictime_a:3,among:[47,54],acceler:[59,26,45,64],color:[25,33,14,6],read_cool:[],pot:64,sigma_t:49,nlocal:43,partial_rleft:[],invert:7,theap:5,invers:[7,13,14,64],dl2:[7,20],valueerror:[],thistask:54,resolut:[20,16,7,13,18],do_not_sort:64,usual_numngb:64,those:[51,5],"case":[64,20,8,27,5,47],hdu:5,kappa:49,hdr:5,rtype:5,get_symetrisation_along_axis_old:45,nfws_profil:66,lut2:47,add_com:5,add_col:5,cluster:67,good:[13,8,64],lininterp1d:34,writeint:51,luminosti:64,asmatrix:[],ascii:[46,64,22,27,5],par:[3,5,11],mode2:64,characters_written:[],mode1:64,same:[47,34,49,51,54,5,64],binari:[47,20,43,7,5,64],html:23,pad:5,get_rotation_matrix_to_align_with_main_axi:64,getallmassesq:59,document:16,get_volumemap_on_cylindrical_2dv_grid:45,exchangeparticl:64,ness:51,decompress:[40,16,19],"3144e":41,capabl:[23,67,5],copyonwrit:5,writedatablock:[],burkert_profil:66,appropri:[7,5],get_densitymap_on_carthesian_3d_grid:45,markup:5,clobber:5,without:[64,67],gather_vec:64,model:[16,64,54,20,38,4,7,26,47,62,29,13,31],gather_vel:64,dimension:[63,45],get_list_of_arrai:64,get_massmap_on_cylindrical_2dh_grid:45,computemeanhisto:64,"0220e":41,execut:1,rest:5,processu:54,get_massmap_on_cylindrical_3d_grid:45,speed:64,mpi_allgatherandconcatarrai:43,struct:51,hint:[],isothrop:13,except:5,littl:[20,64,51,47,43],paral:54,rescal:14,overview:[16,67],treeaccel:64,verctor:20,mpi_sarang:43,momentum:[47,26,14,64],mpi_arang:43,real:[63,45,14,51],around:[47,34,4,64,26,13],read:[33,54,51,5,22,6,9,27,43,64,67],get_str:46,temperatur:[64,14,10,47],grid:[16,64,20,45,7,28,13],chmod:1,convertionfactorto:41,sum_:30,nost:5,integ:[51,43,5,63,64,14],server:0,mpi_mean:43,readlut:6,either:64,unitvelocity_in_cm_per_:[41,25,64],output:[16,54,4,8,5,62,64,14],interest:13,showmap:54,sphere_mr:7,pythonwar:23,classextens:5,computehisto:64,partial_:[],slice:[1,2,54],definit:[33,5],achiev:47,legal:[],cylindr:[16,64,18,45,13,14],complic:67,refer:[12,16,64],power:41,radial:[16,64,54,20,29,13,14],ltot:[64,47],winheight:46,writerecord:51,d2z_potenti:49,"throw":[],acc:64,central:20,nsph:25,neighbor:[25,64,59],act:64,vz2:14,"2x2":14,processor:[54,43],routin:[7,64,48,20],redshift:47,get_numbermap_on_spherical_3d_grid:45,splint:34,coodin:[64,14],cyclindr:66,your:[1,47,54,40,8,13],jaffe_profil:66,buffer_s:[],weight:[25,64,34,47],setpar:5,bissector:7,overwrit:5,get_points_on_carthesian_2d_grid:45,start:[54,47,5],interfac:[],lot:[8,18],gravit:[59,13,64],get_lambda_from_density_entropy_feh:37,mkmap1d:2,linalg:[],tupl:[25,5,43],quadinterp1d:34,jul:47,getdata:5,viewport:4,possibl:[47,54,20,51,40,13],"default":[16,33,19,51,3,25,64,40,7,59,5,13,47,14],creat:[16,64,54,47,20,5,41,43,62,13,14,67],deep:5,mpi_allgath:43,decreas:[20,13],file:[1,33,54,16,20,51,22,6,57,40,62,25,9,27,5,35,64,47,67],get_points_on_carthesian_3d_grid:45,fill:5,qtplot:21,again:47,nbody_gadget:47,mpi_sendrecv:43,readinto:[],coldef:5,field:5,defaultparam:14,rawio:[],writabl:[],you:[1,33,54,40,8,5,47],get_surfacemap_on_carthesian_2d_grid:45,sequenc:[14,56,51],symbol:41,docstr:5,mass_tot:[20,64,47],polynomi:34,frum_num:64,reduc:[20,13,64,43],homodisk:[7,20],directori:[1,33,57,40,47,13],getallacceler:59,mask:34,rxy:64,mass:[16,47,18,20,25,45,7,59,66,64,14],parallelism:[62,16,54],potenti:[64,49,45,26,29,13,59],togeth:[],disp:5,represent:[46,4],all:[33,54,20,5,39,26,27,43,64,47],sci:5,illustr:[54,5],"0x2b82540":[],allpotenti:59,unitsysnam:41,bytearrai:[],obsm:14,reson:13,inertial_tensor:64,disk:[7,47,8,20,31],pygsl:[12,16,56],errtoltheta:[13,64],read_ascii:27,init_cool:37,white:20,linesep:[],init:[37,64,59],ylabel:[20,13],norm:[64,4],mpi_recv:43,fals:[7,64,27,14,5],mpi:[16,54,23,59,27,43,12,64,67],ytick:14,hubbleparam:[3,25,47],fall:[],fab:[1,54],regrion:20,mpi_allreduc:43,flag_sfr:47,dx_mean:64,list:[46,24,5,25,7,27,43,41,64,14],dpotenti:29,small:14,revaz:[27,6],writearrai:[],dimens:[7,64,56],correct:45,electrondens:11,diment:14,zero:[64,34,14],pressur:[64,14],design:67,pass:[],further:54,whenc:[],tcool:[64,14],hernquist:[7,20,66],sub:[64,14],unitsparam:64,sun:61,sum:43,crush:[25,14],delet:5,memmap:5,"public":5,full:[],nb3:47,nb2:47,nb1:47,get_accelerationmap_on_cylindrical_2dv_grid:45,sophist:[],strong:47,modifi:[20,33,66,64],valu:[46,33,34,51,47,5,25,45,64,7,59,43,41,63,13,14,67],amoung:64,search:[16,5],conta:[],extrahead:[],gettre:64,setfield:5,amount:5,mc1d:42,magnitud:61,point:[47,54,24,4,45,7,26,64,14,59],data_typ:43,timestep:37,transit:20,tablehdu:5,filenam:[46,51,6,57,27,5,64],heurist:[],select:[1,47,54,16,62,64],cvcenter:64,regist:[],two:[16,34,18,54,20,45,23,5,62,47,14],"0000000000000001e":64,taken:[25,33],mpi_send:43,more:[16,54,20,45,5,62,47],allacceler:59,desir:[7,64],int_r:[],fonction:[64,14],flag:[25,64,5],default_buffer_s:[],known:64,none:[0,46,64,20,5,4,25,45,57,7,9,27,43,63,13,14],histori:5,cooling_with_met:[12,16,37],den:64,mr_fct:7,accept:5,histocent:64,sphere:[20,16,7,13,18],minimum:[64,14,43],axix:20,explor:[47,67],cours:[13,8,54],axis1:[64,4],axis2:[64,4],mape:2,unit_kg:41,anoth:[40,13],divis:7,getmask:34,reject:[64,14],carthesian:[64,45,14],simpl:[33,54,24,20,7,27,14],optdir:8,flag_ag:47,resourc:5,amximum:43,get_massmap_on_carthesian_3d_grid:45,get_surfacemap_on_cylindrical_2dh_grid:45,plane:[25,64,4,14],inquiri:[],associ:[47,5],welcom:16,stabil:[],circumst:20,"short":[],ambigu:5,caus:5,ortho:4,spheric:[16,64,18,20,45,13],egg:[],rotat:[64,34,4,26,47,14],through:[],hierarchi:[],lweight:14,paramet:[16,46,33,19,51,3,37,4,25,64,41,7,59,60,27,5,12,13,14,67],epot:[26,64],imheight:46,align2:64,nbdrklib:[12,16,39],pysic:25,scipi:23,"return":[2,3,43,7,45,10,13,14,20,4,24,25,26,27,29,34,36,31,5,44,46,49,56,59,61,41,64,42],gadget:[1,64,48,54,20,59,8,47,13],untransl:[],rank:54,dist_ey:[25,64,4],mpi_histogram:43,oper:47,spec_vect:64,get_n:64,ampmap:26,easili:47,iff:[],radian:[64,4],a_cosmictim:3,found:[64,8,27,5],nfwg:[7,31,20],computemap:64,truncat:[],printparamet:37,getpotentialincylindricalgrid:64,change_unit:5,getradialvelocitydispersionincylindricalgrid:64,phi:[30,13,49],realli:64,expect:5,slave:[],energi:[64,26,14,10,5],orient:67,mynumer:[12,16,34],sort_typ:64,print:[1,46,54,37,43,5,41,64],mc2d:42,advanc:[],myhistogram:14,effect:[],base:[41,64,48,59],ask:54,"6022e":41,vrxyz:64,b_weight:25,veloci:64,rxyz:[64,47,54],veloc:[16,64,18,4,59,29,13,14,49],omit:[],phi_m:30,"5th":5,major:64,exchang:[64,43],number:[64,51,20,25,45,7,59,27,5,13,14],frmax:7,talkserv:0,vetor:14,done:47,construct:[16,24,55,52,58,5,12,15],blank:5,m_proton:41,readfct:64,trapez:63,betwe:64,differ:[33,18,54,64,47,13],exponenti:31,interact:67,least:41,vxyr2:14,vxy:64,statement:[],ttype:5,dt0:64,store:[33,5],interti:64,option:[33,51,54,40,25,9,5,64],get_ntyp:64,"0x22be570":[],get_massmap_on_spherical_1d_grid:45,part:[59,18,5],dzphi:49,parnam:5,off:[25,64],"_temphdu":5,king:66,scheme:37,contrari:[64,8],other_directori:40,get_lambda_from_density_temperature_feh:37,dispers:[16,13,64],horizont:[],str:[],consumpt:67,mpi_getv:43,vx2:14,"6262e":41,comput:[64,54,24,20,39,45,7,59,66,13,14,67],packag:[33,23,25,59,8,27],hubbl:3,write_num:[64,47],"null":5,equival:[5,43],commentari:5,"6750e":41,npart:[20,64,47,43],initdefaultparamet:59,drawxtick:14,also:[13,54,67,5],get_lambda_from_density_energyint_feh:37,build:40,invoqu:13,distribut:[16,2,18,54,20,23,7,42,64,31,66],previou:[20,47,54],reach:27,mixtur:11,most:27,automodul:[],rho:[64,49,47,20,7,66,11,29,13,14],hnd:34,alpha:[7,64,4,25,14],tpe:[20,64,46,47],epicycl:13,ext:5,exp:[20,13,14],azimuth:[16,13,64],get_potentialmap_on_carthesian_2d_grid:45,extkei:5,"3x1":64,"3x3":24,astrophys:5,fine:23,find:[5,54,66,47,43],access:[47,5],copyright:47,get_massmap_on_cylindrical_2dv_grid:45,writer:51,read_on:9,wrape:13,factor:[36,41,64],get_num:64,getallveloc:59,tbox:20,hit:[],palett:[16,54,21,6,12,47,14],get_nbody_tot:64,col_nam:5,"3xn":[64,34,14],get_numbermap_on_carthesian_2d_grid:45,spherical_1d_grid:[20,13],grmax:13,quarternion:[],byter:64,coord:[64,66,14],sigma_:[],common:[],arp:11,set:[16,46,33,18,35,3,20,51,64,7,59,8,27,5,13],art:11,aru:11,dump:27,pisothm_mr:[7,66],flag_entr_:47,l_kx:25,l_ky:25,sec:14,arg:[51,4,7,5,64,14],close:[57,8,27,5],"_imagebasehdu":5,contour:[24,14],analog:5,phiright:[],someth:[8,54],wor:64,unit_mol:41,signatur:[],imagemagick:23,solf:64,gethead:5,distinguish:[],tmax:64,both:64,last:[47,64,27,5],winwidth:46,informatin:47,meanmap:14,d2r_potenti:49,pdf:5,mpi_getexchanget:43,load:[47,67],simpli:[33,54,64,8,5,13,47],skipe:27,get_list_of_method:64,gather_po:64,header:[51,64,27,14,5],carlo:42,vxyr:[64,14],param:[16,46,64,41,5,12,13],suppli:5,epicyclic_approxim:13,becom:[],devid:[20,18],devic:[],due:64,empti:64,nbody_binari:20,txt:27,get_com:5,imag:[46,47,54,21,4,23,25,9,5,64,14],geter:14,coordin:[16,13,18,14,64],gal:41,tangenti:[64,14],look:[64,4,14],hdcenter:64,dz_potenti:49,readarrai:[],mpi4pi:[23,54,43],"while":5,abov:[],error:27,write_dmp:27,x_sigma:64,mc3d:42,fits_record:5,readi:18,centr:[7,64],nb_ga:47,itself:51,quadrat:34,vy2:14,minim:[64,13,5],get_typ:46,combimap:64,funni:20,oldkei:5,decod:[],conflict:5,higher:[63,23,64,45,47],blockingioerror:[],find_var:64,optim:49,mpirun:[59,54],ponder:26,read1:[],moment:[64,14],user:[37,33,67,47,5],chang:[64,51,47,5],focal:[25,64,4],recent:27,lower:[63,45,14],task:54,particul:[7,64],lib:[25,8],add_histori:5,drphi:29,pickl:27,person:2,generic_mx1d:31,mandriva:47,pfennig:14,lin:14,explan:5,gadget_z00:[47,54],pylab:[20,13],"_file":5,groupdata:5,shape:[47,54,43,4,45,25,5,64,14],"6726e":41,regardless:[],get_numbermap_on_cylindrical_3d_grid:45,imwidth:46,mandat:5,cut:[1,25,64,14],extra:5,friedli:14,rgb:14,nfwg_mr:66,dtype:[20,47,27,5],global_max:54,input:[62,16,64,54,5],unlik:[],pnbodypath:[17,8],euler:4,bin:[1,64,54,20,8,43,13,14],"4omega":[],format:[16,33,35,51,23,8,27,5,64,67],big:[64,14],a_z:3,insert:5,bit:51,pmlib:[12,16,55],b_color:25,implemet:64,set_systemunits_from_param:41,delaunai:24,exttt:[],write_dump:[],textiowrapp:[],back:[9,5],unspecifi:[],sampl:[24,59],sight:13,svxyr:64,get_lambda_normalized_from_temperature_feh:37,scale:[7,25,14,5],though:[],per:[25,64,5],arrayob:25,mencod:23,flag_feedback:47,"_hierarch":5,reproduc:7,isothm_mr:7,run:[1,13,8,18,54],pnbody_mpi:54,sigma_zbi:49,bintablehdu:5,delta_n:43,nbody_tot:[20,64,47],hilbert:64,idx:43,boxcut:4,paralel:64,gamma:[7,64,25,66],cutoff:14,gdisp:[],gadgetparameterfil:64,pythonpath:8,within:47,rawiobas:[],statment:[],get_densitymap_on_spherical_1d_grid:45,computeobjectmap:64,create_line3:2,create_line2:2,ensur:[13,8],constructdelaunai:24,triangl:24,spam:[],errno:27,king_profil:66,"long":51,includ:[64,5,43],suit:[],usr:[1,54],nbodypath:17,decomposit:64,msg:43,link:[64,14,47],translat:[20,64,4,47],"0x2f619c0":[],line:[1,2,54,20,57,25,27,47,13],diret:54,info:[47,24,20,43,59,9,5,41,64],concaten:43,utf:[],zprof:64,align_with_main_axi:64,cardlist:5,caller:[],omegalambda:[3,47],readlin:[],similar:64,curv:64,cosmo:[3,12,16],constant:[41,13,65],ex_tabl:43,rmax_halo:20,jaffe_mr:66,doesn:[],repres:[],"char":27,proper:5,treepot:64,matint:14,b_xopt:25,tranfert_funct:14,titl:[],sequenti:[],nan:64,initspec:64,codec:[],transport:5,tbtype:5,nice:20,draw:[64,14],b_yopt:25,thermopar:11,developp:64,amplitud:[26,64],amp_m:30,algorithm:[7,2],nasa:5,eeach:54,far:[64,4],v_sigma:64,svr:64,avoid:20,code:[51,18,5],edg:8,scratch:[62,16,47],zmin:45,soften:[13,26,66,64],edu:5,sphmap:26,privat:5,sensit:5,libdisk:[12,16,63],send:[64,43],z_a:3,ftype:[1,64,54,20,7,47,13],sens:64,get_surfacedensitymap_on_cylindrical_2dh_grid:45,sent:43,objet:47,minert:64,corespond:34,electron:[64,11],volum:45,svtr:64,magic:13,reciv:54,tra:11,"try":[64,47,54],trp:11,tru:11,"_corruptedhdu":5,impli:5,smaller:47,visualis:47,getvaltyp:14,get_default_spec_vect:64,getnumberparticlesincylindricalgrid:64,append:[64,57,5],compat:[],index:[16,43,23,25,5,64,14],pdmap:26,iclib:[12,16,31],cell:[63,7,64,45],matrix_pow:[],deduc:[],expd_mr:7,"__file":5,pnbody_exampl:[1,13,47],len:[20,47,27,56],leo:[25,47,8],bodi:[64,4,67],adiabat:[25,64],l25:66,get_points_on_spherical_1d_grid:45,ioerror:[27,5],vertic:[16,13,64],getnumbermap:14,convert:[23,64,65,14],convers:41,spec_var:64,technolog:5,astrophi:66,hubble_a:3,cte:[12,16,41,65],del_col:5,typic:[],appli:14,approxim:[7,13,64],jaff:66,sgn:64,oval:7,numer:[],from:[1,43,7,13,14,16,19,20,4,25,27,29,33,34,40,41,5,44,46,47,49,51,54,45,62,64],update_tbhdu:5,commun:27,intiti:47,"0x374b960":[],read_num:64,get_npart_al:64,few:67,getallposit:59,get_img:9,mpi_find_a_totask:43,sort:64,givent:59,extens:[1,5],get_accumulatedmassmap_on_spherical_1d_grid:45,boxcut_seg:4,histovel:64,flag_met:47,high:5,account:64,phot:[12,16,61],alia:64,arang:[20,64,27],thin:[1,7],endian:51,control:[],tar:40,process:[64,54],read_param:[],sendalltoal:64,tarbal:[40,16,19],xmin:[45,14],springel:64,get_densitymap_on_cylindrical_3d_grid:45,miyamoto:[7,20,49],serial:48,delai:5,gcc:[23,47],cmcenter:64,getmassmap:14,get_nbodi:64,palette_nam:[21,14],instead:[64,34,54,27,5,47],sim:[],mpi_len:43,from_num:64,mpi_readandsendarrai:43,frac:[],frustum:4,textiobas:[],bresenham:2,pyarrai:34,surfac:[66,64,49,45,47],tier:5,neps_d:7,ldensiti:29,physic:[47,45,5,41,63,64,14,67],velocit:[64,67],"05811936674e":47,light:[47,21,14,6,54],correspond:[46,34,54,24,20,43,45,7,61,5,11,63,64,14],element:[64,47,43],issu:[],binx:43,allow:[20,64,67,27,5],fits_rec:5,king_profile_rz:66,l_max:[25,14],design7:23,movi:[12,16,23,9],move:[64,47],pyraf:5,bufferediobas:[],tessel:[12,16,24],unitsparamet:[25,33,8,64],mpi_min:43,segement:24,outer:[20,13],chosen:[],tstart:64,mpi_pprint:43,pixel:14,handl:[],mpdule:59,dai:64,dat:[1,47,54,20,25,7,27,5,13],testal:[],front:5,desnumngb:64,sobol:56,recarrai:5,parameterfil:8,count_blank:5,mpi_iprint:43,nfw:[7,20,66],astronom:5,king_surface_density_old:66,truth:[],writefit:[],circular:[29,49],whistogram:34,rho2:20,chunk:[],rho0:66,our:54,meanweight:64,special:[20,64,23],out:5,variabl:[16,64,18,20,8,43,13,47],"_vlf":5,get_ob:4,nodes_info:64,loglog:13,develop:[12,16,55],approch:67,identifi:47,spline:34,rel:64,wich:[64,54],math:[],statist:13,pyfit:[12,16,5],insid:[64,4],"3807e":41,manipul:[67,5],msden:64,get_interpolation_on_cylindrical_2dv_grid:45,get_numbermap_on_cylindrical_2dh_grid:45,dictionari:[46,27,5,41,64,14],releas:47,rhob:[7,66],pisothm_profil:66,rho_:[],integrate1:37,ionis:[25,64],put:[],frenk:20,get_velocities_from_virial_approxim:64,counterpart:[],length:[59,7,51,5],transfer:43,geometri:[12,16,20,13,4],dmode:64,endors:5,set_npart:64,"_allhdu":5,mpi_oldreadandsendarrai:43,arctan2:45,ulist:41,generic2c_mr:66,nfwg_profil:66,l_color:25,strict:[],sobol_sequ:56,licens:[47,5],system:[13,39,5,41,64,65,67],messag:5,getallidq:59,unitsparameterfil:8,termin:[],computegridparameters2:7,streelib:[12,16,58],shell:[7,20],recongn:33,obsrevaz:47,exactli:[],rsp:[64,47],get_histori:5,rbox:64,see:[47,25,8,5,64,66],structur:5,charact:51,xlabel:[20,13],incircumcircl:24,pr_fct:7,stdin:27,clip:[25,64,4],nbodydefaultqq:[],respons:64,clearli:54,sphevalu:[64,59],tabl:[16,33,5,43],need:[64,54,47,20,40,23,66,5,13,14],treelib:[12,16,48],errorurlopen:5,rmin:[7,13,20,14,64],min:[25,14],diverg:66,writestr:51,atim:47,builtin:[],fileio:[],configdir:8,which:[13,34,54,5],singl:51,arument:43,unless:[],get_volumemap_on_cylindrical_3d_grid:45,"1e11":47,getmeanmap:14,memeri:[],write_ascii_valu:46,thi:[1,33,5,54,47,20,43,4,6,64,7,59,8,27,11,13,14],toomr:13,histogram:[64,34,14,43],"class":[0,46,33,51,21,57,9,5,41,64,47],getsigmavalmap:14,homogen:[7,31,20],stereo:67,mkmap3dsortedsph:2,ura:11,get_potentialmap_on_cylindrical_2dv_grid:45,gather:[64,54,43],get_velocities_from_spherical_grid:13,urt:11,urp:11,determin:[7,13,18,64],m_neutron:41,peano:[44,64],float32:[20,47,43],miyamoto_nagai:[7,31,20],fact:64,getallpositionsq:59,add_box:14,text:5,verbos:[7,5],computeisocontour:24,szr:64,inithsml:59,trivial:13,useblank:5,get_dic:46,get_densitymap:20,nois:13,ngb:59,dispert:[13,64],isotherm:[7,20,66],suppos:[13,64],verifyerror:5,cooling_from_nh_and_t:10,local:[54,25,8,27,64,14],equilibrium:[16,13,18],print_filenam:64,pypi:23,accel:64,rainbow4:47,beam:7,acces:47,filter_opt:25,computesph:64,drawytick:14,enabl:[],extnam:5,navarro:20,integr:[64,37,39,45,59,63,13],contain:[33,54,24,5,45,7,8,27,43,64,14,67],view:[47,20,4,25,5,64],vr2:14,extractig:20,npart_tot:[20,64,47],smooth:[2,59],gatherbaseunit:41,displai:[16,33,54,20,21,38,25,8,47,64,67],bufferedwrit:[],particl:[1,2,18,16,47,20,54,4,67,45,7,26,43,62,64,14,59],statu:[64,27],lut:6,extend:5,correctli:54,get_massmap_on_spherical_3d_grid:45,written:[51,54,5],getallmass:59,theta:[45,14],treecod:13,lum:[64,14],pathonpath:[],kei:[44,5],get_densitymap_on_cylindrical_2dv_grid:45,localsystem_of_unit:[3,64],addit:[1,23],invgetr:14,plugin:[33,8],equal:[7,64,14],etc:[64,67,5],instanc:[64,47],equat:[29,13,49,64],freeli:33,comment:5,indici:[63,64],fromtask:43,tnow:20,"3partial_r":[],histocenter2:64,filter_nam:[25,47],respect:[64,4,14,47],readdatablock:[],get_integr:[63,45],open_and_read:64,writeto:5,compos:64,compon:13,montecarlo:[],partial_r:[],immedi:[],create_lin:2,iobas:[],tranform:14,x_2:[],get_surfacemap_on_spherical_1d_grid:45,vmin:64,x_1:[],allwai:13,set_ftyp:[64,47],present:5,icmodul:[],critical_energy_spec:47,readstr:51,pheric:[],sph2cart:64,align:[64,4],defin:[13,51,47,20,7,43,41,64,14],phlummer:20,triaxial:7,observ:[25,64,4],circum:24,layer:5,write_arrai:27,ekin:64,site:[25,33,8,27],get_potentialmap_on_cylindrical_2dh_grid:45,unit_:41,unneed:[],scienc:5,generic_mx:[7,31,20],let:[20,47,54],lvsun:61,generic_mr:[7,31,20],sqrt:45,member:[],python:[1,51,16,54,40,23,27,62,47,67],getr:14,unitveloc:25,http:[23,5],cubic:[16,20,18],expans:36,somewer:[],hdulist:5,"_card_with_continu":5,php:23,set_filenam:64,expand:34,sigma_vz:64,center:[47,64,45,14,54],cosmolib:[12,16,36],well:[20,64,8,23],exampl:[1,13,18,19,16,47,20,51,8,27,5,12,17,14],command:[1,33,54,40,8,17,67],interpol:[34,45],undefin:5,usual:[1,13,51,64],distanc:[25,64,4,14,54],get_velocities_from_cylindrical_grid:13,mpi_oldgatherandwritearrai:43,unitlst:41,obtain:[47,54,20,64,41,17],pythonx:[],symetr:[20,13,45],sden:64,expon:[],l_crush:25,exempl:47,script:[1,16,54,23,25,8,62,13,67],add:[2,54,20,5,64,14],densiti:[64,49,3,20,45,7,59,66,10,11,29,13,47,31,14,67],match:5,momemtum:14,dest:43,piec:5,height:[46,64,14],recurs:[41,43],python2:[25,8,27],rotx:[26,34],rotz:[26,34],like:[13,8,67,47,64],unitlength_in_cm:[41,25,64],"1095e":41,roti:[26,34],necessari:20,dmdr_fct_halo:20,page:16,theta_xyz:64,burkert_mr:66,plummer_mr:66,linux:[47,19],self:[41,13,64],get_r_interpolation_on_cylindrical_2dv_grid:45,unit_g:41,"export":59,nagai:[7,20,49],unit_c:41,flush:5,unit_m:41,home:[47,6,25,8,27,13],unit_k:41,unit_j:41,tmp:27,tmu:64,lead:[],p_name:64,unitsfil:64,mpi_argmin:43,estim:64,leav:[],three:59,mode:[47,43,25,9,5,64,14],mkmap3dw:2,tmin:64,slight:41,imaginari:[],usag:5,peas:27,get_volumemap_on_spherical_1d_grid:45,adot_a:3,offset:[],mkmap3dn:2,about:[7,47],socket:[],get_known_format:64,column:[27,5],libqt:[12,16,21],get_numbermap_on_cylindrical_2dv_grid:45,constructor:[64,5],own:[33,54,5],safronov:13,gadget_z40:47,convolut:[26,59],lenght:[64,43],hsml:[64,59],automat:[33,14,47],real_numngb:64,diagon:64,xyz2peano:44,merg:[62,16,47],val:[64,45,14],accumul:[20,45],n_halo:20,mkmovi:[],"var":64,log10:47,rho1:20,getallpotenti:59,"function":[64,34,54,3,20,5,23,36,7,66,27,43,13,47,37,14],quaddinterp1d:34,mode_sigma_r:13,bufferedrwpair:[],extract1dmeanfrom2dmap:14,constain:41,continu:[34,45],beetween:14,overflow:5,partilc:59,eof:[],count:64,getallvelocitiesq:59,getpreferredencod:[],whether:[],pnbody_show:[25,17,33],writeabl:[],amxyz:26,get_potentialmap_on_cylindrical_3d_grid:45,dmp:27,record:[51,5],below:[20,47],limit:67,otherwis:5,problem:20,unformat:51,pil:[23,21,14],evalu:64,pio:[1,64,54,20,27,47],"int":[49,51,25,43,29,64,14],descript:20,dure:[37,13],get_lineardensitymap_on_spherical_1d_grid:45,implement:[66,67],histrogram:[64,34],some:[47,34,20,4,59,41,13],inf:64,tick:14,detail:5,new_valu:5,other:[47,64,54,27,5],bool:27,cchar:27,stat:13,repeat:[],mkmap2dw:2,afronov:[],ndarrai:[27,5],mkmap2dn:2,log:[64,25,57,7,13,14],preform:54,matrix:[34,21,4,45,27,64,14],set_pio:[64,54],"3rd":5,nrow:5,getalldens:59,get_massmap:20,portion:5,omega0:[3,47]},objtypes:{"0":"py:module","1":"py:function","2":"py:method","3":"py:class","4":"py:data","5":"py:exception","6":"py:attribute","7":"np:module","8":"np:function","9":"np:method","10":"np:class","11":"np:data","12":"np:exception","13":"np:attribute"},titles:["the talkgdisp module","Using pNbody with scripts","the C mapping module","the cosmo module","the geometry module","the pyfits module","the palette module","the ic module","Check the installation","the Movie module","the C coolinglib module","the thermodyn module","Reference","Generating velocities","the libutil module","the C ptreelib module (obsolete)","Welcome to pNbody’s documentation!","Examples","Generating initial conditions","Installation","Generating mass profiles","the libqt module","the C asciilib module","Prerequiste","the C tessel module","Default parameters","the C nbodymodule module","the io module","Generating grids","the plummer module","the fourier module","the C iclib module","the rec module","Default configuration","the C myNumeric module","Setting a format file","the C cosmolib module","the C cooling_with_metals module","Display Models","the C nbdrklib module","Installing from source","the units module","the C montecarlolib module","the mpi module","the C peanolib module","the libgrid module","the param module","Using pNbody with the python interpreter","the C treelib module","the libmiyamoto module","How to deal with units ?","the fortranfile module","the C mapping-omp module (under construction)","the cooling module","Using pNbody in parallel","the C pmlib module (never developped)","the C pygsl module","the liblog module","the C streelib module (under construction)","the C PyGadget module","the parameters module","the phot module","Tutorial","the libdisk module","the main module","the ctes module","the profiles module","Overview"],objnames:{"0":"Python module","1":"Python function","2":"Python method","3":"Python class","4":"Python data","5":"Python exception","6":"Python attribute","7":"Python module","8":"Python function","9":"Python method","10":"Python class","11":"Python data","12":"Python exception","13":"Python attribute"},filenames:["rst/TalkgdispModule","rst/Tutorial_scripts","rst/C_mapping","rst/CosmoModule","rst/GeometryModule","rst/PyfitsModule","rst/PaletteModule","rst/IcModule","rst/Test_the_installation","rst/MovieModule","rst/C_coolinglib","rst/ThermodynModule","rst/Reference","rst/GeneratingVelocities","rst/LibutilModule","rst/C_ptreelib","index","rst/Examples","rst/InitialConditions","rst/Installation","rst/GeneratingMassProfiles","rst/LibqtModule","rst/C_asciilib","rst/Prerequiste","rst/C_tessel","rst/Default_parameters","rst/C_nbodymodule","rst/IoModule","rst/Grids","rst/PlummerModule","rst/FourierModule","rst/C_iclib","rst/RecModule","rst/Default_configurations","rst/C_myNumeric","rst/Formats","rst/C_cosmolib","rst/C_cooling_with_metals","rst/Display","rst/C_nbdrklib","rst/Installing_from_tarball","rst/UnitsModule","rst/C_montecarlolib","rst/MpiModule","rst/C_peanolib","rst/LibgridModule","rst/ParamModule","rst/Tutorial_interpreter","rst/C_treelib","rst/LibmiyamotoModule","rst/Units","rst/FortranfileModule","rst/C_mapping-omp","rst/CoolingModule","rst/Tutorial_parallel","rst/C_pmlib","rst/C_pygsl","rst/LiblogModule","rst/C_streelib","rst/C_PyGadget","rst/ParameterModule","rst/PhotModule","rst/Tutorial","rst/LibdiskModule","rst/MainModule","rst/CtesModule","rst/ProfilesModule","rst/Overview"]})
\ No newline at end of file
+Search.setIndex({objects:{"pNbody.pyfits.CardList":{insert:[45,9,1],keys:[45,9,1],index_of:[45,9,1],count_blanks:[45,9,1],copy:[45,9,1],append:[45,9,1]},"pNbody.fourier":{fourier:[33,8,1]},"pNbody.cooling_with_metals":{get_lambda_normalized_from_Temperature_FeH:[34,8,1],integrate1:[34,8,1],PrintParameters:[34,8,1],integrate2:[34,8,1],get_cooling_time_from_Density_EnergyInt_FeH:[34,8,1],get_cooling_time_from_Density_Temperature_FeH:[34,8,1],get_lambda_from_Density_Temperature_FeH:[34,8,1],get_lambda_from_Density_EnergyInt_FeH:[34,8,1],get_lambda_from_Density_Entropy_FeH:[34,8,1],init_cooling:[34,8,1]},"pNbody.units.UnitSystem":{info:[65,9,1],into:[65,9,1],convertionFactorTo:[65,9,1]},"pNbody.tessel":{info:[26,8,1],ComputeIsoContours:[26,8,1],GetVoronoi:[26,8,1],ConstructDelaunay:[26,8,1],TriangleMedians:[26,8,1],InCircumCircle:[26,8,1],InTriangleOrOutside:[26,8,1],GetTriangles:[26,8,1],test:[26,8,1],CircumCircleProperties:[26,8,1],InTriangle:[26,8,1]},"pNbody.nbdrklib":{Compute:[41,8,1],IntegrateOverDt:[41,8,1]},"pNbody.main":{get_known_formats:[50,8,1],Nbody_default:[50,10,1],NbodyDefault:[50,10,1],Nbody:[50,8,1]},"pNbody.pyfits.StreamingHDU":{write:[45,9,1],close:[45,9,1],size:[45,9,1]},"pNbody.libqt":{qtplot:[23,8,1],QNumarrayImage:[23,10,1],display:[23,8,1]},"pNbody.coolinglib":{cooling:[11,8,1],cooling_from_nH_and_T:[11,8,1]},"pNbody.param":{read_ascii_value:[49,8,1],Params:[49,10,1],write_ascii_value:[49,8,1]},"pNbody.cosmo":{setdefault:[3,8,1],Rho_c:[3,8,1],Age_a:[3,8,1],A_z:[3,8,1],Hubble_a:[3,8,1],Z_a:[3,8,1],Adot_a:[3,8,1],CosmicTime_a:[3,8,1],a_CosmicTime:[3,8,1]},"pNbody.nbodymodule":{acceleration:[28,8,1],rotx:[28,8,1],rotz:[28,8,1],pamap:[28,8,1],epot:[28,8,1],sphmap:[28,8,1],samxyz:[28,8,1],am:[28,8,1],ampmap:[28,8,1],convol:[28,8,1],amxyz:[28,8,1],pdmap:[28,8,1],perspective:[28,8,1],roty:[28,8,1],spin:[28,8,1],potential:[28,8,1]},"pNbody.geometry":{rotate:[24,8,1],viewport:[24,8,1],frustum:[24,8,1],align:[24,8,1],boxcut_segments:[24,8,1],inv_viewport:[24,8,1],ortho:[24,8,1],get_obs:[24,8,1],perspective:[24,8,1],boxcut:[24,8,1],expose:[24,8,1],norm:[24,8,1]},"pNbody.units.Units":{GatherBaseUnits:[65,9,1]},"pNbody.pygsl":{sobol_sequence:[6,8,1]},"pNbody.plummer":{Vcirc:[32,8,1],Density:[32,8,1],dPotential:[32,8,1],LDensity:[32,8,1],Potential:[32,8,1],Sigma:[32,8,1]},"pNbody.io":{checkfile:[30,8,1],read_ascii:[30,8,1],read_dmp:[30,8,1],write_array:[30,8,1],end_of_file:[30,8,1],write_dmp:[30,8,1]},"pNbody.fortranfile":{FortranFile:[54,10,1]},"pNbody.liblog.Log":{write:[60,9,1],close:[60,9,1]},"pNbody.main.NbodyDefault":{CombiMap:[50,9,1],show:[50,9,1],getRadialVelocityDispersionInCylindricalGrid:[50,9,1],phi_xyz:[50,9,1],has_var:[50,9,1],sort_type:[50,9,1],Get_Velocities_From_Virial_Approximation:[50,9,1],inertial_tensor:[50,9,1],set_ftype:[50,9,1],selectc:[50,9,1],sigma_z:[50,9,1],rotate_old:[50,9,1],get_ntype:[50,9,1],epot:[50,9,1],histovel:[50,9,1],Get_Velocities_From_AdaptativeSpherical_Grid:[50,9,1],Accel:[50,9,1],tork:[50,9,1],ComputeSigmaMap:[50,9,1],init:[50,9,1],getRadiusInCylindricalGrid:[50,9,1],get_npart_and_npart_all:[50,9,1],get_list_of_method:[50,9,1],align2:[50,9,1],dmodes:[50,9,1],getNumberParticlesInCylindricalGrid:[50,9,1],sdens:[50,9,1],zmodes:[50,9,1],set_tpe:[50,9,1],get_rsp_approximation:[50,9,1],read:[50,9,1],minert:[50,9,1],get_nbody_tot:[50,9,1],L:[50,9,1],P:[50,9,1],memory_info:[50,9,1],T:[50,9,1],MeanWeight:[50,9,1],SphEvaluate:[50,9,1],redistribute:[50,9,1],ComputeMeanHisto:[50,9,1],get_histocenter2:[50,9,1],dx_mean:[50,9,1],l:[50,9,1],get_mxntpe:[50,9,1],gather_num:[50,9,1],get_num:[50,9,1],check_arrays:[50,9,1],get_default_spec_vars:[50,9,1],get_npart_tot:[50,9,1],dv_mean:[50,9,1],theta_xyz:[50,9,1],Epot:[50,9,1],sigma_vz:[50,9,1],Get_Velocities_From_Spherical_Grid:[50,9,1],get_default_spec_vect:[50,9,1],set_local_system_of_units:[50,9,1],Lum:[50,9,1],append:[50,9,1],cart2sph:[50,9,1],weighted_numngb:[50,9,1],sub:[50,9,1],nodes_info:[50,9,1],gather_pos:[50,9,1],set_filenames:[50,9,1],Tmu:[50,9,1],ComputeMap:[50,9,1],getindex:[50,9,1],vx:[50,9,1],get_rotation_matrix_to_align_with_main_axis:[50,9,1],object_info:[50,9,1],ltot:[50,9,1],S:[50,9,1],get_mass_tot:[50,9,1],get_npart_all:[50,9,1],x:[50,9,1],ComputeHisto:[50,9,1],cvcenter:[50,9,1],make_default_vars_global:[50,9,1],z:[50,9,1],Ekin:[50,9,1],rxyz:[50,9,1],msdens:[50,9,1],ComputeDensityAndHsml:[50,9,1],SendAllToAll:[50,9,1],get_list_of_vars:[50,9,1],get_nbody:[50,9,1],spec_info:[50,9,1],vel_cyl2cart:[50,9,1],Mr_Spherical:[50,9,1],cm:[50,9,1],set_npart:[50,9,1],Ne:[50,9,1],Ltot:[50,9,1],set_parameters:[50,9,1],histocenter2:[50,9,1],has_array:[50,9,1],cv:[50,9,1],select:[50,9,1],size:[50,9,1],ComputeObjectMap:[50,9,1],selecti:[50,9,1],rebox:[50,9,1],open_and_read:[50,9,1],vrxyz:[50,9,1],init_units:[50,9,1],real_numngb:[50,9,1],read_num:[50,9,1],vel_cart2cyl:[50,9,1],getSurfaceDensityInCylindricalGrid:[50,9,1],translate:[50,9,1],selectp:[50,9,1],sort:[50,9,1],getTree:[50,9,1],getPotentialInCylindricalGrid:[50,9,1],expose:[50,9,1],ComputeMeanMap:[50,9,1],usual_numngb:[50,9,1],gather_mass:[50,9,1],R:[50,9,1],ExchangeParticles:[50,9,1],TreePot:[50,9,1],find_vars:[50,9,1],spin:[50,9,1],rotateR:[50,9,1],info:[50,9,1],get_npart:[50,9,1],zprof:[50,9,1],hdcenter:[50,9,1],sph2cart:[50,9,1],align:[50,9,1],getAccelerationInCylindricalGrid:[50,9,1],InitSpec:[50,9,1],get_ns:[50,9,1],r:[50,9,1],mr:[50,9,1],x_sigma:[50,9,1],display:[50,9,1],rename:[50,9,1],Tcool:[50,9,1],open_and_write:[50,9,1],ekin:[50,9,1],vn:[50,9,1],print_filenames:[50,9,1],vy:[50,9,1],ComputeSph:[50,9,1],write_num:[50,9,1],vz:[50,9,1],Map:[50,9,1],get_histocenter:[50,9,1],cmcenter:[50,9,1],write:[50,9,1],ComputeSigmaHisto:[50,9,1],histocenter:[50,9,1],Rho:[50,9,1],Vt:[50,9,1],phi_xy:[50,9,1],A:[50,9,1],align_with_main_axis:[50,9,1],U:[50,9,1],TreeAccel:[50,9,1],IntegrateUsingRK:[50,9,1],reduc:[50,9,1],set_pio:[50,9,1],gather_vel:[50,9,1],Get_Velocities_From_Cylindrical_Grid:[50,9,1],dens:[50,9,1],Pot:[50,9,1],get_list_of_array:[50,9,1],rxy:[50,9,1],mdens:[50,9,1],Vr:[50,9,1],gather_vec:[50,9,1],y:[50,9,1],v_sigma:[50,9,1],Vz:[50,9,1],set_unitsparameters:[50,9,1],sigma:[50,9,1],rotate:[50,9,1]},"pNbody.mapping":{mkmap1d:[2,8,1],mkmap2d:[2,8,1],mkmap1dn:[2,8,1],create_line:[2,8,1],mkmap2dw:[2,8,1],mkmap3dw:[2,8,1],mkmap2dsph:[2,8,1],mkmap1dw:[2,8,1],mkmap2dn:[2,8,1],mkmap3dsortedsph:[2,8,1],create_line3:[2,8,1],create_line2:[2,8,1],mkmap2dnsph:[2,8,1],mkmap3d:[2,8,1],mkmap3dn:[2,8,1],mkmap3dslicesph:[2,8,1]},"pNbody.pyfits.Header":{add_comment:[45,9,1],get_comment:[45,9,1],get:[45,9,1],items:[45,9,1],update:[45,9,1],rename_key:[45,9,1],get_history:[45,9,1],has_key:[45,9,1],ascardlist:[45,9,1],add_history:[45,9,1],copy:[45,9,1],add_blank:[45,9,1]},"pNbody.Movie.Movie":{read:[10,9,1],info:[10,9,1],open:[10,9,1],get_img:[10,9,1]},"pNbody.libdisk":{Diff:[66,8,1],get_Integral:[66,8,1]},"pNbody.peanolib":{peano2xyz:[46,8,1],xyz2peano:[46,8,1]},"pNbody.talkgdisp":{TalkServer:[0,10,1]},"pNbody.ctes":{convert_ctes:[48,8,1]},"pNbody.libgrid":{get_VolumeMap_On_Carthesian_3d_Grid:[59,8,1],get_MassMap_On_Cylindrical_2dv_Grid:[59,8,1],get_PotentialMap_On_Cylindrical_2dv_Grid:[59,8,1],get_AccumulatedMassMap_On_Spherical_1d_Grid:[59,8,1],get_NumberMap_On_Cylindrical_2dv_Grid:[59,8,1],get_MassMap_On_Cylindrical_3d_Grid:[59,8,1],get_SurfaceDensityMap_On_Carthesian_2d_Grid:[59,8,1],get_NumberMap_On_Cylindrical_2dh_Grid:[59,8,1],get_Points_On_Carthesian_3d_Grid:[59,8,1],get_PotentialMap_On_Spherical_1d_Grid:[59,8,1],get_LinearDensityMap_On_Spherical_1d_Grid:[59,8,1],get_MassMap_On_Cylindrical_2dh_Grid:[59,8,1],get_MassMap_On_Carthesian_3d_Grid:[59,8,1],get_SurfaceDensityMap_From_Cylindrical_2dv_Grid:[59,8,1],get_MassMap_On_Spherical_3d_Grid:[59,8,1],get_NumberMap_On_Spherical_3d_Grid:[59,8,1],get_PotentialMap_On_Cylindrical_2dh_Grid:[59,8,1],get_DensityMap_On_Spherical_1d_Grid:[59,8,1],get_PotentialMap_On_Spherical_3d_Grid:[59,8,1],get_MassMap_On_Spherical_1d_Grid:[59,8,1],get_GenericMap_On_Spherical_1d_Grid:[59,8,1],get_DensityMap_On_Carthesian_3d_Grid:[59,8,1],get_VolumeMap_On_Spherical_3d_Grid:[59,8,1],get_NumberMap_On_Carthesian_2d_Grid:[59,8,1],get_DensityMap_On_Cylindrical_3d_Grid:[59,8,1],get_SurfaceMap_On_Carthesian_2d_Grid:[59,8,1],get_Accumulation_Along_Axis:[59,8,1],get_NumberMap_On_Carthesian_3d_Grid:[59,8,1],get_SurfaceDensityMap_On_Cylindrical_2dh_Grid:[59,8,1],get_Points_On_Cylindrical_2dh_Grid:[59,8,1],get_Points_On_Spherical_3d_Grid:[59,8,1],get_NumberMap_On_Spherical_1d_Grid:[59,8,1],get_Points_On_Spherical_1d_Grid:[59,8,1],get_Interpolation_On_Cylindrical_2dv_Grid:[59,8,1],get_PotentialMap_On_Cylindrical_3d_Grid:[59,8,1],get_r_Interpolation_On_Cylindrical_2dv_Grid:[59,8,1],get_MassMap_On_Carthesian_2d_Grid:[59,8,1],get_DensityMap_On_Spherical_3d_Grid:[59,8,1],get_PotentialMap_On_Carthesian_2d_Grid:[59,8,1],get_Integral:[59,8,1],get_First_Derivative:[59,8,1],get_VolumeMap_On_Cylindrical_2dv_Grid:[59,8,1],get_DensityMap_On_Cylindrical_2dv_Grid:[59,8,1],get_VolumeMap_On_Cylindrical_3d_Grid:[59,8,1],get_Symetrisation_Along_Axis_Old:[59,8,1],get_AccelerationMap_On_Cylindrical_2dv_Grid:[59,8,1],get_SurfaceMap_On_Spherical_1d_Grid:[59,8,1],get_Points_On_Carthesian_2d_Grid:[59,8,1],get_SurfaceMap_On_Cylindrical_2dh_Grid:[59,8,1],get_VolumeMap_On_Spherical_1d_Grid:[59,8,1],get_Points_On_Cylindrical_2dv_Grid:[59,8,1],get_Interpolation_On_Spherical_1d_Grid:[59,8,1],get_Points_On_Cylindrical_3d_Grid:[59,8,1],get_NumberMap_On_Cylindrical_3d_Grid:[59,8,1],get_Symetrisation_Along_Axis:[59,8,1],get_PotentialMap_On_Carthesian_3d_Grid:[59,8,1]},"pNbody.units":{Units:[65,10,1],gal:[65,11,1],PhysCte:[65,10,1],Set_SystemUnits_From_Params:[65,8,1],UnitSystem:[65,10,1]},"pNbody.fortranfile.FortranFile":{writeString:[54,9,1],readReals:[54,9,1],readString:[54,9,1],readRecord:[54,9,1],writeReals:[54,9,1],readInts:[54,9,1],ENDIAN:[54,13,1],writeRecord:[54,9,1],writeInts:[54,9,1],HEADER_PREC:[54,13,1]},"pNbody.ic":{plummer:[8,8,1],ComputeGridParameters:[8,8,1],nfw_mr:[8,8,1],pisothm_mr:[8,8,1],shell:[8,8,1],hernquist:[8,8,1],invert:[8,8,1],isothm:[8,8,1],kuzmin:[8,8,1],burkert:[8,8,1],isothm_mr:[8,8,1],expd_mr:[8,8,1],homosphere:[8,8,1],generic_Mx:[8,8,1],generic_Mr:[8,8,1],dl2_mr:[8,8,1],generic2c:[8,8,1],ComputeGridParameters2:[8,8,1],box:[8,8,1],homodisk:[8,8,1],pisothm:[8,8,1],nfw:[8,8,1],dl2:[8,8,1],generic_alpha:[8,8,1],nfwg:[8,8,1],miyamoto_nagai:[8,8,1],expd:[8,8,1]},"pNbody.libmiyamoto":{Sigma_z:[52,8,1],Vcirc:[52,8,1],Kappa:[52,8,1],Density:[52,8,1],SurfaceDensity:[52,8,1],Sigma_zbis:[52,8,1],Sigma_t:[52,8,1],d2z_Potential:[52,8,1],Potential:[52,8,1],dz_Potential:[52,8,1],d2R_Potential:[52,8,1],Omega:[52,8,1],dR_Potential:[52,8,1]},"pNbody.param.Params":{set:[49,9,1],get:[49,9,1],lists:[49,9,1],get_type:[49,9,1],get_string:[49,9,1],save:[49,9,1],get_dic:[49,9,1]},"pNbody.myNumeric":{roty:[36,8,1],rotx:[36,8,1],Interpolate_From_2d_Array:[36,8,1],rotz:[36,8,1],hnd:[36,8,1],whistogram:[36,8,1],turnup:[36,8,1],quadinterp1d:[36,8,1],spline3d:[36,8,1],quaddinterp1d:[36,8,1],splint:[36,8,1],polint:[36,8,1],getmask:[36,8,1],histogram2d:[36,8,1],vprod:[36,8,1],ratint:[36,8,1],Interpolate_From_1d_Array:[36,8,1],lininterp1d:[36,8,1],test:[36,8,1],spline:[36,8,1],expand:[36,8,1]},"pNbody.thermodyn":{Arp:[12,8,1],ElectronDensity:[12,8,1],Art:[12,8,1],Ura:[12,8,1],Tra:[12,8,1],Urp:[12,8,1],Aru:[12,8,1],Urt:[12,8,1],Prt:[12,8,1],Pra:[12,8,1],Trp:[12,8,1],Pru:[12,8,1],Tru:[12,8,1],Lambda:[12,8,1]},"pNbody.pyfits.ColDefs":{info:[45,9,1],add_col:[45,9,1],change_unit:[45,9,1],change_name:[45,9,1],del_col:[45,9,1],change_attrib:[45,9,1]},"pNbody.iclib":{generic_Mx:[39,8,1],exponential_disk:[39,8,1],generic_Mr:[39,8,1],miyamoto_nagai_f:[39,8,1],generic_Mx1D:[39,8,1],generic_alpha:[39,8,1],nfwg:[39,8,1],miyamoto_nagai:[39,8,1],burkert:[39,8,1]},"pNbody.mpi":{mpi_recv:[5,8,1],mpi_GatherAndWriteArray:[5,8,1],mpi_ExchangeFromTable:[5,8,1],mpi_ReadAndSendArray:[5,8,1],mpi_find_a_toTask:[5,8,1],mpi_allreduce:[5,8,1],mpi_getval:[5,8,1],mpi_GetExchangeTable:[5,8,1],mpi_max:[5,8,1],mpi_rprint:[5,8,1],mpi_sendrecv:[5,8,1],mpi_argmin:[5,8,1],mpi_gather:[5,8,1],mpi_AllgatherAndConcatArray:[5,8,1],mpi_min:[5,8,1],mpi_allgather:[5,8,1],mpi_send:[5,8,1],mpi_histogram:[5,8,1],mpi_pprint:[5,8,1],mpi_sarange:[5,8,1],mpi_len:[5,8,1],mpi_argmax:[5,8,1],mpi_bcast:[5,8,1],mpi_arange:[5,8,1],mpi_ReadAndSendBlock:[5,8,1],mpi_iprint:[5,8,1],mpi_mean:[5,8,1],mpi_sum:[5,8,1],mpi_OldGatherAndWriteArray:[5,8,1],mpi_reduce:[5,8,1],mpi_OldReadAndSendArray:[5,8,1]},"pNbody.profiles":{burkert_mr:[69,8,1],nfws_profile:[69,8,1],nfw_mr:[69,8,1],jaffe_mr:[69,8,1],pisothm_mr:[69,8,1],generic2c_profile:[69,8,1],king_profile:[69,8,1],burkert_profile:[69,8,1],king_Rc:[69,8,1],hernquist_profile:[69,8,1],jaffe_profile:[69,8,1],nfwg_mr:[69,8,1],plummer_mr:[69,8,1],king_surface_density_old:[69,8,1],hernquist_mr:[69,8,1],plummer_profile:[69,8,1],generic2c_mr:[69,8,1],pisothm_profile:[69,8,1],nfws_mr:[69,8,1],king_profile_Rz:[69,8,1],nfwg_profile:[69,8,1],hernquist_mR:[69,8,1],nfw_profile:[69,8,1],king_surface_density:[69,8,1]},"pNbody.pyfits.FITS_rec":{field:[45,9,1]},"pNbody.cosmolib":{Age_a:[38,8,1]},"pNbody.pyfits.FITS_record":{field:[45,9,1],setfield:[45,9,1]},"pNbody.pyfits.GroupData":{par:[45,9,1],setpar:[45,9,1]},"pNbody.Movie":{Movie:[10,10,1]},"pNbody.palette":{readlut:[7,8,1]},"pNbody.pyfits":{Section:[45,10,1],TableHDU:[45,10,1],new_table:[45,8,1],PrimaryHDU:[45,10,1],open:[45,8,1],append:[45,8,1],ColDefs:[45,10,1],Header:[45,10,1],writeto:[45,8,1],Delayed:[45,10,1],StreamingHDU:[45,10,1],GroupsHDU:[45,10,1],getheader:[45,8,1],Undefined:[45,10,1],ErrorURLopener:[45,10,1],getval:[45,8,1],Column:[45,10,1],update:[45,8,1],HDUList:[45,10,1],GroupData:[45,10,1],VerifyError:[45,12,1],fitsopen:[45,8,1],getdata:[45,8,1],info:[45,8,1],CardList:[45,10,1],FITS_record:[45,10,1],BinTableHDU:[45,10,1],ImageHDU:[45,10,1],FITS_rec:[45,10,1]},"pNbody.libutil":{vel_cyl2cart:[15,8,1],add_box:[15,8,1],apply_filter:[15,8,1],tranfert_functions:[15,8,1],drawxticks:[15,8,1],GetMassMap:[15,8,1],GetMeanValMap:[15,8,1],get_eyes:[15,8,1],GetSigmaMap:[15,8,1],GetSigmaValMap:[15,8,1],log_filter:[15,8,1],Extract1dMeanFrom2dMap:[15,8,1],mplot:[15,8,1],geter2:[15,8,1],vel_cart2cyl:[15,8,1],contours:[15,8,1],compress_from_lst:[15,8,1],getr:[15,8,1],drawyticks:[15,8,1],getvaltype:[15,8,1],getval:[15,8,1],geter:[15,8,1],myhistogram:[15,8,1],extract_parameters:[15,8,1],phys2img:[15,8,1],invgetr:[15,8,1],RotateAround:[15,8,1],get_image:[15,8,1],sbox:[15,8,1],log_filter_inv:[15,8,1],GetMeanMap:[15,8,1],set_ranges:[15,8,1],GetNumberMap:[15,8,1]},"pNbody.liblog":{Log:[60,10,1]},"pNbody.montecarlolib":{mc2d:[68,8,1],mc3d:[68,8,1],mc1d:[68,8,1]},pNbody:{cosmo:[3,7,1],plummer:[32,7,1],Movie:[10,7,1],ic:[8,7,1],pygsl:[6,7,1],treelib:[51,7,1],myNumeric:[36,7,1],pyfits:[45,7,1],ctes:[48,7,1],palette:[7,7,1],parameters:[63,7,1],peanolib:[46,7,1],libdisk:[66,7,1],param:[49,7,1],units:[65,7,1],rec:[37,7,1],main:[50,7,1],cooling_with_metals:[34,7,1],nbdrklib:[41,7,1],montecarlolib:[68,7,1],thermodyn:[12,7,1],mapping:[2,7,1],mpi:[5,7,1],liblog:[60,7,1],talkgdisp:[0,7,1],nbodymodule:[28,7,1],tessel:[26,7,1],asciilib:[4,7,1],libmiyamoto:[52,7,1],phot:[64,7,1],libgrid:[59,7,1],fortranfile:[54,7,1],geometry:[24,7,1],cosmolib:[38,7,1],libqt:[23,7,1],profiles:[69,7,1],iclib:[39,7,1],libutil:[15,7,1],coolinglib:[11,7,1],fourier:[33,7,1]},"pNbody.pyfits.HDUList":{info:[45,9,1],readall:[45,9,1],update_tbhdu:[45,9,1],writeto:[45,9,1],index_of:[45,9,1],flush:[45,9,1],close:[45,9,1],append:[45,9,1],update_extend:[45,9,1]},"pNbody.asciilib":{read:[4,8,1]},"pNbody.pyfits.GroupsHDU":{size:[45,9,1]},"pNbody.phot":{LvtoMv:[64,8,1],MvtoLv:[64,8,1]}},terms:{entropi:[50,15],secondli:19,prefix:[43,9],dist:[27,15],palettedir:9,whose:54,typeerror:45,"_validhdu":45,openmpi:61,compress_from_lst:15,under:[17,55,58,25,13,16],mr_spheric:50,keylist:45,spec:[11,45],distort:18,should:[51,50,9,15,57],wich:[50,57],libgrid:[13,17,22,18,59],gnu:61,factori:45,exponnenti:[22,17,8,18,19],vector:[50,36,22,24,59,8,5,66,67],verif:45,get_npart_tot:50,nfw_profil:69,nb_halo:22,direct:[22,18,50],second:[34,52,15,45],allgath:5,follow:[1,67,54,22,61,50,43,8,9,45,18,39],even:[57,45],mpeg:61,weighted_numngb:50,a_non_existing_fil:30,commonnam:45,generatin:19,"new":[1,35,57,59,50,61,9,45,65,18,67,70],nep:8,pickabl:30,never:[13,17,58],here:[22,18,42],get_mass_tot:50,set_unitsparamet:50,argv:[1,57],path:[35,14,9,30,57],interpret:[44,1,67,70,17],phys2img:15,dedict:22,precis:[50,54],credit:67,spec_info:50,mvtolv:64,fourier:[13,17,33],offp:59,offr:59,offt:59,change_nam:45,offx:59,offz:59,mkmap2dsph:2,offi:59,ymin:59,univ:38,unit:[17,35,53,3,34,50,65,64,45,13,67,48],plot:[22,18,23,15,50],would:45,rebox:50,peanolib:[13,17,46],call:[50,67,57,30,45],type:[49,35,36,5,50,27,30,45,18,67],tell:[18,57],relat:45,inv_viewport:24,warn:[66,50,69],set_paramet:50,shdu:45,recommand:35,must:[1,35,59,62,9,11,45,65,66,50],insterest:22,word:30,err:45,setup:43,work:[50,9,70,57],root:[43,5],get_histocent:50,integrate2:34,kinet:[50,15],give:[67,54,22,57,10,18],begtask:5,indic:[17,66,59,45],want:[43,18],end:[50,57,9,30,45],"22044604925e":67,how:[1,67,53,17,45,18,70],gather_mass:50,env:[1,57],numarrai:67,verifi:45,perspect:[27,28,24],asciilib:[13,17,4],updat:45,montecarlolib:[13,17,68],after:45,index_of:45,paticl:50,befor:[54,22,57,10,45,67],wrong:50,box_mx:8,mvsun:64,parallel:[17,57,61,30,44,50,70],averag:50,attempt:45,interpol:[36,59],obsolet:[13,17,69,16],get_first_deriv:59,curent:20,environ:9,enter:43,lambda:[18,34,11,12,50,15],order:[67,24,61,50,8,5,18,15],output_verifi:45,origin:[8,50,24],over:[2,41,57,5,45],becaus:45,veri:[1,18,30,15,70],rgb_tabl:[35,9,7],afil:30,flexibl:45,vari:[22,54],sigma_z:[50,52],zmode:50,usetre:[18,50],mpi_rprint:5,fix:18,"1xn":50,frsp:[27,50],sigma_t:52,offic:45,isotrop:18,urlretriev:45,get_potentialmap_on_carthesian_3d_grid:59,getvoronoi:26,them:[18,50],thei:[22,45],"_tablebasehdu":45,unitmass_in_g:[65,27,50],band:64,memory_info:50,ascardlist:45,software_hardwar:45,nfws_mr:69,grmin:18,each:[67,19,54,22,57,59,50,45,18,15,70],coolinglib:[13,17,11],dv_mean:50,mean:[17,50,57,27,5,18,15],set_pio:[50,57],gzmin:18,extract:[17,22,47,15],nbodymodul:[13,17,28],goe:[22,9],facil:70,get_potentialmap_on_spherical_3d_grid:59,content:[17,49,35,57,45,13],prerequist:[17,61,20],adapt:[18,50],lib64:30,linear:[36,22,59,32,18,15],object_info:50,get_points_on_spherical_3d_grid:59,mden:50,standard:[43,61,45],npart_per_proc:50,coolingfil:[27,50,12],angl:[27,67,24,15,50],traceback:30,cosmic:3,accumul:[22,59],local:[57,27,9,30,50,15],filter:[27,15],iso:[26,15],rang:[50,36,15],render:[22,27],independ:57,rank:57,localsystem:12,instruct:67,alreadi:[50,70,45],thick:8,primari:45,top:45,getaccelerationincylindricalgrid:50,evolut:19,master:[49,57],get_potentialmap_on_spherical_1d_grid:59,computesigmamap:50,npart_al:[50,5],whith:50,isothm:[8,22],get_npart:50,keyword:45,convert_ct:48,provid:[18,51,19,22,35,45,14,67],tree:[50,67,51,59,5],"final":[18,57,22,9,67,50],project:[22,24,28,15,50,69],pressur:[50,15],king_surface_dens:69,expd:[8,18,22],get_npart_and_npart_al:50,pnbody_checkal:9,manner:45,seen:[22,50,24],imagepil:23,simplai:5,maxx:50,latter:[35,18,57],mkmap3dslicesph:2,maxi:50,fname:54,curv:50,prevou:57,mpi_bcast:5,object:[17,49,67,36,57,22,5,24,50,8,30,45,44,18,15,70],what:[27,18,45],boltzmann:65,talkgdisp:[0,13,17],phase:50,jean:[17,50,52,32,18,19],get_accumulation_along_axi:59,log_filt:15,metal:[27,50],log_filter_inv:15,matint:15,groupshdu:45,tform:45,rk78:50,sum:5,has_kei:45,trianl:26,random:45,radiu:[18,22,8,67,50,69],get_rsp_approxim:50,gettriangl:26,identifi:67,gadget_z00_sub:67,get_volumemap_on_carthesian_3d_grid:59,libari:57,configur:[17,35,20],geter2:15,burkert:[8,39,22,69],new_unit:45,displi:67,toolbox:70,byteord:[22,67,50,5],method:[0,49,67,54,50,23,60,10,45,65,18],approch:70,"_formatx":45,fieldnam:45,sigma_vz:50,num:[22,67,50,15,5],result:[22,67],respons:50,fail:8,best:45,rename_kei:45,tensor:50,languag:70,variat:22,an_existing_fil:30,imagehdu:45,attribut:[57,45],nbody_default:[67,50],accord:[22,50,5],triplet:46,"085e":27,vprod:36,xrang:30,hernquist_mr:69,omp:[13,17,55],extent:57,exponential_disk:39,incircumcircl:26,howev:18,dtout:50,com:61,height:[49,50,15],diff:66,assum:[39,5,45],summar:45,duplic:45,mpi_exchangefromt:5,integrateoverdt:41,union:45,convolut:28,real_numngb:50,been:[67,57,70,45],age_a:[3,38],mode_sigma_p:18,mode_sigma_r:18,basic:61,mode_sigma_z:18,vcirc:[32,52],getval:[15,45],get_imag:15,argument:[50,8,57,22,45],extract_paramet:15,dl2_mr:8,spin:[28,50],ident:22,formatsdir:9,properti:26,aim:[18,50],calcul:[28,36],mpi_sum:5,intriangl:26,higer:15,computedensityandhsml:50,have:[36,57,22,8,9,30,45,50],kwarg:[54,45],n_i:5,sever:70,perform:[43,67,70,57],make:[50,70,45],format:[17,35,29,54,61,9,30,45,50,70],"435693e":27,unitsystem:[65,50],complex:18,split:5,getexchang:5,electro:15,complet:[62,45],dr_potenti:52,galact:18,selectig:[17,21],get_mxntp:50,rais:[30,45],squar:22,redefin:70,epx:8,thi:[1,35,57,67,22,12,24,7,50,8,62,9,30,45,5,18,15],everyth:[22,9],tha:67,left:[50,24],intriangleoroutsid:26,just:54,pygadget:[13,17,62,51],newton:8,getsurfacedensityincylindricalgrid:50,end_of_fil:30,yet:[50,45],integrateusingrk:50,mplayerhq:61,expos:[50,24],defaultparamet:[27,35,9],fortran:54,spread:5,save:[1,49,67,15],opt:[35,9,15,67],applic:61,logfram:60,box_opt:15,unig:42,interpolate_from_2d_arrai:36,background:27,get_volumemap_on_spherical_3d_grid:59,plummer_profil:69,specif:[35,24,50,28,45,67,15],manual:45,gather_num:50,localdir:9,b_color:27,www:[61,45],right:[18,24,50],old:[50,59,45],deal:[17,53,54,7,45,18],generic_mx1d:39,interv:[22,50],maxim:[18,50],init_unit:50,intern:[3,45],get_list_of_var:50,interg:15,get_default_spec_var:50,cart2sph:50,printparamet:34,bottom:45,suffici:45,t11:67,foc:[27,50,24],condit:[17,50,19],get_symetrisation_along_axi:59,core:[8,69],generic2c:[8,22,69],epfl:[30,7],rotate_old:50,obj:24,simul:67,getradiusincylindricalgrid:50,streaminghdu:45,attrib:45,qnumarrayimag:23,vel_cyl2cart:[50,15],xyz:46,"float":[49,54,45,27,30,5,50,15],get_surfacedensitymap_on_carthesian_2d_grid:59,mpi_readandsendblock:5,wrap:61,wai:[18,19,50],support:[57,20,45],transform:[50,24,15],avail:[55,25,16,58,45],gif:[61,67],kuzmin:[8,22],fraction:[27,50,57],lage:70,head:[27,50,15],form:50,offer:18,forc:[50,57,45],read_dmp:30,heat:50,fitsopen:45,gamma_halo:22,solar:64,"true":[50,18,30,45],circumcircleproperti:26,get_surfacedensitymap_from_cylindrical_2dv_grid:59,new_nam:45,get_sigmavalmap:18,maximum:[50,67,57,15,5],get_potentialmap_on_cylindrical_2dv_grid:59,new_tabl:45,linux2:67,repartit:5,acrod:5,hernquist_profil:69,computesigmahisto:50,computegridparamet:8,exist:[44,17,67,30,45],readreal:54,pnbodi:[0,1,2,3,24,5,6,7,8,9,10,11,12,14,15,17,18,19,20,22,23,4,26,27,28,30,32,33,34,35,36,38,39,41,42,43,44,45,46,49,50,52,54,48,57,59,60,61,62,64,65,66,67,68,69,70],check:[17,35,20,57,22,50,9,30,45,18],change_attrib:45,readonli:45,nx1:50,generic2c_profil:69,get_numbermap_on_spherical_1d_grid:59,when:[18,9,57,5,45],test:[26,36,70],urp:12,node:[2,57,59,5,50,18],get_numbermap_on_carthesian_3d_grid:59,classextens:45,findmax:57,turnup:36,nb_sub:67,consid:30,omega:[50,52],writefct:50,m_electron:65,pseudo:[8,22,69],fact:50,time:[3,34,50,15],backward:45,update_extend:45,unitparameterfil:50,skip:[10,5],global:[50,57],checkfil:30,lvtomv:64,primer:22,row:45,mpi_max:[57,5],get_points_on_cylindrical_2dh_grid:59,hold:18,depend:[43,18,15,45],graph:22,get_ey:15,inerti:50,vec:[50,30,5],vel:[18,22,8,67,50,15],mkmap2d:2,luminos:[64,15],king_rc:69,sourc:[43,17,50,20,5],string:[27,54,49,45],cool:[17,34,27,11,13,50,56,15],dim:[36,15,45],level:[22,27,15,45],did:9,reproduc:8,item:45,r_ob:[27,24],"828e":65,plummer:[17,19,22,8,13,32,18,69],"419e":65,ptree:50,current:[50,25,55,58,27,62,9,10,67,16],pnbody_copi:[35,18,67],deriv:[52,54,59,32,66,18],rho_c:3,boxsiz:[67,50],gener:[17,67,19,22,8,30,31,18,15],rs_halo:22,satisfi:45,modif:8,address:0,treecod:18,along:[22,18,59,15],box:[22,24,27,8,50,15],shift:50,computemeanmap:50,primaryhdu:45,vectori:36,get_densitymap_on_spherical_3d_grid:59,apply_filt:15,getsigmamap:15,nmax:8,useful:[50,22,59,61,18,15],pluginsdir:9,bzero:45,modul:[0,2,3,24,5,6,7,8,10,11,12,13,15,16,17,22,23,4,25,26,28,30,32,33,34,36,37,38,39,41,43,45,46,48,49,50,51,52,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,70],prefer:70,nodispert:50,get_cooling_time_from_density_temperature_feh:34,marker:15,instal:[17,35,20,57,43,9],dispers:[17,18,50],planck:65,add_blank:45,adaptativesoften:50,selecti:50,memori:[50,70,45],selectc:[1,50,67,57],prec:54,hilbert:50,vel_cart2cyl:[50,15],epsx:50,epsv:50,exonenti:8,selectp:[67,50],set_local_system_of_unit:50,set_rang:15,rigid:50,vmax:50,tranfer:15,logarithm:18,graphic:[35,70,57],peano2xyz:46,mkmap1dn:2,uniqu:[50,5,45],mkmap1dw:2,can:[1,35,54,22,57,9,10,45,67,70],purpos:18,gadget_z:[1,57],stream:45,sph:[27,2,50],critic:3,cube:22,hydrogen:[27,50,11],get_nbodi:50,alwai:45,multipl:50,ptreelib:[13,17,16],get:[49,67,57,26,34,24,59,50,45,18],segement:26,consist:[50,54],map:[17,2,57,55,50,27,28,45,13,67,15,70],product:[61,36],mat:[23,59,15],max:[67,57,27,8,50,15],rmax:[50,22,59,8,18,15],set_tp:50,xtick:15,xzf:43,mpi_reduc:5,"_extensionhdu":45,mai:[42,67,22,45,18,70],sobol_sequ:6,stdin:30,explicit:50,brodcast:5,inform:[67,45],combin:45,gamma:[8,50,27,69],talk:0,epydoc:45,interpolate_from_1d_arrai:36,zmax:[8,18,59,50],file2:50,trianglemedian:26,nfw_mr:[8,69],computesph:50,lst:[50,15],still:[55,25,58,16],dynam:18,group:45,check_arrai:50,tork:50,window:[49,9],vtr:[50,15],main:[13,17,50],surfacedens:52,boxcut_seg:24,non:[18,15,45],initi:[17,50,18,19,57],histogram2d:36,lunch:[18,57],half:59,now:[35,57,22,43,67,65,66,18],nor:18,name:[49,35,57,22,27,60,8,50,10,30,45,18,15],config:[27,35,9],revers:[50,5],separ:[50,62,24,45],mkmap2dnsph:2,get_points_on_cylindrical_3d_grid:59,compil:[43,17,61,62,20],replac:[51,10],spline3d:36,continu:[36,59],amxyz:28,tempertur:[67,70],exang:5,get_massmap_on_carthesian_3d_grid:59,vtr2:15,space:[50,27,67,19,45],profil:[17,50,19,22,8,13,18,69],"5mdk":67,correct:59,nofil:30,million:70,cart:[50,15],get_cooling_time_from_density_energyint_feh:34,maxnumngbdevi:50,force_comput:50,org:61,"byte":[54,45],card:45,header_prec:54,libmiyamoto:[13,17,52],setdefault:3,badli:69,open_and_writ:50,synchron:5,has_var:50,motion:50,turn:36,place:[50,45],mkmap3d:2,first:[67,19,57,34,59,50,8,66,30,45,32,18,15,52],make_default_vars_glob:50,directli:45,vr2:15,onc:[8,45],arrai:[50,36,54,26,22,5,24,59,69,10,30,45,67,15],has_arrai:50,q_electron:65,stsci:45,open:[1,50,17,57,10,30,45,44,67],angular:[50,28,67],size:[50,54,22,57,24,8,59,27,45,66,67,15],convens:67,given:[49,2,36,54,3,39,5,57,50,26,8,28,45,65,18,48,15],pamap:28,width:[49,50],nbodydefault:[18,50],cumul:22,circl:[26,22],writecomplet:45,psudo:45,frame:15,obswww:42,copi:[67,35,59,45],specifi:[50,54,9,15,45],broadcast:5,liblog:[13,17,60],than:[43,67,52,59,57],"6732e":65,f_m:33,aproxim:50,posit:[50,39,24,27,28,10,45,67,15],l_n:27,cosmolog:3,seri:[22,14],pra:12,flag_cool:67,ntask:[50,5],ani:[22,9,45],nbodi:[1,50,57,22,27,8,67],pru:12,prt:12,rotatearound:15,readal:[10,45],mesur:18,phi_xi:50,note:[50,57,45],take:[8,18,22,50],users_manual1:45,get_interpolation_on_spherical_1d_grid:59,noth:[50,5],libutil:[13,17,15],begin:[1,30],sure:45,fct:8,normal:[34,50,15,12],nallhw:67,compress:15,pair:45,renam:[1,50,67,57,45],quantiti:[17,18,47],samxyz:28,get_points_on_cylindrical_2dv_grid:59,runtim:54,generic_alpha:[8,39,22],defaultconfig:35,axi:[67,36,22,24,27,59,50,8,28,18,15],sigma:[50,22,8,69,32,18,15],slope:[22,36],show:[1,50,67,57,22,60,18],ndtype:30,phi_xyz:50,convol:28,ratint:36,peano:[46,50],getmeanvalmap:15,rotat:[67,36,24,28,50,15],onli:[67,20,57,39,45,24,59,50,5,18,70],ratio:50,elemet:36,nall:67,get_massmap_on_carthesian_2d_grid:59,dict:30,unitmass:27,homospher:[8,22],skiphead:30,fortranfil:[13,17,54],newkei:45,cannot:45,physct:65,requir:45,unitlength:27,get_histocenter2:50,sbox:15,get_velocities_from_adaptativespherical_grid:[18,50],median:26,xmax:[8,59,15],bscale:45,where:[35,36,54,22,57,59,50,5,14,15],genericdistribut:22,summari:45,kernel:28,polint:36,infinit:8,readint:54,frustrum:24,label:[22,30,15],between:[57,22,24,59,27,66,50,15],"import":[1,67,57,22,30,18],screen:9,getindex:50,assumpt:54,betwen:15,get_genericmap_on_spherical_1d_grid:59,read_ascii_valu:49,num_fil:67,fit:45,region:[22,18,50,67],pisothm:[8,22],voronoi:26,mont:68,tutori:[44,17,67],mani:45,l_min:[27,15],cosmictime_a:3,among:[67,57],acceler:[28,59,50],color:[27,35,15,7],overview:[17,70],pot:50,unit_pa:65,nlocal:5,invert:8,theap:45,invers:[8,18,15,50],dl2:[8,22],thistask:57,resolut:[22,17,8,18,19],do_not_sort:50,usual_numngb:50,those:[54,45],"case":[50,22,9,30,45,67],hdu:45,kappa:52,hdr:45,plugin:[35,9],tmax:50,nfws_profil:69,lut2:67,add_com:45,add_col:45,cluster:70,scipi:61,lininterp1d:36,writeint:54,luminosti:50,ascii:[49,50,4,30,45],par:[3,12,45],develop:[13,17,58],mode1:50,same:[50,36,52,54,57,45,67],binari:[67,22,45,8,5,50],html:61,pad:45,get_rotation_matrix_to_align_with_main_axi:50,document:17,get_volumemap_on_cylindrical_2dv_grid:59,exchangeparticl:50,ness:54,decompress:[43,17,20],"3144e":65,capabl:[61,70,45],copyonwrit:45,burkert_profil:69,appropri:[8,45],get_densitymap_on_carthesian_3d_grid:59,markup:45,clobber:45,without:[50,70],gather_vec:50,model:[17,67,57,22,40,24,50,8,28,44,32,18,39],gather_vel:50,dimension:[66,59],get_list_of_arrai:50,get_massmap_on_cylindrical_2dh_grid:59,computemeanhisto:50,"0220e":65,execut:1,rest:45,processu:57,initspec:50,speed:50,mpi_allgatherandconcatarrai:5,struct:54,isothrop:18,except:45,param:[17,49,50,65,45,13,18],paral:57,rescal:15,treeaccel:50,verctor:22,mpi_sarang:5,momentum:[50,28,15,67],mpi_arang:5,real:[66,59,15,54],around:[18,36,24,28,67,50],read:[35,57,54,5,4,7,10,30,45,50,70],get_str:49,temperatur:[67,15,11,50],grid:[17,50,22,59,8,31,18],indici:[66,50],convertionfactorto:65,sum_:33,nost:45,integ:[54,45,5,66,50,15],server:0,mpi_mean:5,readlut:7,either:50,unitvelocity_in_cm_per_:[65,27,50],output:[17,57,24,9,45,44,50,15],interest:18,showmap:57,sphere_mr:8,respect:[67,24,15,50],computehisto:50,slice:[1,2,57],definit:[35,45],corespond:36,complic:70,refer:[13,17,50],power:65,a_cosmictim:3,ltot:[67,50],get_points_on_spherical_1d_grid:59,writerecord:54,d2z_potenti:52,read_num:50,acc:50,central:22,nsph:27,neighbor:[27,50],act:50,vz2:15,"2x2":15,processor:[57,5],routin:[8,50,51,22],redshift:67,get_numbermap_on_spherical_3d_grid:59,splint:36,coodin:[50,15],cyclindr:69,your:[1,67,57,43,9,18],jaffe_profil:69,ymax:59,setpar:45,bissector:8,overwrit:45,get_points_on_carthesian_2d_grid:59,start:[67,57,45],lot:[9,19],gravit:[18,50],get_lambda_from_density_entropy_feh:34,mkmap1d:2,tupl:[27,5,45],quadinterp1d:36,jul:67,pmlib:[13,17,58],viewport:24,possibl:[67,57,22,54,43,18],"default":[17,35,20,54,3,27,50,43,8,45,18,67,15],creat:[17,67,57,22,5,50,44,45,65,18,15,70],get_surfacemap_on_spherical_1d_grid:59,mpi_allgath:5,decreas:[22,18],file:[1,50,35,57,17,22,54,4,7,60,43,44,27,10,30,45,29,67,70],get_points_on_carthesian_3d_grid:59,fill:45,qtplot:23,again:[18,67],nbody_gadget:67,mpi_sendrecv:5,orient:70,field:45,defaultparam:15,you:[1,35,57,43,9,45,67],get_surfacemap_on_carthesian_2d_grid:59,sequenc:[6,15,54],symbol:65,peas:30,mass_tot:[22,67,50],polynomi:36,frum_num:50,reduc:[22,18,50,5],homodisk:[8,22],directori:[1,35,60,43,67,18],descript:22,rxy:50,mass:[17,50,19,22,27,59,8,69,67,15],parallelism:[44,17,57],potenti:[18,52,59,28,32,50],disp:45,represent:[49,24],all:[35,57,22,5,41,50,28,30,45,67],sci:45,consider:18,illustr:[57,45],unitsysnam:65,obsm:15,reson:18,inertial_tensor:50,disk:[17,67,19,22,50,8,9,18,39],pygsl:[13,17,6],errtoltheta:[18,50],read_ascii:30,init_cool:34,white:22,miyamoto_nagai_f:39,init:[34,50],ylabel:[22,18],norm:[50,24],mpi_recv:5,far:[50,24],mpi:[17,57,61,62,30,5,13,50,70],ytick:15,hubbleparam:[3,27,67],fab:[1,57],regrion:22,mpi_allreduc:5,flag_sfr:67,list:[49,26,5,27,8,30,45,65,50,15],dpotenti:32,small:15,revaz:[42,30,7],dimens:[8,50,6],electrondens:12,diment:15,zero:[50,36,15],mpi_argmax:5,design:70,further:57,gzmax:18,tcool:[50,15],hernquist:[8,22,69],sub:[50,15],unitsparam:50,sun:64,section:45,crush:[27,15],delet:45,memmap:45,"public":45,nb3:67,nb2:67,nb1:67,get_accelerationmap_on_cylindrical_2dv_grid:59,strong:67,modifi:[22,35,69,50],valu:[49,35,36,54,67,5,27,59,50,8,45,65,66,18,15,70],amoung:50,search:[17,45],configuratio:35,persp:[27,50],gettre:50,amount:45,mc1d:68,magnitud:64,data_typ:5,timestep:34,transit:22,tablehdu:45,filenam:[49,54,7,60,30,45,50],select:[1,67,57,17,50,44,18],vrxyz:50,two:[17,36,19,57,22,59,61,45,44,67,15],"0000000000000001e":50,taken:[27,35],mpi_send:5,more:[17,57,22,59,45,44,67],desir:[8,50],symetr:[22,18,59],fonction:[50,15],flag:[27,50,45],rotx:[28,36],known:50,none:[0,49,50,22,5,24,27,59,60,8,10,30,45,66,18,15],histori:45,cooling_with_met:[13,17,34],den:50,mr_fct:8,accept:45,histocent:50,sphere:[22,17,8,18,19],minimum:[50,15,5],axix:22,explor:[67,70],cours:[18,9,57],axis1:[50,24],axis2:[50,24],divid:39,unit_kg:65,anoth:[43,18],divis:8,getmask:36,reject:[50,15],carthesian:[50,59,15],simpl:[35,57,26,22,8,30,15],optdir:9,get_symetrisation_along_axis_old:59,flag_ag:67,resourc:45,amximum:5,referenc:45,get_surfacemap_on_cylindrical_2dh_grid:59,plane:[27,50,24,15],mode2:50,associ:[67,45],welcom:17,circumst:22,multicompon:18,ambigu:45,caus:45,ortho:24,spheric:[17,50,19,22,59,18],help:67,lweight:15,paramet:[17,49,35,20,54,3,34,24,27,50,65,8,63,30,45,13,18,15,70],epot:[28,50],imheight:49,align2:50,nbdrklib:[13,17,41],pysic:27,good:[18,9,50],"return":[2,3,45,8,6,11,18,15,68,24,26,27,28,30,32,36,38,39,5,46,49,52,59,64,65,50,22],gadget:[1,67,51,57,22,50,9,18],get_r:[22,18],dist_ey:[27,50,24],getr:15,oper:67,spec_vect:50,get_n:50,ampmap:28,easili:67,achiev:67,radian:[50,24],radial:[17,50,57,22,32,18,15],found:[50,9,30,45],nfwg:[8,39,22],computemap:50,getpotentialincylindricalgrid:50,weight:[27,67,36,50],getradialvelocitydispersionincylindricalgrid:50,realli:50,expect:45,energi:[50,28,15,11,45],coldef:45,mynumer:[13,17,36],sort_typ:50,print:[1,49,57,34,45,5,65,50],mc2d:68,myhistogram:15,base:[65,50,51],put:18,"6022e":65,cvcenter:50,histrogram:[50,36],veloci:50,rxyz:[50,67,57],veloc:[17,50,19,24,32,18,15,52],script:[1,17,57,27,61,9,44,18,70],phi_m:33,interact:70,major:50,exchang:[50,5],number:[50,54,22,8,59,27,30,45,18,15],frmax:8,talkserv:0,vetor:15,done:[18,67],least:65,blank:45,m_proton:65,readfct:50,trapez:66,betwe:50,differ:[35,19,57,67,50,18],php:61,exponenti:39,"5th":45,construct:[17,55,58,26,25,45,13,16],vxyr2:15,vxy:50,ttype:45,scheme:34,store:[35,45],interti:50,option:[35,54,57,50,43,27,10,45,18],get_ntyp:50,get_massmap_on_spherical_1d_grid:59,part:[62,19,45],dzphi:52,parnam:45,"_temphdu":45,king:69,dt0:50,contrari:[50,9],other_directori:43,get_lambda_from_density_temperature_feh:34,consumpt:70,mpi_getv:5,vx2:15,"6262e":65,comput:[50,57,26,22,41,59,8,69,18,15,70],packag:[35,27,61,62,9,30],hubbl:3,write_num:[67,50],"null":45,lib:[27,9],commentari:45,"6750e":65,npart:[22,67,50,5],drawxtick:15,also:[18,57,70,45],get_lambda_from_density_energyint_feh:34,build:43,invoqu:18,svxyr:50,dictrionari:18,previou:[22,67,57],reach:30,mixtur:12,most:30,rho:[67,52,22,50,8,69,12,32,18,15],hnd:36,alpha:[8,50,24,27,15],tpe:[22,67,49,50],epicycl:18,ext:45,exp:[22,18,15],azimuth:[17,18,50],get_potentialmap_on_carthesian_2d_grid:59,extkei:45,"3x1":50,"3x3":26,astrophys:45,fine:61,find:[5,57,69,67,45],pnbody_exampl:[1,18,67],mape:2,copyright:67,spec_var:50,writer:54,read_on:10,wrape:18,factor:[38,65,50],get_num:50,tbox:22,palett:[17,57,23,7,13,67,15],get_nbody_tot:50,bresenham:2,"3xn":[50,36,15],get_numbermap_on_carthesian_2d_grid:59,spherical_1d_grid:[22,18],grmax:18,byter:50,coord:[50,69,15],statist:18,arp:12,set:[17,49,35,19,29,3,22,54,50,8,9,30,45,18],art:12,aru:12,dump:30,pisothm_mr:[8,69],l_kx:27,l_ky:27,sec:15,arg:[54,24,8,45,50,15],close:[60,9,30,45],"_imagebasehdu":45,contour:[26,15],analog:45,someth:[9,57],wor:50,unit_mol:65,imagemagick:61,get_known_format:50,solf:50,gethead:45,tnow:22,filter_nam:[27,67],both:50,last:[50,67,30,45],winwidth:49,informatin:67,meanmap:15,d2r_potenti:52,pdf:45,mpi_getexchanget:5,load:[67,70],simpli:[35,57,45,50,9,67,18],skipe:30,get_list_of_method:50,gather_po:50,header:[50,54,30,15,45],carlo:68,vxyr:[50,15],littl:[50,22,67,54,5],linux:[67,20],epicyclic_approxim:18,devid:[22,19],due:50,empti:50,nbody_binari:22,txt:30,get_com:45,imag:[49,50,57,23,24,27,61,10,45,67,15],geter:15,coordin:[17,18,19,15,50],gal:65,tangenti:[50,15],look:[50,24,15],hdcenter:50,dz_potenti:52,mpi4pi:[61,57,5],"while":[18,45],error:30,write_dmp:30,x_sigma:50,mc3d:68,readi:19,centr:[8,50],nb_ga:67,itself:54,quadrat:36,vy2:15,minim:[50,18,45],get_typ:49,combimap:50,funni:22,oldkei:45,conflict:45,higher:[66,61,67,59,50],find_var:50,optim:52,mpirun:[62,57],ponder:28,moment:[50,15],user:[34,35,70,67,45],chang:[50,67,54,45],focal:[27,50,24],recent:30,lower:[66,59,15],task:57,particul:[8,50],equival:[5,45],add_histori:45,drphi:32,pickl:30,person:2,elev:50,mandriva:67,pfennig:15,lin:15,"0x2fd74e0":5,explan:45,gadget_z00:[67,57],pylab:[22,18],"_file":45,groupdata:45,shape:[50,57,45,24,59,27,5,67,15],"6726e":65,get_numbermap_on_cylindrical_3d_grid:59,imwidth:49,mandat:45,cut:[1,27,50,15],extra:45,friedli:15,rgb:15,nfwg_mr:69,dtype:[22,67,30,45],global_max:57,input:[44,17,50,57,45],pnbodypath:[14,9],float32:[22,67,5],bin:[1,50,57,22,9,5,18,15],thermodyn:[13,17,12],big:[50,15],a_z:3,bit:54,extver:45,implemet:50,set_systemunits_from_param:65,delaunai:26,some:[67,36,22,24,65,18],back:[10,45],sampl:26,sight:18,distribut:[17,2,19,57,22,61,8,68,50,39,69],get_lambda_normalized_from_temperature_feh:34,scale:[8,27,15,45],per:[27,50,45],arrayob:27,mencod:61,flag_feedback:67,"_hierarch":45,proc:[50,57,5],isothm_mr:8,run:[1,18,9,19,57],pnbody_mpi:57,sigma_zbi:52,bintablehdu:45,delta_n:5,nbody_tot:[22,67,50],impos:22,idx:5,boxcut:24,paralel:50,block:[5,45],cutoff:15,file1:50,gadgetparameterfil:50,pythonpath:9,within:67,get_densitymap_on_spherical_1d_grid:59,computeobjectmap:50,create_line3:2,create_line2:2,ensur:[18,9],constructdelaunai:26,triangl:26,errno:30,king_profil:69,"long":54,includ:[50,5,45],mpi_gath:5,nbodypath:14,decomposit:50,msg:5,link:[67,15,50],translat:[22,67,24,50],ulist:65,line:[1,2,57,22,60,27,30,67,18],diret:57,info:[50,26,22,45,10,5,65,67],concaten:5,zprof:50,align_with_main_axi:50,omegalambda:[3,67],similar:50,unitveloc:27,cosmo:[3,13,17],constant:[65,18,48],ex_tabl:5,rmax_halo:22,jaffe_mr:69,"char":30,proper:45,treepot:50,doe:[50,5,30,45],b_xopt:27,tranfert_funct:15,nan:50,get_massmap_on_cylindrical_3d_grid:59,transport:45,tbtype:45,nice:22,draw:[50,15],b_yopt:27,thermopar:12,developp:50,amplitud:[28,50],amp_m:33,algorithm:[8,2],nasa:45,eeach:57,v_sigma:50,svr:50,unitsfil:50,code:[54,19,45],edg:9,scratch:[44,17,67],zmin:[18,59,50],soften:[18,28,69,50],edu:45,sphmap:28,privat:45,sensit:45,libdisk:[13,17,66],send:[50,5],z_a:3,ftype:[1,67,57,22,50,8,18],sens:50,get_surfacedensitymap_on_cylindrical_2dh_grid:59,sent:5,objet:67,minert:50,cylindr:[17,50,19,59,18,15],electron:[50,12],volum:59,svtr:50,magic:18,reciv:57,tra:12,"try":[50,18,57,67],trp:12,tru:12,"_corruptedhdu":45,impli:45,smaller:67,visualis:67,euler:24,getvaltyp:15,get_default_spec_vect:50,download:[17,42],getnumberparticlesincylindricalgrid:50,append:[50,60,45],index:[17,45,27,61,5,50,15],pdmap:28,iclib:[13,17,39],access:[67,45],loglog:18,expd_mr:8,"__file":45,len:[22,67,6,30],leo:[27,67,9],bodi:[50,24,70],adiabat:[27,50],l25:69,winheight:49,ioerror:[30,45],vertic:[17,18,50],getnumbermap:15,convert:[61,50,48,15],convers:65,get_massmap_on_cylindrical_2dv_grid:59,technolog:45,astrophi:69,hubble_a:3,cte:[13,17,65,48],del_col:45,implement:[69,70],appli:15,approxim:[8,18,50],jaff:69,sgn:50,oval:8,from:[1,45,8,18,15,17,20,22,24,27,30,32,35,36,43,44,5,46,49,50,52,54,57,59,65,67],update_tbhdu:45,commun:30,intiti:67,get_npart_al:50,few:70,usr:[1,57],get_img:10,mpi_find_a_totask:5,sort:50,extens:[1,45],get_accumulatedmassmap_on_spherical_1d_grid:59,cheeseshop:61,histovel:50,flag_met:67,sendalltoal:50,account:50,phot:[13,17,64],alia:50,arang:[22,50,30],thin:[1,8],endian:54,point:[50,57,26,24,59,8,28,67,15],unitlength_in_cm:[65,27,50],tar:43,process:[50,57],high:45,tarbal:[43,17,20],xmin:[59,15],springel:50,serial:51,miyamoto:[8,22,52],get_densitymap_on_cylindrical_3d_grid:59,delai:45,surfac:[69,67,52,59,50],cmcenter:50,getmassmap:15,mpi_gatherandwritearrai:5,palette_nam:[23,15],instead:[18,36,57,50,30,45,67],king_surface_density_old:69,circular:[32,52],from_num:50,mpi_readandsendarrai:5,frustum:24,col_nam:45,pyarrai:36,gcc:[61,67],generic2c_mr:69,l_color:27,ldensiti:32,physic:[17,67,59,50,45,65,66,18,47,15,70],velocit:[50,70],"05811936674e":67,light:[23,57,15,7,67],correspond:[49,36,57,26,22,45,5,8,59,12,66,50,15,64],element:[50,67,5],local_max:57,irand:[8,18],allow:[22,50,70,30,45],fits_rec:45,king_profile_rz:69,l_max:[27,15],design7:61,movi:[13,17,61,10],move:[67,50],pyraf:45,tessel:[13,17,26],unitsparamet:[27,35,9,50],mpi_min:5,write:[1,50,57,54,45,60,30,5,67],outer:[22,18],tstart:50,total:[8,28,50,67,45],mpi_pprint:5,pixel:15,python:[1,17,54,43,61,30,57,44,67,70],mpdule:62,dai:50,dat:[1,67,57,22,27,8,30,45,18],front:45,desnumngb:50,sobol:6,recarrai:45,parameterfil:9,count_blank:45,mpi_iprint:5,nfw:[8,22,69],astronom:45,mode:[50,45,27,10,5,67,15],mpi_len:5,whistogram:36,rho2:22,rho1:22,quaddinterp1d:36,our:57,meanweight:50,special:[22,50,61],out:45,variabl:[17,67,19,22,50,9,5,18],matrix:[50,36,23,24,59,30,18,15],get_ob:24,get_massmap:22,"_formatp":45,spline:36,rel:50,rec:[13,17,37],matric:[2,15],pyfit:[13,17,45],insid:[50,24],"3807e":65,manipul:[70,45],msden:50,get_interpolation_on_cylindrical_2dv_grid:59,get_numbermap_on_cylindrical_2dh_grid:59,dictionari:[49,30,45,65,50,15],releas:67,rhob:[8,69],pisothm_profil:69,integrate1:34,ionis:[27,50],ask:57,frenk:22,get_velocities_from_virial_approxim:50,length:[8,54,45],n_halo:22,geometri:[13,17,22,18,24],dmode:50,endors:45,set_npart:50,"_allhdu":45,mpi_oldreadandsendarrai:5,arctan2:59,tier:45,nfwg_profil:69,neps_d:8,data:[45,54,23,10,30,5,15],licens:[67,45],system:[17,18,41,45,65,50,48,70],messag:45,unitsparameterfil:9,computegridparameters2:8,streelib:[13,17,25],shell:[8,22],recongn:35,obsrevaz:67,rsp:[67,50],get_histori:45,tommr:18,rbox:50,see:[50,27,9,45,67,69],get_velocities_from_spherical_grid:[18,50],charact:54,xlabel:[22,18],steep:22,pr_fct:8,clip:[27,50,24],memmori:45,clearli:57,sphevalu:50,tabl:[17,35,5,45],need:[67,57,22,50,43,61,69,45,18,15],treelib:[13,17,51],errorurlopen:45,rmin:[8,18,22,15,50],min:[27,15],diverg:69,writestr:54,atim:67,configdir:9,which:[18,36,57,45],singl:54,binx:5,arument:5,b_weight:27,get_volumemap_on_cylindrical_3d_grid:59,"1e11":67,getmeanmap:15,mplayer:61,write_ascii_valu:49,toomr:18,histogram:[50,36,15,5],"class":[0,49,35,54,50,23,60,10,45,65,67],getsigmavalmap:15,homogen:[8,39,22],stereo:70,mkmap3dsortedsph:2,ura:12,url:45,gather:[50,57,5],urt:12,snapshot:67,determin:[8,18,19,50],m_neutron:65,miyamoto_nagai:[8,39,22],nmin:15,add_box:15,text:45,verbos:[8,45],computeisocontour:26,szr:50,trivial:18,useblank:45,get_dic:49,get_densitymap:22,nois:18,mxntpe:[22,67],dispert:[18,50],getdata:45,isotherm:[8,22,69],suppos:[18,50],verifyerror:45,setfield:45,equilibrium:[17,18,19],print_filenam:50,pypi:61,accel:50,rainbow4:67,beam:8,acces:67,filter_opt:27,increas:[22,50,45],drawytick:15,extnam:45,navarro:22,integr:[50,34,41,59,62,66,18],contain:[35,57,26,5,59,50,8,9,30,45,18,15,70],view:[67,22,24,27,45,50],easyli:67,extractig:22,npart_tot:[22,67,50],gatherbaseunit:65,displai:[17,35,57,22,23,40,50,27,9,67,70],particl:[1,2,19,17,67,21,22,57,24,59,50,8,28,5,44,18,15,70],statu:[50,30],lut:7,extend:45,correctli:57,get_massmap_on_spherical_3d_grid:59,written:[54,57,45],theta:[59,15],lum:[50,15],kei:[46,45],get_densitymap_on_cylindrical_2dv_grid:59,localsystem_of_unit:[3,50],addit:[1,61],invgetr:15,rtype:45,equal:[8,50,15],etc:[50,70,45],instanc:[67,50],equat:[32,18,52,50],freeli:35,comment:45,chmod:1,fromtask:5,histocenter2:50,pythonwar:61,evalu:50,open_and_read:50,writeto:45,compos:50,compon:[17,18],create_lin:2,tranform:15,deep:45,vmin:50,allwai:18,set_ftyp:[67,50],present:45,multi:[17,18],critical_energy_spec:67,readstr:54,dx_mean:50,sph2cart:50,align:[50,24],defin:[67,54,22,50,8,5,65,18,15],phlummer:22,triaxial:8,observ:[27,50,24],layer:45,write_arrai:30,ekin:50,cell:[66,8,50,59],site:[27,35,9,30],get_potentialmap_on_cylindrical_2dh_grid:59,unit_:65,scienc:45,generic_mx:[8,39,22],let:[22,18,57,67],lvsun:64,generic_mr:[8,39,22],sqrt:59,mpi_histogram:5,phi:[33,18,52,50],http:[61,42,45],structur:45,cubic:[17,22,19],expans:38,hdulist:45,"_card_with_continu":45,newunit:65,set_filenam:50,expand:36,off:[27,50],center:[50,67,59,15,57],cosmolib:[13,17,38],well:[22,9,61],exampl:[1,14,19,20,17,67,22,54,9,30,45,13,18,15],command:[1,35,57,43,9,14,18,70],readrecord:54,undefin:45,usual:[1,50,18,54],lest:18,distanc:[27,50,24,15,57],get_velocities_from_cylindrical_grid:[18,50],mpi_oldgatherandwritearrai:5,unitlst:65,obtain:[18,57,22,50,67,65,14],sden:50,l_crush:27,exempl:67,add:[2,57,22,45,50,15],densiti:[67,52,3,22,59,50,8,69,11,12,32,18,39,15,70],match:45,momemtum:15,dest:5,piec:45,change_unit:45,"2nd":45,recurs:[65,5],python2:[27,9,30],insert:45,rotz:[28,36],like:[50,18,9,70,67],fits_record:45,"1095e":65,roti:[28,36],necessari:22,dmdr_fct_halo:22,page:17,theta_xyz:50,burkert_mr:69,plummer_mr:69,suppli:45,self:[65,18,50],get_r_interpolation_on_cylindrical_2dv_grid:59,unit_g:65,"export":62,nagai:[8,22,52],unit_c:65,flush:45,unit_m:65,home:[67,7,27,9,30,18],unit_k:65,unit_j:65,tmp:30,tmu:50,p_name:50,avoid:22,mpi_argmin:5,estim:50,mkmap3dw:2,tmin:50,slight:65,usag:45,docstr:45,get_volumemap_on_spherical_1d_grid:59,adot_a:3,mkmap3dn:2,about:[8,67],cardlist:45,column:[30,45],tomr:18,libqt:[13,17,23],get_numbermap_on_cylindrical_2dv_grid:59,constructor:[50,45],fals:[8,50,30,15,45],own:[35,57,45],safronov:18,gadget_z40:67,numpi:[50,22,61,30,18,15],lenght:[50,5],hsml:50,automat:[50,35,15,67],mplot:15,diagon:50,xyz2peano:46,merg:[44,17,67],val:[50,59,15],flag_entr_:67,transfer:5,"var":50,log10:67,"function":[67,36,57,3,22,5,61,50,38,8,69,30,45,18,34,15],rho0:69,desing:70,extract1dmeanfrom2dmap:15,constain:65,gaussian:67,beetween:15,overflow:45,cooling_from_nh_and_t:11,count:50,pnbody_show:[27,14,35],smooth:2,redistribut:50,get_potentialmap_on_cylindrical_3d_grid:59,dmp:30,record:[54,45],below:[22,67],limit:70,otherwis:45,problem:22,unformat:54,pil:[61,23,15],get_integr:[66,59],pio:[1,50,57,22,30,67],"int":[52,54,27,5,32,50,15],mask:36,dure:[34,18],get_lineardensitymap_on_spherical_1d_grid:59,circum:26,inf:50,tick:15,detail:45,new_valu:45,other:[50,67,57,30,45],bool:30,cchar:30,stat:18,mkmap2dw:2,ndarrai:[30,45],mkmap2dn:2,log:[18,27,60,8,50,15],preform:57,"_vlf":45,"99792458e8":65,"3rd":45,nrow:45,nodes_info:50,portion:45,omega0:[3,67]},objtypes:{"0":"py:module","1":"py:function","2":"py:method","3":"py:class","4":"py:data","5":"py:exception","6":"py:attribute","7":"np:module","8":"np:function","9":"np:method","10":"np:class","11":"np:data","12":"np:exception","13":"np:attribute"},titles:["the talkgdisp module","Using pNbody with scripts","the C mapping module","the cosmo module","the C asciilib module","the mpi module","the C pygsl module","the palette module","the ic module","Check the installation","the Movie module","the C coolinglib module","the thermodyn module","Reference","Examples","the libutil module","the C ptreelib module (obsolete)","Welcome to pNbody’s documentation!","Generating velocities","Generating initial conditions","Installation","Selectig particles","Generating mass profiles","the libqt module","the geometry module","the C streelib module (under construction)","the C tessel module","Default parameters","the C nbodymodule module","Setting a format file","the io module","Generating grids","the plummer module","the fourier module","the C cooling_with_metals module","Default configuration","the C myNumeric module","the rec module","the C cosmolib module","the C iclib module","Display Models","the C nbdrklib module","Download","Installing from source","Tutorial","the pyfits module","the C peanolib module","Extracting physical quantities","the ctes module","the param module","the main module","the C treelib module","the libmiyamoto module","How to deal with units ?","the fortranfile module","the C mapping-omp module (under construction)","the cooling module","Using pNbody in parallel","the C pmlib module (never developped)","the libgrid module","the liblog module","Prerequiste","the C PyGadget module","the parameters module","the phot module","the units module","the libdisk module","Using pNbody with the python interpreter","the C montecarlolib module","the profiles module","Overview"],objnames:{"0":"Python module","1":"Python function","2":"Python method","3":"Python class","4":"Python data","5":"Python exception","6":"Python attribute","7":"Python module","8":"Python function","9":"Python method","10":"Python class","11":"Python data","12":"Python exception","13":"Python attribute"},filenames:["rst/TalkgdispModule","rst/Tutorial_scripts","rst/C_mapping","rst/CosmoModule","rst/C_asciilib","rst/MpiModule","rst/C_pygsl","rst/PaletteModule","rst/IcModule","rst/Test_the_installation","rst/MovieModule","rst/C_coolinglib","rst/ThermodynModule","rst/Reference","rst/Examples","rst/LibutilModule","rst/C_ptreelib","index","rst/GeneratingVelocities","rst/InitialConditions","rst/Installation","rst/Selection","rst/GeneratingMassProfiles","rst/LibqtModule","rst/GeometryModule","rst/C_streelib","rst/C_tessel","rst/Default_parameters","rst/C_nbodymodule","rst/Formats","rst/IoModule","rst/Grids","rst/PlummerModule","rst/FourierModule","rst/C_cooling_with_metals","rst/Default_configurations","rst/C_myNumeric","rst/RecModule","rst/C_cosmolib","rst/C_iclib","rst/Display","rst/C_nbdrklib","rst/Download","rst/Installing_from_tarball","rst/Tutorial","rst/PyfitsModule","rst/C_peanolib","rst/PhysicalQuantities","rst/CtesModule","rst/ParamModule","rst/MainModule","rst/C_treelib","rst/LibmiyamotoModule","rst/Units","rst/FortranfileModule","rst/C_mapping-omp","rst/CoolingModule","rst/Tutorial_parallel","rst/C_pmlib","rst/LibgridModule","rst/LiblogModule","rst/Prerequiste","rst/C_PyGadget","rst/ParameterModule","rst/PhotModule","rst/UnitsModule","rst/LibdiskModule","rst/Tutorial_interpreter","rst/C_montecarlolib","rst/ProfilesModule","rst/Overview"]})
\ No newline at end of file
diff --git a/Doc/newdoc/_build/latex/Makefile b/Doc/newdoc/_build/latex/Makefile
index f219a2f..d5a73f5 100644
--- a/Doc/newdoc/_build/latex/Makefile
+++ b/Doc/newdoc/_build/latex/Makefile
@@ -1,64 +1,56 @@
# Makefile for Sphinx LaTeX output
ALLDOCS = $(basename $(wildcard *.tex))
ALLPDF = $(addsuffix .pdf,$(ALLDOCS))
ALLDVI = $(addsuffix .dvi,$(ALLDOCS))
# Prefix for archive names
ARCHIVEPRREFIX =
# Additional LaTeX options
LATEXOPTS =
all: $(ALLPDF)
all-pdf: $(ALLPDF)
all-dvi: $(ALLDVI)
all-ps: all-dvi
for f in *.dvi; do dvips $$f; done
-all-pdf-ja: $(wildcard *.tex)
- ebb $(wildcard *.pdf *.png *.gif *.jpeg)
- platex -kanji=utf8 $(LATEXOPTS) '$<'
- platex -kanji=utf8 $(LATEXOPTS) '$<'
- platex -kanji=utf8 $(LATEXOPTS) '$<'
- -mendex -U -f -d '$(basename $<).dic' -s python.ist '$(basename $<).idx'
- platex -kanji=utf8 $(LATEXOPTS) '$<'
- platex -kanji=utf8 $(LATEXOPTS) '$<'
- dvipdfmx '$(basename $<).dvi'
zip: all-$(FMT)
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
tar: all-$(FMT)
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
bz2: tar
bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
# The number of LaTeX runs is quite conservative, but I don't expect it
# to get run often, so the little extra time won't hurt.
%.dvi: %.tex
latex $(LATEXOPTS) '$<'
latex $(LATEXOPTS) '$<'
latex $(LATEXOPTS) '$<'
-makeindex -s python.ist '$(basename $<).idx'
latex $(LATEXOPTS) '$<'
latex $(LATEXOPTS) '$<'
%.pdf: %.tex
pdflatex $(LATEXOPTS) '$<'
pdflatex $(LATEXOPTS) '$<'
pdflatex $(LATEXOPTS) '$<'
-makeindex -s python.ist '$(basename $<).idx'
pdflatex $(LATEXOPTS) '$<'
pdflatex $(LATEXOPTS) '$<'
clean:
- rm -f *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla
+ rm -f *.pdf *.dvi *.ps
+ rm -f *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla
.PHONY: all all-pdf all-dvi all-ps clean
diff --git a/Doc/newdoc/_build/latex/pNbody.log b/Doc/newdoc/_build/latex/pNbody.log
index f5c6e18..7e24dbc 100644
--- a/Doc/newdoc/_build/latex/pNbody.log
+++ b/Doc/newdoc/_build/latex/pNbody.log
@@ -1,964 +1,881 @@
-This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2011.5.30) 30 AUG 2011 22:49
+This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2011.1.10) 1 SEP 2011 14:24
entering extended mode
%&-line parsing enabled.
**pNbody.tex
(./pNbody.tex
-LaTeX2e <2009/09/24>
-Babel and hyphenation patterns for english, usenglishmax, dumylang, noh
-yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov
-ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1
-9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san
-skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn
-orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian
-, estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po
-rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.
+LaTeX2e <2005/12/01>
+Babel and hyphenation patterns for english, usenglishmax, dumylang, noh
+yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
+erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
+ french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
+us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
+tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,
+turkish, ukenglish, ukrainian, loaded.
(./sphinxmanual.cls
Document Class: sphinxmanual 2009/06/02 Document class (Sphinx manual)
-(/usr/share/texmf-texlive/tex/latex/base/report.cls
-Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texmf-texlive/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
+(/usr/share/texmf/tex/latex/base/report.cls
+Document Class: report 2005/09/16 v1.4f Standard LaTeX document class
+(/usr/share/texmf/tex/latex/base/size10.clo
+File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
))
-(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
-Package: inputenc 2008/03/30 v1.1d Input encoding file
+(/usr/share/texmf/tex/latex/base/inputenc.sty
+Package: inputenc 2006/05/05 v1.1b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
-(/usr/share/texmf-texlive/tex/latex/base/utf8.def
-File: utf8.def 2008/04/05 v1.1m UTF-8 support for inputenc
+(/usr/share/texmf/tex/latex/base/utf8.def
+File: utf8.def 2006/03/30 v1.1i UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
-... processing UTF-8 mapping file for font encoding T1
+... processing UTF-8 mapping file for font encodingT1
-(/usr/share/texmf-texlive/tex/latex/base/t1enc.dfu
-File: t1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
+(/usr/share/texmf/tex/latex/base/t1enc.dfu
+File: t1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A1 (decimal 161)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00AB (decimal 171)
defining Unicode char U+00BB (decimal 187)
defining Unicode char U+00BF (decimal 191)
defining Unicode char U+00C0 (decimal 192)
defining Unicode char U+00C1 (decimal 193)
defining Unicode char U+00C2 (decimal 194)
defining Unicode char U+00C3 (decimal 195)
defining Unicode char U+00C4 (decimal 196)
defining Unicode char U+00C5 (decimal 197)
defining Unicode char U+00C6 (decimal 198)
defining Unicode char U+00C7 (decimal 199)
defining Unicode char U+00C8 (decimal 200)
defining Unicode char U+00C9 (decimal 201)
defining Unicode char U+00CA (decimal 202)
defining Unicode char U+00CB (decimal 203)
defining Unicode char U+00CC (decimal 204)
defining Unicode char U+00CD (decimal 205)
defining Unicode char U+00CE (decimal 206)
defining Unicode char U+00CF (decimal 207)
defining Unicode char U+00D0 (decimal 208)
defining Unicode char U+00D1 (decimal 209)
defining Unicode char U+00D2 (decimal 210)
defining Unicode char U+00D3 (decimal 211)
defining Unicode char U+00D4 (decimal 212)
defining Unicode char U+00D5 (decimal 213)
defining Unicode char U+00D6 (decimal 214)
defining Unicode char U+00D8 (decimal 216)
defining Unicode char U+00D9 (decimal 217)
defining Unicode char U+00DA (decimal 218)
defining Unicode char U+00DB (decimal 219)
defining Unicode char U+00DC (decimal 220)
defining Unicode char U+00DD (decimal 221)
defining Unicode char U+00DE (decimal 222)
defining Unicode char U+00DF (decimal 223)
defining Unicode char U+00E0 (decimal 224)
defining Unicode char U+00E1 (decimal 225)
defining Unicode char U+00E2 (decimal 226)
defining Unicode char U+00E3 (decimal 227)
defining Unicode char U+00E4 (decimal 228)
defining Unicode char U+00E5 (decimal 229)
defining Unicode char U+00E6 (decimal 230)
defining Unicode char U+00E7 (decimal 231)
defining Unicode char U+00E8 (decimal 232)
defining Unicode char U+00E9 (decimal 233)
defining Unicode char U+00EA (decimal 234)
defining Unicode char U+00EB (decimal 235)
defining Unicode char U+00EC (decimal 236)
defining Unicode char U+00ED (decimal 237)
defining Unicode char U+00EE (decimal 238)
defining Unicode char U+00EF (decimal 239)
defining Unicode char U+00F0 (decimal 240)
defining Unicode char U+00F1 (decimal 241)
defining Unicode char U+00F2 (decimal 242)
defining Unicode char U+00F3 (decimal 243)
defining Unicode char U+00F4 (decimal 244)
defining Unicode char U+00F5 (decimal 245)
defining Unicode char U+00F6 (decimal 246)
defining Unicode char U+00F8 (decimal 248)
defining Unicode char U+00F9 (decimal 249)
defining Unicode char U+00FA (decimal 250)
defining Unicode char U+00FB (decimal 251)
defining Unicode char U+00FC (decimal 252)
defining Unicode char U+00FD (decimal 253)
defining Unicode char U+00FE (decimal 254)
defining Unicode char U+00FF (decimal 255)
defining Unicode char U+0102 (decimal 258)
defining Unicode char U+0103 (decimal 259)
defining Unicode char U+0104 (decimal 260)
defining Unicode char U+0105 (decimal 261)
defining Unicode char U+0106 (decimal 262)
defining Unicode char U+0107 (decimal 263)
defining Unicode char U+010C (decimal 268)
defining Unicode char U+010D (decimal 269)
defining Unicode char U+010E (decimal 270)
defining Unicode char U+010F (decimal 271)
defining Unicode char U+0110 (decimal 272)
defining Unicode char U+0111 (decimal 273)
defining Unicode char U+0118 (decimal 280)
defining Unicode char U+0119 (decimal 281)
defining Unicode char U+011A (decimal 282)
defining Unicode char U+011B (decimal 283)
defining Unicode char U+011E (decimal 286)
defining Unicode char U+011F (decimal 287)
defining Unicode char U+0130 (decimal 304)
defining Unicode char U+0131 (decimal 305)
defining Unicode char U+0132 (decimal 306)
defining Unicode char U+0133 (decimal 307)
defining Unicode char U+0139 (decimal 313)
defining Unicode char U+013A (decimal 314)
defining Unicode char U+013D (decimal 317)
defining Unicode char U+013E (decimal 318)
defining Unicode char U+0141 (decimal 321)
defining Unicode char U+0142 (decimal 322)
defining Unicode char U+0143 (decimal 323)
defining Unicode char U+0144 (decimal 324)
defining Unicode char U+0147 (decimal 327)
defining Unicode char U+0148 (decimal 328)
defining Unicode char U+014A (decimal 330)
defining Unicode char U+014B (decimal 331)
defining Unicode char U+0150 (decimal 336)
defining Unicode char U+0151 (decimal 337)
defining Unicode char U+0152 (decimal 338)
defining Unicode char U+0153 (decimal 339)
defining Unicode char U+0154 (decimal 340)
defining Unicode char U+0155 (decimal 341)
defining Unicode char U+0158 (decimal 344)
defining Unicode char U+0159 (decimal 345)
defining Unicode char U+015A (decimal 346)
defining Unicode char U+015B (decimal 347)
defining Unicode char U+015E (decimal 350)
defining Unicode char U+015F (decimal 351)
defining Unicode char U+0160 (decimal 352)
defining Unicode char U+0161 (decimal 353)
defining Unicode char U+0162 (decimal 354)
defining Unicode char U+0163 (decimal 355)
defining Unicode char U+0164 (decimal 356)
defining Unicode char U+0165 (decimal 357)
defining Unicode char U+016E (decimal 366)
defining Unicode char U+016F (decimal 367)
defining Unicode char U+0170 (decimal 368)
defining Unicode char U+0171 (decimal 369)
defining Unicode char U+0178 (decimal 376)
defining Unicode char U+0179 (decimal 377)
defining Unicode char U+017A (decimal 378)
defining Unicode char U+017B (decimal 379)
defining Unicode char U+017C (decimal 380)
defining Unicode char U+017D (decimal 381)
defining Unicode char U+017E (decimal 382)
defining Unicode char U+200C (decimal 8204)
defining Unicode char U+2013 (decimal 8211)
defining Unicode char U+2014 (decimal 8212)
defining Unicode char U+2018 (decimal 8216)
defining Unicode char U+2019 (decimal 8217)
defining Unicode char U+201A (decimal 8218)
defining Unicode char U+201C (decimal 8220)
defining Unicode char U+201D (decimal 8221)
defining Unicode char U+201E (decimal 8222)
defining Unicode char U+2030 (decimal 8240)
defining Unicode char U+2031 (decimal 8241)
defining Unicode char U+2039 (decimal 8249)
defining Unicode char U+203A (decimal 8250)
defining Unicode char U+2423 (decimal 9251)
)
Now handling font encoding OT1 ...
-... processing UTF-8 mapping file for font encoding OT1
+... processing UTF-8 mapping file for font encodingOT1
-(/usr/share/texmf-texlive/tex/latex/base/ot1enc.dfu
-File: ot1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
+(/usr/share/texmf/tex/latex/base/ot1enc.dfu
+File: ot1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A1 (decimal 161)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00B8 (decimal 184)
defining Unicode char U+00BF (decimal 191)
defining Unicode char U+00C5 (decimal 197)
defining Unicode char U+00C6 (decimal 198)
defining Unicode char U+00D8 (decimal 216)
defining Unicode char U+00DF (decimal 223)
defining Unicode char U+00E6 (decimal 230)
defining Unicode char U+00EC (decimal 236)
defining Unicode char U+00ED (decimal 237)
defining Unicode char U+00EE (decimal 238)
defining Unicode char U+00EF (decimal 239)
defining Unicode char U+00F8 (decimal 248)
defining Unicode char U+0131 (decimal 305)
defining Unicode char U+0141 (decimal 321)
defining Unicode char U+0142 (decimal 322)
defining Unicode char U+0152 (decimal 338)
defining Unicode char U+0153 (decimal 339)
defining Unicode char U+2013 (decimal 8211)
defining Unicode char U+2014 (decimal 8212)
defining Unicode char U+2018 (decimal 8216)
defining Unicode char U+2019 (decimal 8217)
defining Unicode char U+201C (decimal 8220)
defining Unicode char U+201D (decimal 8221)
)
Now handling font encoding OMS ...
-... processing UTF-8 mapping file for font encoding OMS
+... processing UTF-8 mapping file for font encodingOMS
-(/usr/share/texmf-texlive/tex/latex/base/omsenc.dfu
-File: omsenc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
+(/usr/share/texmf/tex/latex/base/omsenc.dfu
+File: omsenc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A7 (decimal 167)
defining Unicode char U+00B6 (decimal 182)
defining Unicode char U+00B7 (decimal 183)
defining Unicode char U+2020 (decimal 8224)
defining Unicode char U+2021 (decimal 8225)
defining Unicode char U+2022 (decimal 8226)
)
Now handling font encoding OMX ...
... no UTF-8 mapping file for font encoding OMX
Now handling font encoding U ...
... no UTF-8 mapping file for font encoding U
defining Unicode char U+00A9 (decimal 169)
defining Unicode char U+00AA (decimal 170)
defining Unicode char U+00AE (decimal 174)
defining Unicode char U+00BA (decimal 186)
defining Unicode char U+02C6 (decimal 710)
defining Unicode char U+02DC (decimal 732)
defining Unicode char U+200C (decimal 8204)
defining Unicode char U+2026 (decimal 8230)
defining Unicode char U+2122 (decimal 8482)
defining Unicode char U+2423 (decimal 9251)
))
defining Unicode char U+00A0 (decimal 160)
-(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
+(/usr/share/texmf/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
-(/usr/share/texmf-texlive/tex/latex/base/t1enc.def
+(/usr/share/texmf/tex/latex/base/t1enc.def
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info: Redeclaring font encoding T1 on input line 43.
))
-(/var/lib/texmf/tex/generic/babel/babel.sty
-Package: babel 2008/07/06 v3.8l The Babel package
+(/usr/share/texmf/tex/generic/babel/babel.sty
+Package: babel 2005/11/23 v3.8h The Babel package
-(/usr/share/texmf-texlive/tex/generic/babel/english.ldf
+(/usr/share/texmf/tex/generic/babel/english.ldf
Language: english 2005/03/30 v3.3o English support from the babel system
-(/usr/share/texmf-texlive/tex/generic/babel/babel.def
-File: babel.def 2008/07/06 v3.8l Babel common definitions
+(/usr/share/texmf/tex/generic/babel/babel.def
+File: babel.def 2005/11/23 v3.8h Babel common definitions
\babel@savecnt=\count88
\U@D=\dimen103
)
+\l@british = a dialect from \language\l@english
+\l@UKenglish = a dialect from \language\l@english
\l@canadian = a dialect from \language\l@american
\l@australian = a dialect from \language\l@british
\l@newzealand = a dialect from \language\l@british
))
-(/usr/share/texmf-texlive/tex/latex/psnfss/times.sty
+(/usr/share/texmf/tex/latex/psnfss/times.sty
Package: times 2005/04/12 PSNFSS-v9.2a (SPQR)
) (./fncychap.sty
Package: fncychap 2007/07/30 v1.34 LaTeX package (Revised chapters)
\RW=\skip43
\mylen=\skip44
\myhi=\skip45
\px=\skip46
\py=\skip47
\pyy=\skip48
\pxx=\skip49
\c@AlphaCnt=\count89
\c@AlphaDecCnt=\count90
)
-(/usr/share/texmf-texlive/tex/latex/tools/longtable.sty
+(/usr/share/texmf/tex/latex/tools/longtable.sty
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
\LTleft=\skip50
\LTright=\skip51
\LTpre=\skip52
\LTpost=\skip53
\LTchunksize=\count91
\LTcapwidth=\dimen104
\LT@head=\box26
\LT@firsthead=\box27
\LT@foot=\box28
\LT@lastfoot=\box29
\LT@cols=\count92
\LT@rows=\count93
\c@LT@tables=\count94
\c@LT@chunks=\count95
\LT@p@ftn=\toks16
) (./sphinx.sty
Package: sphinx 2010/01/15 LaTeX package (Sphinx markup)
-(/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
+(/usr/share/texmf/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp) 5 = only ISO-Adobe without \textcurrency
(textcomp) 4 = 5 + \texteuro
(textcomp) 3 = 4 + \textohm
(textcomp) 2 = 3 + \textestimated + \textcurrency
(textcomp) 1 = TS1 - \textcircled - \t
(textcomp) 0 = TS1 (full)
(textcomp) Font families with sub-encoding setting implement
(textcomp) only a restricted character set as indicated.
(textcomp) Family '?' is the default used for unknown fonts.
(textcomp) See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 71.
-(/usr/share/texmf-texlive/tex/latex/base/ts1enc.def
+(/usr/share/texmf/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
Now handling font encoding TS1 ...
... processing UTF-8 mapping file for font encoding TS1
-(/usr/share/texmf-texlive/tex/latex/base/ts1enc.dfu
-File: ts1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
+(/usr/share/texmf/tex/latex/base/ts1enc.dfu
+File: ts1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
defining Unicode char U+00A2 (decimal 162)
defining Unicode char U+00A3 (decimal 163)
defining Unicode char U+00A4 (decimal 164)
defining Unicode char U+00A5 (decimal 165)
defining Unicode char U+00A6 (decimal 166)
defining Unicode char U+00A7 (decimal 167)
defining Unicode char U+00A8 (decimal 168)
defining Unicode char U+00A9 (decimal 169)
defining Unicode char U+00AA (decimal 170)
defining Unicode char U+00AC (decimal 172)
defining Unicode char U+00AE (decimal 174)
defining Unicode char U+00AF (decimal 175)
defining Unicode char U+00B0 (decimal 176)
defining Unicode char U+00B1 (decimal 177)
defining Unicode char U+00B2 (decimal 178)
defining Unicode char U+00B3 (decimal 179)
defining Unicode char U+00B4 (decimal 180)
defining Unicode char U+00B5 (decimal 181)
defining Unicode char U+00B6 (decimal 182)
defining Unicode char U+00B7 (decimal 183)
defining Unicode char U+00B9 (decimal 185)
defining Unicode char U+00BA (decimal 186)
defining Unicode char U+00BC (decimal 188)
defining Unicode char U+00BD (decimal 189)
defining Unicode char U+00BE (decimal 190)
defining Unicode char U+00D7 (decimal 215)
defining Unicode char U+00F7 (decimal 247)
defining Unicode char U+0192 (decimal 402)
defining Unicode char U+02C7 (decimal 711)
defining Unicode char U+02D8 (decimal 728)
defining Unicode char U+02DD (decimal 733)
defining Unicode char U+0E3F (decimal 3647)
defining Unicode char U+2016 (decimal 8214)
defining Unicode char U+2020 (decimal 8224)
defining Unicode char U+2021 (decimal 8225)
defining Unicode char U+2022 (decimal 8226)
defining Unicode char U+2030 (decimal 8240)
defining Unicode char U+2031 (decimal 8241)
defining Unicode char U+203B (decimal 8251)
defining Unicode char U+203D (decimal 8253)
defining Unicode char U+2044 (decimal 8260)
defining Unicode char U+204E (decimal 8270)
defining Unicode char U+2052 (decimal 8274)
defining Unicode char U+20A1 (decimal 8353)
defining Unicode char U+20A4 (decimal 8356)
defining Unicode char U+20A6 (decimal 8358)
defining Unicode char U+20A9 (decimal 8361)
defining Unicode char U+20AB (decimal 8363)
defining Unicode char U+20AC (decimal 8364)
defining Unicode char U+20B1 (decimal 8369)
defining Unicode char U+2103 (decimal 8451)
defining Unicode char U+2116 (decimal 8470)
defining Unicode char U+2117 (decimal 8471)
defining Unicode char U+211E (decimal 8478)
defining Unicode char U+2120 (decimal 8480)
defining Unicode char U+2122 (decimal 8482)
defining Unicode char U+2126 (decimal 8486)
defining Unicode char U+2127 (decimal 8487)
defining Unicode char U+212E (decimal 8494)
defining Unicode char U+2190 (decimal 8592)
defining Unicode char U+2191 (decimal 8593)
defining Unicode char U+2192 (decimal 8594)
defining Unicode char U+2193 (decimal 8595)
defining Unicode char U+2329 (decimal 9001)
defining Unicode char U+232A (decimal 9002)
defining Unicode char U+2422 (decimal 9250)
defining Unicode char U+25E6 (decimal 9702)
defining Unicode char U+25EF (decimal 9711)
defining Unicode char U+266A (decimal 9834)
))
LaTeX Info: Redefining \oldstylenums on input line 266.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 281.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 282.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 283.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 284.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 285.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 286.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 287.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 288.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 289.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 290.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 291.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 292.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 293.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 294.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 295.
Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 296.
Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 297.
Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 298.
Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 299.
Package textcomp Info: Setting ul8 sub-encoding to TS1/4 on input line 300.
Package textcomp Info: Setting ul9 sub-encoding to TS1/4 on input line 301.
Package textcomp Info: Setting augie sub-encoding to TS1/5 on input line 302.
Package textcomp Info: Setting dayrom sub-encoding to TS1/3 on input line 303.
Package textcomp Info: Setting dayroms sub-encoding to TS1/3 on input line 304.
Package textcomp Info: Setting pxr sub-encoding to TS1/0 on input line 305.
Package textcomp Info: Setting pxss sub-encoding to TS1/0 on input line 306.
Package textcomp Info: Setting pxtt sub-encoding to TS1/0 on input line 307.
Package textcomp Info: Setting txr sub-encoding to TS1/0 on input line 308.
Package textcomp Info: Setting txss sub-encoding to TS1/0 on input line 309.
Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 310.
Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 311.
Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 312.
Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 313.
Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 314.
Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 315.
Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 316.
Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 317.
Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 318.
Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 319.
Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 320.
Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 321.
Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 322.
Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 323.
Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 324.
Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 325.
Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 326.
)
-(/usr/share/texmf-texlive/tex/latex/fancyhdr/fancyhdr.sty
+(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty
\fancy@headwidth=\skip54
\f@ncyO@elh=\skip55
\f@ncyO@erh=\skip56
\f@ncyO@olh=\skip57
\f@ncyO@orh=\skip58
\f@ncyO@elf=\skip59
\f@ncyO@erf=\skip60
\f@ncyO@olf=\skip61
\f@ncyO@orf=\skip62
)
-(/usr/share/texmf-texlive/tex/latex/fancybox/fancybox.sty
+(/usr/share/texmf/tex/latex/fancybox/fancybox.sty
Package: fancybox 2000/09/19 1.3
Style option: `fancybox' v1.3 <2000/09/19> (tvz)
\@fancybox=\box30
\shadowsize=\dimen105
\@Sbox=\box31
\do@VerbBox=\toks17
\the@fancyput=\toks18
\this@fancyput=\toks19
\EndVerbatimTokens=\toks20
\Verbatim@Outfile=\write3
\Verbatim@Infile=\read1
-) (/usr/share/texmf-texlive/tex/latex/titlesec/titlesec.sty
-Package: titlesec 2007/08/12 v2.8 Sectioning titles
+) (/usr/share/texmf/tex/latex/titlesec/titlesec.sty
+Package: titlesec 2005/01/22 v2.6 Sectioning titles
\ttl@box=\box32
\beforetitleunit=\skip63
\aftertitleunit=\skip64
\ttl@plus=\dimen106
\ttl@minus=\dimen107
-\ttl@toksa=\toks21
\titlewidth=\dimen108
\titlewidthlast=\dimen109
\titlewidthfirst=\dimen110
) (./tabulary.sty
Package: tabulary 2007/10/02 v0.9 tabulary package (DPC)
-(/usr/share/texmf-texlive/tex/latex/tools/array.sty
-Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
+(/usr/share/texmf/tex/latex/tools/array.sty
+Package: array 2005/08/23 v2.4b Tabular extension package (FMi)
\col@sep=\dimen111
\extrarowheight=\dimen112
-\NC@list=\toks22
+\NC@list=\toks21
\extratabsurround=\skip65
\backup@length=\skip66
)
\TY@count=\count96
\TY@linewidth=\dimen113
\tymin=\dimen114
\tymax=\dimen115
\TY@tablewidth=\dimen116
)
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty
+(/usr/share/texmf/tex/latex/amsmath/amsmath.sty
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip67
For additional information on amsmath, use the `?' option.
-(/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty
+(/usr/share/texmf/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty
+(/usr/share/texmf/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
-\@emptytoks=\toks23
+\@emptytoks=\toks22
\ex@=\dimen117
))
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty
+(/usr/share/texmf/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen118
)
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty
+(/usr/share/texmf/tex/latex/amsmath/amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count97
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count98
\leftroot@=\count99
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count100
\DOTSCASE@=\count101
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box33
\strutbox@=\box34
\big@size=\dimen119
LaTeX Font Info: Redeclaring font encoding OML on input line 567.
LaTeX Font Info: Redeclaring font encoding OMS on input line 568.
\macc@depth=\count102
\c@MaxMatrixCols=\count103
\dotsspace@=\muskip10
\c@parentequation=\count104
\dspbrk@lvl=\count105
-\tag@help=\toks24
+\tag@help=\toks23
\row@=\count106
\column@=\count107
\maxfields@=\count108
-\andhelp@=\toks25
+\andhelp@=\toks24
\eqnshift@=\dimen120
\alignsep@=\dimen121
\tagshift@=\dimen122
\tagwidth@=\dimen123
\totwidth@=\dimen124
\lineht@=\dimen125
-\@envbody=\toks26
+\@envbody=\toks25
\multlinegap=\skip68
\multlinetaggap=\skip69
-\mathdisplay@stack=\toks27
+\mathdisplay@stack=\toks26
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
-(/usr/share/texmf-texlive/tex/latex/base/makeidx.sty
+(/usr/share/texmf/tex/latex/base/makeidx.sty
Package: makeidx 2000/03/29 v1.0m Standard LaTeX package
)
-(/usr/share/texmf-texlive/tex/latex/ltxmisc/framed.sty
-Package: framed 2007/10/04 v 0.95: framed or shaded text with page breaks
-\fb@frw=\dimen126
-\fb@frh=\dimen127
-\FrameRule=\dimen128
-\FrameSep=\dimen129
+(/usr/share/texmf/tex/latex/ltxmisc/framed.sty
+Package: framed 2003/07/21 v 0.8a: framed or shaded text with page breaks
+\FrameRule=\dimen126
+\FrameSep=\dimen127
)
-(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty
-Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
-)
-(/usr/share/texmf-texlive/tex/latex/graphics/color.sty
+(/usr/share/texmf/tex/latex/graphics/color.sty
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
-(/etc/texmf/tex/latex/config/color.cfg
+(/usr/share/texmf/tex/latex/config/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 130.
-(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2010/03/12 v0.04p Graphics/color for pdfTeX
+(/usr/share/texmf/tex/latex/pdftex-def/pdftex.def
+File: pdftex.def 2007/01/08 v0.04d Graphics/color for pdfTeX
\Gread@gobject=\count109
))
-(/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
-Package: fancyvrb 2008/02/07
+(/usr/share/texmf/tex/latex/fancyvrb/fancyvrb.sty
+Package: fancyvrb 1998/07/17
-Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix
-<2008/02/07> (tvz) (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty
+Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
+(/usr/share/texmf/tex/latex/graphics/keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV@toks@=\toks28
+\KV@toks@=\toks27
)
\FV@CodeLineNo=\count110
\FV@InFile=\read2
\FV@TabBox=\box35
\c@FancyVerbLine=\count111
\FV@StepNumber=\count112
\FV@OutFile=\write4
-)
-(/usr/share/texmf-texlive/tex/latex/ltxmisc/threeparttable.sty
+
+No file fancyvrb.cfg.
+) (/usr/share/texmf/tex/latex/ltxmisc/threeparttable.sty
Package: threeparttable 2003/06/13 v 3.0
\@tempboxb=\box36
)
-(/usr/share/texmf-texlive/tex/latex/mdwtools/footnote.sty
+(/usr/share/texmf/tex/latex/mdwtools/footnote.sty
Package: footnote 1997/01/28 1.13 Save footnotes around boxes
\fn@notes=\box37
-\fn@width=\dimen130
+\fn@width=\dimen128
)
-(/usr/share/texmf-texlive/tex/latex/wrapfig/wrapfig.sty
-\wrapoverhang=\dimen131
-\WF@size=\dimen132
+(/usr/share/texmf/tex/latex/wrapfig/wrapfig.sty
+\wrapoverhang=\dimen129
+\WF@size=\dimen130
\c@WF@wrappedlines=\count113
\WF@box=\box38
-\WF@everypar=\toks29
+\WF@everypar=\toks28
Package: wrapfig 2003/01/31 v 3.6
)
-(/usr/share/texmf-texlive/tex/latex/ltxmisc/parskip.sty
+(/usr/share/texmf/tex/latex/ltxmisc/parskip.sty
Package: parskip 2001/04/09 non-zero parskip adjustments
)
-(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
+(/usr/share/texmf/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
+(/usr/share/texmf/tex/latex/graphics/graphics.sty
+Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty
+(/usr/share/texmf/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
-(/etc/texmf/tex/latex/config/graphics.cfg
-File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
+(/usr/share/texmf/tex/latex/config/graphics.cfg
+File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
)
-Package graphics Info: Driver file: pdftex.def on input line 91.
+Package graphics Info: Driver file: pdftex.def on input line 90.
)
-\Gin@req@height=\dimen133
-\Gin@req@width=\dimen134
+\Gin@req@height=\dimen131
+\Gin@req@width=\dimen132
)
-(/usr/share/texmf-texlive/tex/plain/misc/pdfcolor.tex)
+(/usr/share/texmf/tex/plain/misc/pdfcolor.tex)
\distancetoright=\skip70
-\py@argswidth=\skip71
-\py@noticelength=\skip72
-\lineblockindentation=\skip73
+\leftsidespace=\skip71
+\py@argswidth=\skip72
+\py@noticelength=\skip73
+\lineblockindentation=\skip74
\image@box=\box39
-\image@width=\dimen135
+\image@width=\dimen133
-(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
-Package: hyperref 2009/10/09 v6.79a Hypertext links for LaTeX
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2009/04/10 v2.0 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in pdf mode detected.
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2009/01/23 v0.5 Provides ifxetex conditional
-)
-(/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty
-Package: hycolor 2009/10/02 v1.5 Code for color options of hyperref/bookmark (H
-O)
-
-(/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty
-Package: xcolor-patch 2009/10/02 xcolor patch
-))
-\@linkdim=\dimen136
+(/usr/share/texmf/tex/latex/hyperref/hyperref.sty
+Package: hyperref 2007/02/07 v6.75r Hypertext links for LaTeX
+\@linkdim=\dimen134
\Hy@linkcounter=\count114
\Hy@pagecounter=\count115
-(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def
-File: pd1enc.def 2009/10/09 v6.79a Hyperref: PDFDocEncoding definition (HO)
+(/usr/share/texmf/tex/latex/hyperref/pd1enc.def
+File: pd1enc.def 2007/02/07 v6.75r Hyperref: PDFDocEncoding definition (HO)
Now handling font encoding PD1 ...
... no UTF-8 mapping file for font encoding PD1
)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2007/12/12 v1.2 Prefix for e-TeX command names (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2007/09/09 v1.2 Providing info/warning/message (HO)
-)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds) That can mean that you are not using pdfTeX 1.50 or
-(etexcmds) that some package has redefined \expanded.
-(etexcmds) In the latter case, load this package earlier.
-)
-(/usr/share/texmf-texlive/tex/latex/latexconfig/hyperref.cfg
+(/usr/share/texmf/tex/latex/config/hyperref.cfg
File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
)
-(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2009/08/13 v3.4 Keyval support for LaTeX options (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2009/07/30 v1.5 Key value parser with default handler suppor
-t (HO)
-))
-Package hyperref Info: Option `colorlinks' set `true' on input line 2864.
-Package hyperref Info: Option `breaklinks' set `true' on input line 2864.
-Package hyperref Info: Hyper figures OFF on input line 2975.
-Package hyperref Info: Link nesting OFF on input line 2980.
-Package hyperref Info: Hyper index ON on input line 2983.
-Package hyperref Info: Plain pages OFF on input line 2990.
-Package hyperref Info: Backreferencing OFF on input line 2995.
-
-Implicit mode ON; LaTeX internals redefined
-Package hyperref Info: Bookmarks ON on input line 3191.
-(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty
-\Urlmuskip=\muskip11
-Package: url 2006/04/12 ver 3.3 Verb mode for urls, etc.
+(/usr/share/texmf/tex/latex/oberdiek/kvoptions.sty
+Package: kvoptions 2006/08/22 v2.4 Connects package keyval with LaTeX options (
+HO)
)
-LaTeX Info: Redefining \url on input line 3428.
+Package hyperref Info: Option `colorlinks' set `true' on input line 2238.
+Package hyperref Info: Option `breaklinks' set `true' on input line 2238.
+Package hyperref Info: Hyper figures OFF on input line 2288.
+Package hyperref Info: Link nesting OFF on input line 2293.
+Package hyperref Info: Hyper index ON on input line 2296.
+Package hyperref Info: Plain pages OFF on input line 2303.
+Package hyperref Info: Backreferencing OFF on input line 2308.
-(/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty
-Package: bitset 2007/09/28 v1.0 Data type bit set (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty
-Package: intcalc 2007/09/27 v1.1 Expandable integer calculations (HO)
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty
-Package: bigintcalc 2007/11/11 v1.1 Expandable big integer calculations (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions
- (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2009/04/17 v1.2 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO
-)
+Implicit mode ON; LaTeX internals redefined
+Package hyperref Info: Bookmarks ON on input line 2444.
+(/usr/share/texmf/tex/latex/html/url.sty
+Package: url 1999/03/02 ver 1.4 Verb mode for urls, email addresses, and file
+ names
)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf@primitive is available.
-Package pdftexcmds Info: \pdf@ifprimitive is available.
-)))
+LaTeX Info: Redefining \url on input line 2599.
\Fld@menulength=\count116
-\Field@Width=\dimen137
-\Fld@charsize=\dimen138
+\Field@Width=\dimen135
+\Fld@charsize=\dimen136
+\Choice@toks=\toks29
\Field@toks=\toks30
-Package hyperref Info: Hyper figures OFF on input line 4377.
-Package hyperref Info: Link nesting OFF on input line 4382.
-Package hyperref Info: Hyper index ON on input line 4385.
-Package hyperref Info: backreferencing OFF on input line 4392.
-Package hyperref Info: Link coloring ON on input line 4395.
-Package hyperref Info: Link coloring with OCG OFF on input line 4402.
-Package hyperref Info: PDF/A mode OFF on input line 4407.
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty
-Package: atbegshi 2008/07/31 v1.9 At begin shipout hook (HO)
-)
+Package hyperref Info: Hyper figures OFF on input line 3102.
+Package hyperref Info: Link nesting OFF on input line 3107.
+Package hyperref Info: Hyper index ON on input line 3110.
+Package hyperref Info: backreferencing OFF on input line 3117.
+Package hyperref Info: Link coloring ON on input line 3120.
\Hy@abspage=\count117
\c@Item=\count118
\c@Hfootnote=\count119
)
*hyperref using default driver hpdftex*
-(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def
-File: hpdftex.def 2009/10/09 v6.79a Hyperref driver for pdfTeX
+(/usr/share/texmf/tex/latex/hyperref/hpdftex.def
+File: hpdftex.def 2007/02/07 v6.75r Hyperref driver for pdfTeX
\Fld@listcount=\count120
)
-(/usr/share/texmf-texlive/tex/latex/oberdiek/hypcap.sty
-Package: hypcap 2008/09/08 v1.10 Adjusting anchors of captions (HO)
-)
-\DUlineblockindent=\skip74
-)
+(/usr/share/texmf/tex/latex/oberdiek/hypcap.sty
+Package: hypcap 2006/02/20 v1.5 Adjusting anchors of captions (HO)
+))
\@indexfile=\write5
\openout5 = `pNbody.idx'.
Writing index file pNbody.idx
(./pNbody.aux)
\openout1 = `pNbody.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 105.
LaTeX Font Info: Try loading font information for TS1+cmr on input line 105.
- (/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd
+ (/usr/share/texmf/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 105.
LaTeX Font Info: ... okay on input line 105.
LaTeX Font Info: Try loading font information for T1+ptm on input line 105.
-(/usr/share/texmf-texlive/tex/latex/psnfss/t1ptm.fd
+(/usr/share/texmf/tex/latex/psnfss/t1ptm.fd
File: t1ptm.fd 2001/06/04 font definitions for T1/ptm.
)
-(/usr/share/texmf/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count121
-\scratchdimen=\dimen139
-\scratchbox=\box40
-\nofMPsegments=\count122
-\nofMParguments=\count123
-\everyMPshowfont=\toks31
-\MPscratchCnt=\count124
-\MPscratchDim=\dimen140
-\MPnumerator=\count125
-\everyMPtoPDFconversion=\toks32
-)
Package hyperref Info: Link coloring ON on input line 105.
- (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
-Package: nameref 2007/05/29 v2.31 Cross-referencing by name of section
-(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty
-Package: refcount 2008/08/11 v3.1 Data extraction from references (HO)
+(/usr/share/texmf/tex/latex/hyperref/nameref.sty
+Package: nameref 2006/12/27 v2.28 Cross-referencing by name of section
+
+(/usr/share/texmf/tex/latex/oberdiek/refcount.sty
+Package: refcount 2006/02/20 v3.0 Data extraction from references (HO)
)
-\c@section@level=\count126
+\c@section@level=\count121
)
LaTeX Info: Redefining \ref on input line 105.
LaTeX Info: Redefining \pageref on input line 105.
(./pNbody.out)
(./pNbody.out)
\@outlinefile=\write6
\openout6 = `pNbody.out'.
-\AtBeginShipoutBox=\box41
Underfull \hbox (badness 10000) in paragraph at lines 108--108
[]
LaTeX Font Info: Try loading font information for T1+phv on input line 108.
-(/usr/share/texmf-texlive/tex/latex/psnfss/t1phv.fd
+(/usr/share/texmf/tex/latex/psnfss/t1phv.fd
File: t1phv.fd 2001/06/04 scalable font definitions for T1/phv.
)
LaTeX Font Info: Font shape `T1/phv/bx/n' in size <24.88> not available
(Font) Font shape `T1/phv/b/n' tried instead on input line 108.
LaTeX Font Info: Font shape `T1/phv/m/it' in size <17.28> not available
(Font) Font shape `T1/phv/m/sl' tried instead on input line 108.
LaTeX Font Info: Font shape `T1/phv/bx/it' in size <17.28> not available
(Font) Font shape `T1/phv/b/it' tried instead on input line 108.
LaTeX Font Info: Font shape `T1/phv/b/it' in size <17.28> not available
(Font) Font shape `T1/phv/b/sl' tried instead on input line 108.
LaTeX Font Info: Font shape `T1/phv/bx/n' in size <17.28> not available
(Font) Font shape `T1/phv/b/n' tried instead on input line 108.
[1
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2
+{/usr/share/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2
] (./pNbody.toc)
\tf@toc=\write7
\openout7 = `pNbody.toc'.
Adding blank page after the table of contents.
-LaTeX Font Info: Font shape `T1/phv/bx/n' in size <10> not available
-(Font) Font shape `T1/phv/b/n' tried instead on input line 108.
pdfTeX warning (ext4): destination with the same identifier (name{page.i}) has
been already used, duplicate ignored
\relax
l.108 \tableofcontents
- [1
+
+LaTeX Font Info: Font shape `T1/phv/bx/n' in size <10> not available
+(Font) Font shape `T1/phv/b/n' tried instead on input line 108.
+ [1
]pdfTeX warning (ext4): destination with the same identifier (name{page.ii}) ha
s been already used, duplicate ignored
\relax
l.108 \tableofcontents
[2] [1
] [2
]
Chapter 1.
LaTeX Font Info: Font shape `T1/phv/bx/n' in size <14.4> not available
(Font) Font shape `T1/phv/b/n' tried instead on input line 115.
LaTeX Font Info: Font shape `T1/ptm/bx/n' in size <10> not available
(Font) Font shape `T1/ptm/b/n' tried instead on input line 117.
-
+
File: cosmo.png Graphic file (type png)
File: cosmo.png Graphic file (type png)
[3 <./cosmo.png>] [4
]
Chapter 2.
LaTeX Font Info: Font shape `T1/phv/bx/n' in size <12> not available
(Font) Font shape `T1/phv/b/n' tried instead on input line 208.
[5]
LaTeX Font Info: Try loading font information for T1+pcr on input line 212.
- (/usr/share/texmf-texlive/tex/latex/psnfss/t1pcr.fd
+ (/usr/share/texmf/tex/latex/psnfss/t1pcr.fd
File: t1pcr.fd 2001/06/04 font definitions for T1/pcr.
)
-
+
File: edge-on-disk.png Graphic file (type png)
File: edge-on-disk.png Graphic file (type png)
[6]
Underfull \vbox (badness 2799) detected at line 299
[]
[7 <./edge-on-disk.png>] [8] [9] [10
]
Chapter 3.
LaTeX Font Info: Font shape `T1/pcr/bx/n' in size <9> not available
(Font) Font shape `T1/pcr/b/n' tried instead on input line 505.
[11] [12] [13] [14] [15]
LaTeX Font Info: Font shape `T1/pcr/m/it' in size <9> not available
(Font) Font shape `T1/pcr/m/sl' tried instead on input line 817.
[16] [17] [18]
Chapter 4.
[19
] [20
]
Chapter 5.
[21] [22
]
Chapter 6.
LaTeX Warning: Hyper reference `rst/IcModule::doc' on page 23 undefined on inpu
t line 1043.
! Missing \endgroup inserted.
\endgroup
l.1183 \end{tabulary}
? x
Here is how much of TeX's memory you used:
- 7992 strings out of 493848
- 108175 string characters out of 1152823
- 214340 words of memory out of 3000000
- 11022 multiletter control sequences out of 15000+50000
- 56100 words of font info for 64 fonts, out of 3000000 for 9000
- 715 hyphenation exceptions out of 8191
- 45i,21n,45p,608b,381s stack positions out of 5000i,500n,10000p,200000b,50000s
-{/usr/share/texmf-texlive/fonts/enc/dvips/base/8r.enc}
-Output written on pNbody.pdf (26 pages, 323162 bytes).
+ 6256 strings out of 256216
+ 80473 string characters out of 1917072
+ 157039 words of memory out of 1500000
+ 9346 multiletter control sequences out of 10000+200000
+ 56100 words of font info for 64 fonts, out of 1200000 for 2000
+ 646 hyphenation exceptions out of 8191
+ 34i,21n,45p,608b,446s stack positions out of 5000i,500n,6000p,200000b,15000s
+{/usr/share/texmf/fonts/enc/dvips/base/8r.enc}
+Output written on pNbody.pdf (26 pages, 307024 bytes).
PDF statistics:
- 259 PDF objects out of 1000 (max. 8388607)
- 59 named destinations out of 1000 (max. 500000)
- 123 words of extra memory for PDF output out of 10000 (max. 10000000)
+ 263 PDF objects out of 1000 (max. 8388607)
+ 59 named destinations out of 1000 (max. 131072)
+ 139 words of extra memory for PDF output out of 10000 (max. 10000000)
diff --git a/Doc/newdoc/_build/latex/pNbody.pdf b/Doc/newdoc/_build/latex/pNbody.pdf
index 37be3e4..5552777 100644
Binary files a/Doc/newdoc/_build/latex/pNbody.pdf and b/Doc/newdoc/_build/latex/pNbody.pdf differ
diff --git a/Doc/newdoc/_build/latex/pNbody.tex b/Doc/newdoc/_build/latex/pNbody.tex
index 7ec9d02..37d1ede 100644
--- a/Doc/newdoc/_build/latex/pNbody.tex
+++ b/Doc/newdoc/_build/latex/pNbody.tex
@@ -1,9398 +1,8803 @@
% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{times}
\usepackage[Bjarne]{fncychap}
\usepackage{longtable}
\usepackage{sphinx}
\title{pNbody Documentation}
-\date{August 30, 2011}
+\date{September 01, 2011}
\release{4}
\author{Yves Revaz}
\newcommand{\sphinxlogo}{}
\renewcommand{\releasename}{Release}
\makeindex
\makeatletter
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
\let\PYG@ul=\relax \let\PYG@tc=\relax%
\let\PYG@bc=\relax \let\PYG@ff=\relax}
\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
\def\PYG@toks#1+{\ifx\relax#1\empty\else%
\PYG@tok{#1}\expandafter\PYG@toks\fi}
\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
\PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}
\def\PYG@tok@gd{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
\def\PYG@tok@gu{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
\def\PYG@tok@gt{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.25,0.82}{##1}}}
\def\PYG@tok@gs{\let\PYG@bf=\textbf}
\def\PYG@tok@gr{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
\def\PYG@tok@cm{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
\def\PYG@tok@vg{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\def\PYG@tok@m{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\def\PYG@tok@mh{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\def\PYG@tok@cs{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}\def\PYG@bc##1{\colorbox[rgb]{1.00,0.94,0.94}{##1}}}
\def\PYG@tok@ge{\let\PYG@it=\textit}
\def\PYG@tok@vc{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\def\PYG@tok@il{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\def\PYG@tok@go{\def\PYG@tc##1{\textcolor[rgb]{0.19,0.19,0.19}{##1}}}
\def\PYG@tok@cp{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@gi{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
\def\PYG@tok@gh{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\def\PYG@tok@ni{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.84,0.33,0.22}{##1}}}
\def\PYG@tok@nl{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.13,0.44}{##1}}}
\def\PYG@tok@nn{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
\def\PYG@tok@no{\def\PYG@tc##1{\textcolor[rgb]{0.38,0.68,0.84}{##1}}}
\def\PYG@tok@na{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@nb{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@nc{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
\def\PYG@tok@nd{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.33,0.33,0.33}{##1}}}
\def\PYG@tok@ne{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@nf{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}
\def\PYG@tok@si{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.44,0.63,0.82}{##1}}}
\def\PYG@tok@s2{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@vi{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\def\PYG@tok@nt{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.45}{##1}}}
\def\PYG@tok@nv{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\def\PYG@tok@s1{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@gp{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
\def\PYG@tok@sh{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@ow{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@sx{\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
\def\PYG@tok@bp{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@c1{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
\def\PYG@tok@kc{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@c{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
\def\PYG@tok@mf{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\def\PYG@tok@err{\def\PYG@bc##1{\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{##1}}}
\def\PYG@tok@kd{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@ss{\def\PYG@tc##1{\textcolor[rgb]{0.32,0.47,0.09}{##1}}}
\def\PYG@tok@sr{\def\PYG@tc##1{\textcolor[rgb]{0.14,0.33,0.53}{##1}}}
\def\PYG@tok@mo{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\def\PYG@tok@mi{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\def\PYG@tok@kn{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@o{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\def\PYG@tok@kr{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@s{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@kp{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@w{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
\def\PYG@tok@kt{\def\PYG@tc##1{\textcolor[rgb]{0.56,0.13,0.00}{##1}}}
\def\PYG@tok@sc{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@sb{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@k{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\def\PYG@tok@se{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYG@tok@sd{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\def\PYGZbs{\char`\\}
\def\PYGZus{\char`\_}
\def\PYGZob{\char`\{}
\def\PYGZcb{\char`\}}
\def\PYGZca{\char`\^}
% for compatibility with earlier versions
\def\PYGZat{@}
\def\PYGZlb{[}
\def\PYGZrb{]}
\makeatother
\begin{document}
\maketitle
\tableofcontents
\phantomsection\label{index::doc}
Contents:
\chapter{Overview}
\label{rst/Overview:welcome-to-pnbody-s-documentation}\label{rst/Overview::doc}\label{rst/Overview:overview}
\textbf{pNbody} is a parallelized python module toolbox designed to manipulate and display
interactively very lage N-body systems.
Its oriented object approche allows the user to perform complicate manipulation
with only very few commands.
As python is an interpreted language, the user can load an N-body system and explore it
interactively using the python interpreter. pNbody may also be used in python scripts.
The module also contains graphical facilities desinged to create maps of physical values of
the system, like density maps, temperture maps, velocites maps, etc. Stereo capabilities are
also implemented.
pNbody is not limited by file format. Each user may redefine in a parameter file how to read
its prefered format.
Its new parallel (mpi) facilities make it works on computer cluster without being limitted by
memory consumption. It has already been tested with several millions of particles.
\includegraphics{cosmo.png}
\chapter{Installation}
\label{rst/Installation:installation}\label{rst/Installation::doc}
pNbody is curently only supported by linux.
\section{Prerequiste}
\label{rst/Prerequiste:prerequiste}\label{rst/Prerequiste::doc}
The basic module of pNbody needs python and additional packages :
\begin{enumerate}
\item {}
Python 2.5.x, 2.6.x, 2.7.x
\href{http://www.python.org}{http://www.python.org}
\item {}
a C compiler
gcc is fine \href{http://gcc.gnu.org/}{http://gcc.gnu.org/}
\item {}
numpy-1.0.4 or higher
\href{http://numpy.scipy.org/}{http://numpy.scipy.org/}
\item {}
Imaging 1.1.5 or higher
\href{http://www.pythonware.com/products/pil/}{http://www.pythonware.com/products/pil/}
\end{enumerate}
For additional but usefull special functions :
\begin{enumerate}
\setcounter{enumi}{4}
\item {}
scipy 0.7 or higher
\href{http://www.scipy.org/}{http://www.scipy.org/}
\end{enumerate}
For the parallel capabilities, an mpi distribution is needed (ex. openmpi)
as well as the additional python mpi wrapping:
\begin{enumerate}
\setcounter{enumi}{5}
\item {}
mpi4py
\href{http://cheeseshop.python.org/pypi/mpi4py}{http://cheeseshop.python.org/pypi/mpi4py}
\end{enumerate}
In order to convert movies in standard format (gif or mpeg), the two following applications are needed :
\begin{enumerate}
\item {}
convert (imagemagick)
\href{http://www.imagemagick.org/script/index.php}{http://www.imagemagick.org/script/index.php}
\item {}
mencoder (mplayer)
\href{http://www.mplayerhq.hu/design7/news.html}{http://www.mplayerhq.hu/design7/news.html}
\end{enumerate}
\section{Installing from source}
\label{rst/Installing_from_tarball:installing-from-source}\label{rst/Installing_from_tarball::doc}
\subsection{Decompress the tarball}
\label{rst/Installing_from_tarball:decompress-the-tarball}
Decompress the tarball file:
\begin{Verbatim}[commandchars=@\[\]]
tar -xzf pNbody-4.x.tar.gz
\end{Verbatim}
enter the directory:
\begin{Verbatim}[commandchars=@\[\]]
cd pNbody-4.x
\end{Verbatim}
\subsection{Compile}
\label{rst/Installing_from_tarball:compile}
The compilation is performed using the standard command:
\begin{Verbatim}[commandchars=@\[\]]
python setup.py build
\end{Verbatim}
If one wants to install in another directory than the default
python one, it is possible to use the standard \code{-{-}prefix} option:
\begin{Verbatim}[commandchars=@\[\]]
python setup.py build --prefix other@_directory
\end{Verbatim}
\subsection{Install}
\label{rst/Installing_from_tarball:install}
Now, depending on your python installation you need to be root.
The module is installed with the following command:
\begin{Verbatim}[commandchars=@\[\]]
python setup.py install
\end{Verbatim}
\section{Check the installation}
\label{rst/Test_the_installation:check-the-installation}\label{rst/Test_the_installation::doc}
You can check the installation by simply running the following
command:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}checkall}
\end{Verbatim}
This command must of course be in your path. This will be the case
if you did not specified any \code{-{-}prefix}. On the contrary if \code{-{-}prefix}
is set to for example, \emph{localdir} you should have your \emph{PATH} environment
variable should contains:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{localdir}\PYG{o}{/}\PYG{n+nb}{bin}
\end{Verbatim}
and you \emph{PYTHONPATH} environment should contains:
\begin{Verbatim}[commandchars=@\[\]]
localdir/lib/python2.x/site-packages/
\end{Verbatim}
to ensure that the \textbf{pNbody} package will be found.
If everything goes well, you should see a lots of outputs on your screen,
as well as a window displaying an edge-on disk.
\includegraphics{edge-on-disk.png}
Close it when you see it.
The script should finally ends up with something like
\begin{Verbatim}[commandchars=@\[\]]
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#
Good News ! pNbody with format gadget is working !
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#
You are currently using the following paths
HOME : /home/leo
PNBODYPATH : /home/leo/local/lib/python2.6/site-packages/pNbody
CONFIGDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config
PARAMETERFILE : /home/leo/local/lib/python2.6/site-packages/pNbody/config/defaultparameters
UNITSPARAMETERFILE : /home/leo/local/lib/python2.6/site-packages/pNbody/config/unitsparameters
PALETTEDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/rgb@_tables
PLUGINSDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/plugins
OPTDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/opt
FORMATSDIR : /home/leo/local/lib/python2.6/site-packages/pNbody/config/formats
\end{Verbatim}
\section{Default configuration}
\label{rst/Default_configurations:default-configuration}\label{rst/Default_configurations::doc}
\textbf{pNbody} uses a set of parameters files, color tables and formats files.
These files are provided by the installation and are by default stored in
the directory \code{site-packages/pNbody/config}.
To display where these files are taken from, you can use the command:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}show}\PYG{o}{-}\PYG{n}{path}
\end{Verbatim}
It is recommanded that the user uses its own configuration files. To be automatically
recongnized by \textbf{pNbody}, the latter must be in the user \code{\textasciitilde{}/.pNbody} directory.
\textbf{pNbody} provides a simple command to copy all parameters in this directory. Simply
type:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}copy}\PYG{o}{-}\PYG{n}{defaultconfig}
\end{Verbatim}
and check the values of the new paths:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}show}\PYG{o}{-}\PYG{n}{path}
\end{Verbatim}
You can now freely modify the files contains in the configuratio directory.
By default, the content of the configuration directory is:
\begin{tabulary}{\linewidth}{|L|L|L|}
\hline
\textbf{
name
} & \textbf{
type
} & \textbf{
Content
}\\
\hline
defaultparameters
&
file
&
the default graphical parameters used by \textbf{pNbody}
\\
unitsparameters
&
file
&
the default units parameters used by \textbf{pNbody}
\\
formats
&
directory
&
specific class definition files used to read different file formats
\\
rgb\_tables
&
directory
&
color tables
\\
plugins
&
directory
&
optional plugins
\\
opt
&
directory
&
optional files
\\
\hline
\end{tabulary}
\section{Default parameters}
\label{rst/Default_parameters::doc}\label{rst/Default_parameters:default-parameters}
To see what default parameters \textbf{pNbody} uses, type:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}show}\PYG{o}{-}\PYG{n}{parameters}
\end{Verbatim}
The script returns the parameters taken from the files
\emph{defaultparameters} and \emph{unitsparameters}.
Their current values are displayed:
\begin{Verbatim}[commandchars=@\[\]]
parameters in /home/leo/local/lib/python2.6/site-packages/pNbody/config/defaultparameters
----------------------------------------------------------------------------------------------------
name meaning value (type)
----------------------------------------------------------------------------------------------------
obs : observer = None (ArrayObs)
xp : observing position = None (List)
x0 : position of observer = None (List)
alpha : angle of the head = None (Float)
view : view = xz (String)
r@_obs : dist. to the observer = 201732.223771 (Float)
clip : clip planes = (100866.11188556443, 403464.44754225772) (Tuple)
cut : cut clip planes = no (String)
eye : name of the eye = None (String)
dist@_eye : distance between eyes = -0.0005 (Float)
foc : focal = 300.0 (Float)
persp : perspective = off (String)
shape : shape of the image = (512, 512) (Tuple)
size : pysical size = (6000, 6000) (Tuple)
frsp : frsp = 0.0 (Float)
space : space = pos (String)
mode : mode = m (String)
rendering : rendering mode = map (String)
filter@_name : name of the filter = None (String)
filter@_opts : filter options = @PYGZlb[]10, 10, 2, 2@PYGZrb[] (List)
scale : scale = log (String)
cd : cd = 0.0 (Float)
mn : mn = 0.0 (Float)
mx : mx = 0.0 (Float)
l@_n : number of levels = 15 (Int)
l@_min : min level = 0.0 (Float)
l@_max : max level = 0.0 (Float)
l@_kx : l@_kx = 10 (Int)
l@_ky : l@_ky = 10 (Int)
l@_color : level color = 0 (Int)
l@_crush : crush background = no (String)
b@_weight : box line weight = 0 (Int)
b@_xopts : x axis options = None (Tuple)
b@_yopts : y axis options = None (Tuple)
b@_color : line color = 255 (Int)
parameters in /home/leo/local/lib/python2.6/site-packages/pNbody/config/unitsparameters
----------------------------------------------------------------------------------------------------
name meaning value (type)
----------------------------------------------------------------------------------------------------
xi : hydrogen mass fraction = 0.76 (Float)
ionisation : ionisation flag = 1 (Int)
metalicity : metalicity index = 4 (Int)
Nsph : number of sph neighbors = 50 (Int)
gamma : adiabatic index = 1.66666666667 (Float)
coolingfile : Cooling file = @textasciitilde[]/.Nbody/cooling.dat (String)
HubbleParam : HubbleParam = 1.0 (Float)
UnitLength@_in@_cm : UnitLength in cm = 3.085e+21 (Float)
UnitMass@_in@_g : UnitMass in g = 4.435693e+44 (Float)
UnitVelocity@_in@_cm@_per@_s : UnitVelocity in cm per s = 97824708.2699 (Float)
\end{Verbatim}
\section{Examples}
\label{rst/Examples::doc}\label{rst/Examples:examples}
A series of examples is provided by \textbf{pNbody} in the
\code{PNBODYPATH/examples}, where NBODYPATH is obtained
with the command:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}show}\PYG{o}{-}\PYG{n}{path}
\end{Verbatim}
\chapter{Tutorial}
\label{rst/Tutorial::doc}\label{rst/Tutorial:tutorial}
\section{Using \textbf{pNbody} with the python interpreter}
\label{rst/Tutorial_interpreter:using-pnbody-with-the-python-interpreter}\label{rst/Tutorial_interpreter::doc}
In order to use this tutorial, you first need to copy some examples provided
with \textbf{pNbody}. This can be done by typing:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{pNbody\PYGZus{}copy}\PYG{o}{-}\PYG{n}{examples}
\end{Verbatim}
by default, this create a directory in your home \code{\textasciitilde{}/pnbody\_examples}.
Move to this directory:
\begin{Verbatim}[commandchars=@\[\]]
cd @textasciitilde[]/pnbody@_examples
\end{Verbatim}
Then you can simply follow the instructions below.
First, start the python interpreter:
\begin{Verbatim}[commandchars=@\[\]]
leo@PYGZat[]obsrevaz:@textasciitilde[]/pnbody@_examples python
Python 2.4.2 (@#2, Jul 13 2006, 15:26:48)
@PYGZlb[]GCC 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)@PYGZrb[] on linux2
Type "help", "copyright", "credits" or "license" for more information.
@textgreater[]@textgreater[]@textgreater[]
\end{Verbatim}
Now, you can load the \textbf{pNbody} module:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{k+kn}{from} \PYG{n+nn}{pNbody} \PYG{k+kn}{import} \PYG{o}{*}
\end{Verbatim}
\subsection{Creating \textbf{pNbody} objects from scratch}
\label{rst/Tutorial_interpreter:creating-pnbody-objects-from-scratch}
We can first start by creating a default \textbf{pNbody} objet and get info about it
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb} \PYG{o}{=} \PYG{n}{Nbody}\PYG{p}{(}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{info}\PYG{p}{(}\PYG{p}{)}
\PYG{g+go}{-----------------------------------}
\PYG{g+go}{particle file : ['file.dat']}
\PYG{g+go}{ftype : 'Nbody\PYGZus{}default'}
\PYG{g+go}{mxntpe : 6}
\PYG{g+go}{nbody : 0}
\PYG{g+go}{nbody\PYGZus{}tot : 0}
\PYG{g+go}{npart : [0, 0, 0, 0, 0, 0]}
\PYG{g+go}{npart\PYGZus{}tot : [0, 0, 0, 0, 0, 0]}
\PYG{g+go}{mass\PYGZus{}tot : 0.0}
\PYG{g+go}{byteorder : 'little'}
\PYG{g+go}{pio : 'no'}
\PYG{g+go}{\textgreater{}\textgreater{}\textgreater{}}
\end{Verbatim}
All variables linked to the object nb are accesible by typing nb. followed by the associated variables :
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{nbody}
\PYG{g+go}{0}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{mass\PYGZus{}tot}
\PYG{g+go}{0.0}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{pio}
\PYG{g+go}{'no'}
\end{Verbatim}
Now, you can create an object by giving the positions of particles:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{pos} \PYG{o}{=} \PYG{n}{ones}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,}\PYG{n}{float32}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb} \PYG{o}{=} \PYG{n}{Nbody}\PYG{p}{(}\PYG{n}{pos}\PYG{o}{=}\PYG{n}{pos}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{info}\PYG{p}{(}\PYG{p}{)}
\PYG{g+go}{-----------------------------------}
\PYG{g+go}{particle file : ['file.dat']}
\PYG{g+go}{ftype : 'Nbody\PYGZus{}default'}
\PYG{g+go}{mxntpe : 6}
\PYG{g+go}{nbody : 10}
\PYG{g+go}{nbody\PYGZus{}tot : 10}
\PYG{g+go}{npart : array([10, 0, 0, 0, 0, 0])}
\PYG{g+go}{npart\PYGZus{}tot : array([10, 0, 0, 0, 0, 0])}
\PYG{g+go}{mass\PYGZus{}tot : 1.00000011921}
\PYG{g+go}{byteorder : 'little'}
\PYG{g+go}{pio : 'no'}
\PYG{g+go}{len pos : 10}
\PYG{g+go}{pos[0] : array([ 1., 1., 1.], dtype=float32)}
\PYG{g+go}{pos[-1] : array([ 1., 1., 1.], dtype=float32)}
\PYG{g+go}{len vel : 10}
\PYG{g+go}{vel[0] : array([ 0., 0., 0.], dtype=float32)}
\PYG{g+go}{vel[-1] : array([ 0., 0., 0.], dtype=float32)}
\PYG{g+go}{len mass : 10}
\PYG{g+go}{mass[0] : 0.10000000149}
\PYG{g+go}{mass[-1] : 0.10000000149}
\PYG{g+go}{len num : 10}
\PYG{g+go}{num[0] : 0}
\PYG{g+go}{num[-1] : 9}
\PYG{g+go}{len tpe : 10}
\PYG{g+go}{tpe[0] : 0}
\PYG{g+go}{tpe[-1] : 0}
\end{Verbatim}
In this case, you can see that the class automatically intitialize other arrays variables
(vel, mass, num and rsp) with default values. Only the first and the last element of
each defined vector are displyed by the methode info. All defined arrays and array elements
may be easily accessible using the numarray convensions. For exemple, to display and
change the positions of the tree first particles, type:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{pos}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{]}
\PYG{g+go}{array([[ 1., 1., 1.],}
\PYG{g+go}{ [ 1., 1., 1.],}
\PYG{g+go}{ [ 1., 1., 1.]], type=float32)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{pos}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{ones}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,}\PYG{n}{float32}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{pos}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{]}
\PYG{g+go}{array([[ 2., 2., 2.],}
\PYG{g+go}{ [ 2., 2., 2.],}
\PYG{g+go}{ [ 2., 2., 2.]], type=float32)}
\end{Verbatim}
\subsection{Open from existing file}
\label{rst/Tutorial_interpreter:open-from-existing-file}
Now, lets try to open the gadget snapshot gadget\_z00.dat. This is achieved by typing:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb} \PYG{o}{=} \PYG{n}{Nbody}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{gadget\PYGZus{}z00.dat}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{ftype}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{gadget}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
Again, informatins on this snapshot may be obtained using the instance info():
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{info}\PYG{p}{(}\PYG{p}{)}
\PYG{g+go}{-----------------------------------}
\PYG{g+go}{particle file : ['gadget\PYGZus{}z00.dat']}
\PYG{g+go}{ftype : 'Nbody\PYGZus{}gadget'}
\PYG{g+go}{mxntpe : 6}
\PYG{g+go}{nbody : 20560}
\PYG{g+go}{nbody\PYGZus{}tot : 20560}
\PYG{g+go}{npart : array([ 9160, 10280, 0, 0, 1120, 0])}
\PYG{g+go}{npart\PYGZus{}tot : array([ 9160, 10280, 0, 0, 1120, 0])}
\PYG{g+go}{mass\PYGZus{}tot : 79.7066955566}
\PYG{g+go}{byteorder : 'little'}
\PYG{g+go}{pio : 'no'}
\PYG{g+go}{len pos : 20560}
\PYG{g+go}{pos[0] : array([-1294.48828125, -2217.09765625, -9655.49609375], dtype=float32)}
\PYG{g+go}{pos[-1] : array([ -986.0625 , -2183.83203125, 4017.04296875], dtype=float32)}
\PYG{g+go}{len vel : 20560}
\PYG{g+go}{vel[0] : array([ -69.80491638, 60.56475067, -166.32981873], dtype=float32)}
\PYG{g+go}{vel[-1] : array([-140.59715271, -66.44669342, -37.01613235], dtype=float32)}
\PYG{g+go}{len mass : 20560}
\PYG{g+go}{mass[0] : 0.00108565215487}
\PYG{g+go}{mass[-1] : 0.00108565215487}
\PYG{g+go}{len num : 20560}
\PYG{g+go}{num[0] : 21488}
\PYG{g+go}{num[-1] : 1005192}
\PYG{g+go}{len tpe : 20560}
\PYG{g+go}{tpe[0] : 0}
\PYG{g+go}{tpe[-1] : 4}
\PYG{g+go}{atime : 1.0}
\PYG{g+go}{redshift : 2.22044604925e-16}
\PYG{g+go}{flag\PYGZus{}sfr : 1}
\PYG{g+go}{flag\PYGZus{}feedback : 1}
\PYG{g+go}{nall : [ 9160 10280 0 0 1120 0]}
\PYG{g+go}{flag\PYGZus{}cooling : 1}
\PYG{g+go}{num\PYGZus{}files : 1}
\PYG{g+go}{boxsize : 100000.0}
\PYG{g+go}{omega0 : 0.3}
\PYG{g+go}{omegalambda : 0.7}
\PYG{g+go}{hubbleparam : 0.7}
\PYG{g+go}{flag\PYGZus{}age : 0}
\PYG{g+go}{flag\PYGZus{}metals : 0}
\PYG{g+go}{nallhw : [0 0 0 0 0 0]}
\PYG{g+go}{flag\PYGZus{}entr\PYGZus{}ic : 0}
\PYG{g+go}{critical\PYGZus{}energy\PYGZus{}spec: 0.0}
\PYG{g+go}{len u : 20560}
\PYG{g+go}{u[0] : 6606.63037109}
\PYG{g+go}{u[-1] : 0.0}
\PYG{g+go}{len rho : 20560}
\PYG{g+go}{rho[0] : 7.05811936674e-11}
\PYG{g+go}{rho[-1] : 0.0}
\PYG{g+go}{len rsp : 20560}
\PYG{g+go}{rsp[0] : 909.027587891}
\PYG{g+go}{rsp[-1] : 0.0}
\PYG{g+go}{len opt : 20560}
\PYG{g+go}{opt[0] : 446292.5625}
\PYG{g+go}{opt[-1] : 0.0}
\end{Verbatim}
You can obtain informations on physical values, like the center of mass
or the total angular momentum vector by typing:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{cm}\PYG{p}{(}\PYG{p}{)}
\PYG{g+go}{array([-1649.92651346, 609.98256428, -1689.04011033])}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{Ltot}\PYG{p}{(}\PYG{p}{)}
\PYG{g+go}{array([-1112078.125 , -755964.1875, -1536667.125 ], dtype=float32)}
\end{Verbatim}
In order to visualise the model in position space, it is possible to
generate a surface density map of it using the display instance:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{10000}\PYG{p}{,}\PYG{l+m+mi}{10000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
You can now performe some operations on the model in order to explore a specific
region. First, translate the model in position space:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{translate}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3125}\PYG{p}{,}\PYG{o}{-}\PYG{l+m+mi}{4690}\PYG{p}{,}\PYG{l+m+mi}{1720}\PYG{p}{]}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{10000}\PYG{p}{,}\PYG{l+m+mi}{10000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{,}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
Ou can now rotate around:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{rotate}\PYG{p}{(}\PYG{n}{angle}\PYG{o}{=}\PYG{n}{pi}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{,}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
You can now display a temperature map of the model. First,
create a new object with only the gas particles:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}gas} \PYG{o}{=} \PYG{n}{nb}\PYG{o}{.}\PYG{n}{select}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{gas}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}gas}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{,}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
now, display the temperture mass-weighted map:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}gas}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{,}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{rainbow4}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{mode}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{T}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{filter\PYGZus{}name}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{gaussian}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
\subsection{Selection of particles}
\label{rst/Tutorial_interpreter:selection-of-particles}
You can select only particles within a radius smaller tha 500 (in user units)
with respect to the center:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub} \PYG{o}{=} \PYG{n}{nb}\PYG{o}{.}\PYG{n}{selectc}\PYG{p}{(}\PYG{p}{(}\PYG{n}{nb}\PYG{o}{.}\PYG{n}{rxyz}\PYG{p}{(}\PYG{p}{)}\PYG{o}{\textless{}}\PYG{l+m+mi}{500}\PYG{p}{)}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{,}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
Now, rename the new model and save it:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub}\PYG{o}{.}\PYG{n}{rename}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{gadget\PYGZus{}z00\PYGZus{}sub.dat}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub}\PYG{o}{.}\PYG{n}{write}\PYG{p}{(}\PYG{p}{)}
\end{Verbatim}
A new gadget file has been created and saved in the current directory.
We can now select particles as a function of the temperature.
First, display the maximum temperature among all gas particles,
then selectc particles and finally save in `T11.num' the identifier (variable num) of these particles:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{log10}\PYG{p}{(}\PYG{n+nb}{max}\PYG{p}{(}\PYG{n}{nb\PYGZus{}gas}\PYG{o}{.}\PYG{n}{T}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)}
\PYG{g+go}{12.8707923889}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub} \PYG{o}{=} \PYG{n}{nb\PYGZus{}gas}\PYG{o}{.}\PYG{n}{selectc}\PYG{p}{(} \PYG{p}{(}\PYG{n}{nb\PYGZus{}gas}\PYG{o}{.}\PYG{n}{T}\PYG{p}{(}\PYG{p}{)}\PYG{o}{\textgreater{}}\PYG{l+m+mf}{1e11}\PYG{p}{)} \PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub}\PYG{o}{.}\PYG{n}{write\PYGZus{}num}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{T11.num}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
Now open a new snapshot, from the same simulation, but at different redshift and find the
particles in previous snapshot with temperature higher than \$10\textasciicircum{}\{11\}\$:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb} \PYG{o}{=} \PYG{n}{Nbody}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{gadget\PYGZus{}z40.dat}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{ftype}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{gadget}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{10000}\PYG{p}{,}\PYG{l+m+mi}{10000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub} \PYG{o}{=} \PYG{n}{nb}\PYG{o}{.}\PYG{n}{selectp}\PYG{p}{(}\PYG{n+nb}{file}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{T11.num}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb\PYGZus{}sub}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{10000}\PYG{p}{,}\PYG{l+m+mi}{10000}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{light}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
Now, instead of saving it in a gadget file, save it in a binary file type.
You simply need to call the set\_ftype instance before saving it:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb} \PYG{o}{=} \PYG{n}{nb}\PYG{o}{.}\PYG{n}{set\PYGZus{}ftype}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{binary}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{rename}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{binary.dat}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb}\PYG{o}{.}\PYG{n}{write}\PYG{p}{(}\PYG{p}{)}
\end{Verbatim}
\subsection{Merging two models}
\label{rst/Tutorial_interpreter:merging-two-models}
As a last example, we show how two \textbf{pNbody} models can be easyly merged with only 11 lines:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb1} \PYG{o}{=} \PYG{n}{Nbody}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{disk.dat}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{ftype}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{gadget}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb2} \PYG{o}{=} \PYG{n}{Nbody}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{disk.dat}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{ftype}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{gadget}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb1}\PYG{o}{.}\PYG{n}{rotate}\PYG{p}{(}\PYG{n}{angle}\PYG{o}{=}\PYG{n}{pi}\PYG{o}{/}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{n}{axis}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb1}\PYG{o}{.}\PYG{n}{translate}\PYG{p}{(}\PYG{p}{[}\PYG{o}{-}\PYG{l+m+mi}{150}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb1}\PYG{o}{.}\PYG{n}{vel} \PYG{o}{=} \PYG{n}{nb1}\PYG{o}{.}\PYG{n}{vel} \PYG{o}{+} \PYG{p}{[}\PYG{l+m+mi}{50}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb2}\PYG{o}{.}\PYG{n}{rotate}\PYG{p}{(}\PYG{n}{angle}\PYG{o}{=}\PYG{n}{pi}\PYG{o}{/}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{n}{axis}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb2}\PYG{o}{.}\PYG{n}{translate}\PYG{p}{(}\PYG{p}{[}\PYG{o}{+}\PYG{l+m+mi}{150}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{50}\PYG{p}{]}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb2}\PYG{o}{.}\PYG{n}{vel} \PYG{o}{=} \PYG{n}{nb2}\PYG{o}{.}\PYG{n}{vel} \PYG{o}{-} \PYG{p}{[}\PYG{l+m+mi}{50}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3} \PYG{o}{=} \PYG{n}{nb1} \PYG{o}{+} \PYG{n}{nb2}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{rename}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{merge.dat}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{write}\PYG{p}{(}\PYG{p}{)}
\end{Verbatim}
Now display the result from different point of view:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{300}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{lut2}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3} \PYG{o}{=} \PYG{n}{nb3}\PYG{o}{.}\PYG{n}{select}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{disk}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{300}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{lut2}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{view}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{xz}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{300}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{lut2}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{view}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{xy}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{300}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{lut2}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{view}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{yz}\PYG{l+s}{'}\PYG{p}{)}
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{300}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{lut2}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{xp}\PYG{o}{=}\PYG{p}{[}\PYG{o}{-}\PYG{l+m+mi}{100}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)}
\end{Verbatim}
or save it into a gif file:
\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\textgreater{}\textgreater{}\textgreater{} }\PYG{n}{nb3}\PYG{o}{.}\PYG{n}{display}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{300}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)}\PYG{p}{,}\PYG{n}{shape}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{,}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{,}\PYG{n}{palette}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{lut2}\PYG{l+s}{'}\PYG{p}{,}\PYG{n}{xp}\PYG{o}{=}\PYG{p}{[}\PYG{o}{-}\PYG{l+m+mi}{100}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,}\PYG{n}{save}\PYG{o}{=}\PYG{l+s}{'}\PYG{l+s}{image.gif}\PYG{l+s}{'}\PYG{p}{)}
\end{Verbatim}
\section{Using pNbody with scripts}
\label{rst/Tutorial_scripts:using-pnbody-with-scripts}\label{rst/Tutorial_scripts::doc}
In addition to using \textbf{pNbody} in the python interpreter,
it is very useful to use \textbf{pNbody} in python scripts. Usually a python script
begin by the line \#!/usr/bin/env python and must be executable:
\begin{Verbatim}[commandchars=@\[\]]
chmod a+x file.py
\end{Verbatim}
The following example (slice.py), we show how to write a script that opens a gadget file,
select gas particles and cut a thin slice
\begin{gather}
\begin{split}-1000\m@ne
\DOCH
\fi
\interlinepenalty\@M
\DOTI{#1}
}
}
}
% Redefine description environment so that it is usable inside fulllineitems.
%
\renewcommand{\description}{%
\list{}{\labelwidth\z@%
\itemindent-\leftmargin%
\labelsep5pt%
\let\makelabel=\descriptionlabel}}
% Definition lists; requested by AMK for HOWTO documents. Probably useful
% elsewhere as well, so keep in in the general style support.
%
\newenvironment{definitions}{%
\begin{description}%
\def\term##1{\item[##1]\mbox{}\\*[0mm]}
}{%
\end{description}%
}
% Tell TeX about pathological hyphenation cases:
\hyphenation{Base-HTTP-Re-quest-Hand-ler}
% The following is stuff copied from docutils' latex writer.
%
\newcommand{\optionlistlabel}[1]{\bf #1 \hfill}
\newenvironment{optionlist}[1]
{\begin{list}{}
{\setlength{\labelwidth}{#1}
\setlength{\rightmargin}{1cm}
\setlength{\leftmargin}{\rightmargin}
\addtolength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\renewcommand{\makelabel}{\optionlistlabel}}
}{\end{list}}
\newlength{\lineblockindentation}
\setlength{\lineblockindentation}{2.5em}
\newenvironment{lineblock}[1]
{\begin{list}{}
{\setlength{\partopsep}{\parskip}
\addtolength{\partopsep}{\baselineskip}
\topsep0pt\itemsep0.15\baselineskip\parsep0pt
\leftmargin#1}
\raggedright}
{\end{list}}
% Redefine includgraphics for avoiding images larger than the screen size
% If the size is not specified.
\let\py@Oldincludegraphics\includegraphics
\newbox\image@box%
\newdimen\image@width%
\renewcommand\includegraphics[2][\@empty]{%
\ifx#1\@empty%
\setbox\image@box=\hbox{\py@Oldincludegraphics{#2}}%
\image@width\wd\image@box%
\ifdim \image@width>\linewidth%
\setbox\image@box=\hbox{\py@Oldincludegraphics[width=\linewidth]{#2}}%
\box\image@box%
\else%
\py@Oldincludegraphics{#2}%
\fi%
\else%
\py@Oldincludegraphics[#1]{#2}%
\fi%
}
% Fix the index and bibliography environments to add an entry to the Table of
% Contents; this is much nicer than just having to jump to the end of the book
% and flip around, especially with multiple indexes.
%
\let\py@OldTheindex=\theindex
\renewcommand{\theindex}{
\cleardoublepage
\phantomsection
\py@OldTheindex
\addcontentsline{toc}{chapter}{\indexname}
}
\let\py@OldThebibliography=\thebibliography
\renewcommand{\thebibliography}[1]{
\cleardoublepage
\phantomsection
\py@OldThebibliography{1}
\addcontentsline{toc}{chapter}{\bibname}
}
% Include hyperref last.
\RequirePackage[colorlinks,breaklinks,
linkcolor=InnerLinkColor,filecolor=OuterLinkColor,
menucolor=OuterLinkColor,urlcolor=OuterLinkColor,
citecolor=InnerLinkColor]{hyperref}
% Fix anchor placement for figures with captions.
% (Note: we don't use a package option here; instead, we give an explicit
% \capstart for figures that actually have a caption.)
\RequirePackage{hypcap}
% From docutils.writers.latex2e
\providecommand{\DUspan}[2]{%
{% group ("span") to limit the scope of styling commands
\@for\node@class@name:=#1\do{%
\ifcsname docutilsrole\node@class@name\endcsname%
\csname docutilsrole\node@class@name\endcsname%
\fi%
}%
{#2}% node content
}% close "span"
}
-
-\providecommand*{\DUprovidelength}[2]{
- \ifthenelse{\isundefined{#1}}{\newlength{#1}\setlength{#1}{#2}}{}
-}
-
-\DUprovidelength{\DUlineblockindent}{2.5em}
-\ifthenelse{\isundefined{\DUlineblock}}{
- \newenvironment{DUlineblock}[1]{%
- \list{}{\setlength{\partopsep}{\parskip}
- \addtolength{\partopsep}{\baselineskip}
- \setlength{\topsep}{0pt}
- \setlength{\itemsep}{0.15\baselineskip}
- \setlength{\parsep}{0pt}
- \setlength{\leftmargin}{#1}}
- \raggedright
- }
- {\endlist}
-}{}
diff --git a/Doc/newdoc/images/jean_cyl1.png b/Doc/newdoc/images/jean_cyl1.png
new file mode 100644
index 0000000..976137a
Binary files /dev/null and b/Doc/newdoc/images/jean_cyl1.png differ
diff --git a/Doc/newdoc/images/jean_cyl2.png b/Doc/newdoc/images/jean_cyl2.png
new file mode 100644
index 0000000..03c04d0
Binary files /dev/null and b/Doc/newdoc/images/jean_cyl2.png differ
diff --git a/Doc/newdoc/index.rst b/Doc/newdoc/index.rst
index 6e9ef7b..44d9131 100644
--- a/Doc/newdoc/index.rst
+++ b/Doc/newdoc/index.rst
@@ -1,30 +1,33 @@
.. pNbody documentation master file, created by
sphinx-quickstart on Wed Aug 24 16:29:02 2011.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to pNbody's documentation!
==================================
Contents:
.. toctree::
:maxdepth: 5
rst/Overview
+ rst/Download
rst/Installation
rst/Tutorial
rst/Formats
rst/Display
rst/InitialConditions
+ rst/Selection
rst/Units
+ rst/PhysicalQuantities
rst/Grids
rst/Reference
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
diff --git a/Doc/newdoc/rst/Download.rst b/Doc/newdoc/rst/Download.rst
new file mode 100644
index 0000000..023803d
--- /dev/null
+++ b/Doc/newdoc/rst/Download.rst
@@ -0,0 +1,6 @@
+Download
+********
+
+**pNbody** may be downloaded here:
+
+http://obswww.unige.ch/~revaz/pNbody/Download/
diff --git a/Doc/newdoc/rst/GeneratingVelocities.rst b/Doc/newdoc/rst/GeneratingVelocities.rst
index 15f505a..10575db 100644
--- a/Doc/newdoc/rst/GeneratingVelocities.rst
+++ b/Doc/newdoc/rst/GeneratingVelocities.rst
@@ -1,188 +1,280 @@
Generating velocities
**********************
.. currentmodule:: pNbody.main
Setting initial velocities may be trivial or very complex, depending
on the aim. Of course, its allways possible to directely set the
variable ''nb.vel'' to some values. However, in galactic dynamics, this
is usually nor the right way to do.
**pNbody** offers different methods to set the velocities in order to ensure
the system to be in a resonably good equilibrium.
.. table:: methods dedicated to the computation of velocities
=========================================================================== =============== ===============
method name geometry method
=========================================================================== =============== ===============
:func:`NbodyDefault.Get_Velocities_From_AdaptativeSpherical_Grid` spherical jeans equation+self-adaptative grid
:func:`NbodyDefault.Get_Velocities_From_Spherical_Grid` spherical jeans equation
:func:`NbodyDefault.Get_Velocities_From_Cylindrical_Grid` cylindrical jeans equation
=========================================================================== =============== ===============
Some examples showing how to set the initial velocities for spherical or axi-symetric models are provided in the
example directory. To get it, type::
pNbody_copy-examples
by default, this create a directory in your home ``~/pnbody_examples``.
The scripts are in the ``~/pnbody_examples/ic`` directory.
Spherical coordinate
====================
In spherical coordinates, supposing that the velocities are isotropics. the Jeans equations is reduced to one integral,
giving the value of the velocity dispertion of a component :math:`i` :
.. math:: \sigma_{i}^2(r) = \frac{1}{\rho_{i}(r)}\int_r^\infty\! dr' \,\rho_{i}(r')\, \partial_{r'} \Phi(r').
Example : Set a Plummer sphere to the jeans equilibrium
=======================================================
First, generate the Plummer sphere::
>>> from pNbody import ic
>>> from numpy import *
>>> n = 100000
>>> a = 1.
>>> rmax = 10.
>>> nb = ic.plummer(n,1,1,1,eps=a,rmax=rmax,name='plummer.dat',ftype='gadget')
Then, we need to create a 1D grid wraping the model::
>>> grmin = 0 # grid minimal radius
>>> grmax = rmax*1.05 # grid maximal radius
>>> nr = 128 # number of radial bins
Now, in order to decrease the noise in outer regions, it is usefull to
use a non linear grid. In this purpose, we need to define a function that
defines the new nodes of the grid. Here, we set it logarithmic. The inverse function
is also needed::
>>> rc = a
>>> g = lambda r:log(r/rc+1) # the function
>>> gm = lambda r:rc*(exp(r)-1) # and its inverse
Now it possible to invoque the magic function::
>>> eps = 0.01 # gravitational softening
>>> nb,phi,stats = nb.Get_Velocities_From_Spherical_Grid(eps=eps,nr=nr,rmax=grmax,phi=None,g=g,gm=gm,UseTree=True,ErrTolTheta=0.5)
If ``UseTree=True`` the function uses a ``treecode`` to compute the potential at each node.
A new ``nb`` object with velocities computed from the Jeans equation is returned. We also get the potential in each node
and some statistics. The potential ``phi`` is usefull if we need to run the method for another component.
Using the ``stats`` variable, it is possible to plot some interesting values used during the computation, like the velocity dispertion as a function of the radius::
>>> import pylab as pt
>>> pt.plot(stats['r'],stats['sigma'])
>>> pt.show()
.. image:: ../images/r-sigma.png
or the density profile::
>>> pt.plot(stats['r'],stats['rho'])
>>> pt.loglog()
>>> pt.show()
.. image:: ../images/r-rho.png
It is possible to check the velocity dispertion along the line of sight directely
by mesuring it using a grid object::
>>> from pNbody import libgrid
>>> G = libgrid.Spherical_1d_Grid(rmin=0,rmax=rmax,nr=128,g=None,gm=None)
>>> r = G.get_r()
>>> sigma = G.get_SigmaValMap(nb,nb.vz())
>>> pt.plot(r,sigma)
>>> pt.xlabel("radius")
>>> pt.ylabel("velocity dispertion")
>>> pt.show()
.. image:: ../images/r-sigma-mes.png
Cylindrical coordinate
======================
As in spherical geometry, we use the Jeans equations to get an approximation of the velocity dispertions.
Vertical velocity dispersion
----------------------------
The resolution of these equations in cylindrical coordinates gives directely the dispersion along the z axis:
.. math:: {\sigma_z}_i^2 = \frac{1}{\rho_i(z)}\int_z^\infty\! dz' \,\rho_i(z')\, \partial_{z'} \Phi(z').
and the mean azimuthal velocity:
Radial velocity dispersion
--------------------------
1. if ``mode_sigma_r['name']='epicyclic_approximation'``, we use the epicyclic approximation which hold:
.. math:: \sigma_R^2 = \sigma_z^2 \frac{1}{\beta^2} \frac{\nu^2}{\kappa^2}
the parameter :math:`\beta^2` is set by the variable ``mode_sigma_r['param']`` and takes usually a value around 1.
2. if ``mode_sigma_r['name']='isothropic'``, the value is simply:
.. math:: \sigma_R^2 = \sigma_z^2
3. if ``mode_sigma_r['name']='toomre'``, we determine the velocity dispersion uses the Safronov-Toomre parameter :math:`Q`:
.. math:: \sigma_R = \frac{3.36 Q G \Sigma_i}{\kappa}
:math:`Q` is set with the variable ``mode_sigma_r['param']``.
4. if ``mode_sigma_r['name']='constant'``, the value is simply constant, given by the variable ``mode_sigma_r['param']``:
.. math:: \sigma_R = cte
Azimuthal velocity dispersion
-----------------------------
1. if ``mode_sigma_p['name']='epicyclic_approximation'``, we use the epicyclic approximation which hold:
.. math:: \sigma_\phi^2 = \sigma_r^2 \frac{1}{4} \frac{\kappa^2}{\Omega^2}
2. if ``mode_sigma_p['name']='isothropic'``, the value is simply:
.. math:: \sigma_\phi^2 = \sigma_z^2
Mean azimuthal velocity
-----------------------
Finally, the mean azimuthal velocity is also derived directely from the Jeans equations:
.. math:: \langle v_{\phi}^2 \rangle = R\,\partial_{R} \Phi(R,z) + \sigma_R^2 - \sigma_\phi^2 + \frac{R}{\rho_i} \partial_R \left( \rho_i \sigma_R^2 \right),
-Examples:
-=========
+Example : Set an exponnential disk to the jeans equilibrium
+===========================================================
+Lest try to put an exponnential disk at the Jeans equilibrium.
+First, we generate the disk::
+ >>> from pNbody import ic
+ >>> from numpy import *
+ >>> n = 100000
+ >>> Hz = 0.3
+ >>> Hr = 3.
+ >>> Rmax = 30.
+ >>> Zmax = 3.
+ >>> nb = ic.expd(n,Hr,Hz,Rmax,Zmax,irand=1,name='expd.dat',ftype='gadget')
+
+
+Then, we need to set the parameters for the cylindrical grid::
+
+ >>> grmin = 0. # minimal grid radius
+ >>> grmax = 1.1*Rmax # maximal grid radius
+ >>> gzmin = -1.1*Zmax # minimal grid z
+ >>> gzmax = 1.1*Zmax # maximal grid z
+ >>> nr = 32 # number of bins in r
+ >>> nt = 2 # number of bins in t
+ >>> nz = 64+1 # number of bins in z
+
+Set some functions used to distort the grid along the radius::
+ >>> rc = Hr
+ >>> g = lambda r:log(r/rc+1.)
+ >>> gm = lambda r:rc*(exp(r)-1.)
+
+Set some options on how to compute velocity dispertions::
+
+ >>> mode_sigma_z = {"name":"jeans","param":None}
+ >>> mode_sigma_r = {"name":"toomre","param":1.0}
+ >>> mode_sigma_p = {"name":"epicyclic_approximation","param":None}
+ >>> params = [mode_sigma_z,mode_sigma_r,mode_sigma_p]
+
+Set the gravitational softening::
+
+ >>> eps=0.1
+
+And finally, lunch the magic function::
+
+ >>> nb,phi,stats = nb.Get_Velocities_From_Cylindrical_Grid(select='0',disk=(0),eps=eps,nR=nr,nz=nz,nt=nt,Rmax=grmax,zmin=gzmin,zmax=gzmax,params=params,Phi=None,g=g,gm=gm)
+
+The parameter ``select='0'`` tells that we want to compute the velocities on particles of type 0, while
+``disk=0`` tells that what we considere as the disk is only the particles 0. This is usefull when dealing with
+multi-component models.
+
+The latter function return ``nb`` with the new velocities, a matrix ``phi`` containing the potential at each node of the grid,
+and a dictrionary ``stats`` containing some physical usefull quantities. Lets plot some of them::
+
+ >>> import pylab as pt
+ >>> pt.plot(stats['R'],stats['vc'])
+ >>> pt.plot(stats['R'],stats['vm'])
+ >>> pt.plot(stats['R'],stats['sr'])
+ >>> pt.plot(stats['R'],stats['sz'])
+ >>> pt.plot(stats['R'],stats['sp'])
+ >>> pt.xlabel('Radius')
+ >>> pt.ylabel('velocity')
+ >>> pt.show()
+
+.. image:: ../images/jean_cyl1.png
+
+
+Lets try instead of fixing the Tomre parameter, to use for the radial velocity dispertion
+the epicyclic approximation.
+This is done by using the following parameters::
+
+ >>> mode_sigma_z = {"name":"jeans","param":None}
+ >>> mode_sigma_r = {"name":"epicyclic_approximation","param":1}
+ >>> mode_sigma_p = {"name":"epicyclic_approximation","param":None}
+ >>> params = [mode_sigma_z,mode_sigma_r,mode_sigma_p]
+
+again, run the magic function::
+
+ >>> nb,phi,stats = nb.Get_Velocities_From_Cylindrical_Grid(select='0',disk=(0),eps=eps,nR=nr,nz=nz,nt=nt,Rmax=grmax,zmin=gzmin,zmax=gzmax,params=params,Phi=None,g=g,gm=gm)
+
+Now lets plot the Tommre parameter::
+
+ >>> pt.plot(stats['R'],stats['Q'])
+ >>> pt.xlabel('Radius')
+ >>> pt.ylabel('Q')
+ >>> pt.show()
+
+.. image:: ../images/jean_cyl2.png
+
+
+Multi component systems
+-----------------------
+
+Examples using multicomponents systems are provided in the ``pnbody_examples/ic`` directory obtained
+with the command::
+
+ pNbody_copy-examples
diff --git a/Doc/newdoc/rst/PhysicalQuantities.rst b/Doc/newdoc/rst/PhysicalQuantities.rst
new file mode 100644
index 0000000..72e8157
--- /dev/null
+++ b/Doc/newdoc/rst/PhysicalQuantities.rst
@@ -0,0 +1,3 @@
+Extracting physical quantities
+******************************
+
diff --git a/Doc/newdoc/rst/Selection.rst b/Doc/newdoc/rst/Selection.rst
new file mode 100644
index 0000000..94ba1eb
--- /dev/null
+++ b/Doc/newdoc/rst/Selection.rst
@@ -0,0 +1,3 @@
+Selectig particles
+******************
+
diff --git a/Doc/newdoc/sphinxext/docscrape.pyc b/Doc/newdoc/sphinxext/docscrape.pyc
index 75c18ee..0456e9f 100644
Binary files a/Doc/newdoc/sphinxext/docscrape.pyc and b/Doc/newdoc/sphinxext/docscrape.pyc differ
diff --git a/Doc/newdoc/sphinxext/docscrape_sphinx.pyc b/Doc/newdoc/sphinxext/docscrape_sphinx.pyc
index 2d4d7f4..f0bf77b 100644
Binary files a/Doc/newdoc/sphinxext/docscrape_sphinx.pyc and b/Doc/newdoc/sphinxext/docscrape_sphinx.pyc differ
diff --git a/Doc/newdoc/sphinxext/numpydoc.pyc b/Doc/newdoc/sphinxext/numpydoc.pyc
index 5db5291..94acc49 100644
Binary files a/Doc/newdoc/sphinxext/numpydoc.pyc and b/Doc/newdoc/sphinxext/numpydoc.pyc differ
diff --git a/pNbody/main.py b/pNbody/main.py
index 0f2ffc1..06261e4 100644
--- a/pNbody/main.py
+++ b/pNbody/main.py
@@ -1,5829 +1,5833 @@
# -*- coding: utf-8 -*-
# some standard modules
import os,sys,string,types,glob
from copy import deepcopy
import warnings
# array module
from numpy import *
from numpy import clip as numclip
from numpy import random as RandomArray
# module that init parameters
from parameters import *
# nbody python modules
import io
from libutil import *
from palette import *
import geometry as geo
import fourier
import param
import liblog
import libgrid
import libdisk
import libutil
import nbdrklib
# nbody C modules
from myNumeric import *
from mapping import *
from nbodymodule import *
# Gtools module (now integrated in nbody)
#import Gtools as Gt
import units
import ctes
import thermodyn
import coolinglib
import cosmo
import treelib
import asciilib
try:
import ptreelib
except:
pass
try:
import libqt
except:
pass
try:
import SM
except:
pass
try: # all this is usefull to read files
from mpi4py import MPI
except:
MPI = None
import mpi # maybe we should send mpi instead of MPI
FLOAT = float
####################################################################################################################################
#
# DEFAULT CLASS NBODY
#
####################################################################################################################################
class NbodyDefault:
'''
This is the reference Nbody class.
This is the constructor for the **Nbody** object. Optional arguments are:
p_name : name of the file
in case of multiple files, files must be included in a list ["file1","file2"]
pos : positions (3xN array)
vel : positions (3xN array)
mass : positions (1x array)
num : id of particles (1xN array)
tpe : type of particles (1xN array)
ftype : type of input file (binary,ascii)
status : 'old' : open an old file
'new' : create a new object
byteorder : 'little' or 'big'
pio : parallel io : 'yes' or 'no'
local : True=local object, False=global object (paralellized) Not implemeted Yet
log : log file
unitsfile : define the type of units
by default this class initialize the following variables :
self.p_name : name of the file(s) to read or write
self.pos : array of positions
self.vel : array of velocities
self.mass : array of masses
self.num : array of id
self.tpe : array of types
self.ftype : type of the file
self.status : object status ('old' or 'new')
self.byteorder : byter order ('little' or 'big')
self.pio : parallel io ('yes' or 'no')
self.log : log object
# new variables
self.nbody : local number of particles
self.nbody_tot : total number of particles
self.mass_tot : total mass
self.npart : number of particles of each type
self.npart_tot : total number of particles of each type
self.spec_vars : dictionary of variables specific for the format used
self.spec_vect : dictionary of vector specific for the format used
'''
def __init__(self,p_name=None,pos=None,vel=None,mass=None,num=None,tpe=None,ftype=None,status='old',byteorder=sys.byteorder,pio='no',local=False,log=None,unitsfile=None):
#################################
# init vars
#################################
if p_name == None:
status = 'new'
self.set_filenames(p_name,pio=pio)
self.pos = pos
self.vel = vel
self.mass = mass
self.num = num
self.tpe = tpe
self.ftype = self.__class__.__name__
self.status = status
self.byteorder = byteorder
self.pio = pio
self.log = log
self.nbody = None
self.nbody_tot = None
self.mass_tot = None
self.npart = None
self.npart_tot = None
self.unitsfile = unitsfile
#################################
# init units
#################################
self.init_units()
#################################
# init other parameters
#################################
self.parameters = param.Params(PARAMETERFILE,None)
self.defaultparameters = self.parameters.get_dic()
# log
if self.log == None:
self.log = liblog.Log(os.path.join(HOME,'.nbodylog'),show='yes')
###################################################
# in case of an old file, open and read the file(s)
###################################################
if status=='old':
self.read()
###################################################
# in case of a new file
###################################################
elif status=='new':
for i in range(len(self.p_name)):
if self.p_name[i] == None:
self.p_name[i] = 'file.dat'
###################################################
# final initialisation
###################################################
self.init()
###################################################
# check consistency
###################################################
# to be done
#################################
#
# init functions
#
#################################
#################################
def init(self):
#################################
'''
Initialize normal and specific class variables
'''
# 1) find the number of particles
self.nbody = self.get_nbody()
# 2) define undefined vectors
if self.pos == None:
self.pos = zeros((self.nbody,3),float32)
self.pos = self.pos.astype(float32)
else:
self.pos = self.pos.astype(float32)
if self.vel == None:
self.vel = zeros((self.nbody,3),float32)
self.vel = self.vel.astype(float32)
else:
self.vel = self.vel.astype(float32)
if self.mass == None:
self.mass = ones((self.nbody, ),float32)/self.nbody
self.mass = self.mass.astype(float32)
else:
self.mass = self.mass.astype(float32)
if self.tpe == None:
self.tpe = zeros(self.nbody,int)
self.tpe = self.tpe.astype(int)
else:
self.tpe = self.tpe.astype(int)
if self.num == None:
self.num = self.get_num()
self.num = self.num.astype(int)
else:
self.num = self.num.astype(int)
# 3) other variables
self.nbody_tot = self.get_nbody_tot()
self.mass_tot = self.get_mass_tot()
self.npart = self.get_npart()
self.npart_tot = self.get_npart_tot()
# Init specific class variables
# (may be redundant with make_specific_variables_global)
self.spec_vars = self.get_default_spec_vars()
list_of_vars = self.get_list_of_vars()
for name in self.spec_vars.keys():
try:
list_of_vars.index(name)
except ValueError:
setattr(self, name, self.spec_vars[name])
# Init specific class vectors
self.spec_vect = self.get_default_spec_vect()
list_of_vect = self.get_list_of_array()
for name in self.spec_vect.keys():
try:
list_of_vect.index(name)
except ValueError:
setattr(self, name, ones(self.nbody,self.spec_vect[name][1])*self.spec_vect[name][0])
# init specific parameters
self.InitSpec()
# sph parameters/variables
self.InitSphParameters()
#################################
def InitSpec(self):
#################################
"""
This function allows to initialize specific parameters.
It must be defined in format files.
"""
pass
#################################
def set_ftype(self,ftype='binary'):
#################################
"""
Change the type of the file
ftype : type of the file
"""
if mpi.NTask > 1:
raise "Warning","set_ftype function is currently not suported with multi proc."
new = Nbody(status='new',ftype=ftype)
# now, copy all var linked to the model
for name in self.get_list_of_vars():
if name != 'ftype':
setattr(new, name, getattr(self,name))
# now, copy all array linked to the model
for name in self.get_list_of_array():
vec = getattr(self,name)
setattr(new, name, vec)
# other vars
new.init()
return new
#################################
def get_num(self):
#################################
"""
Compute the num variable in order to be consistent with particles types
"""
# compute npart_all
if self.npart == None:
npart = self.get_npart()
else:
npart = self.npart
npart_all = array(mpi.mpi_allgather(npart))
return mpi.mpi_sarange(npart_all) # + 1
#################################
def get_default_spec_vars(self):
#################################
'''
return specific variables default values for the class
'''
return {}
#################################
def get_default_spec_vect(self):
#################################
'''
return specific vector default values for the class
'''
return {}
#################################
def set_pio(self,pio):
#################################
"""
Set parallel input/output or not io
pio : 'yes' or 'no'
"""
self.pio = pio
self.set_filenames(self.p_name_global,pio=pio)
if pio=='yes':
self.num_files = mpi.NTask
else:
self.num_files = 1
#################################
def rename(self,p_name=None):
#################################
"""
Rename the files
p_name : new name(s)
"""
if p_name != None:
self.set_filenames(p_name,pio=self.pio)
#################################
def set_filenames(self,p_name,pio=None):
#################################
"""
Set the local and global names
p_name : new name(s)
pio : 'yes' or 'no'
"""
if type(p_name) == types.ListType:
self.p_name_global = []
self.p_name = []
for name in p_name:
if pio == 'yes':
self.p_name_global.append(name)
self.p_name.append("%s.%d"%(name,mpi.mpi_ThisTask()))
else:
self.p_name_global.append(name)
self.p_name.append(name)
else:
if pio == 'yes':
self.p_name_global = [p_name]
self.p_name = ["%s.%d"%(p_name,mpi.mpi_ThisTask())]
else:
self.p_name_global = [p_name]
self.p_name = [p_name]
#################################
def get_ntype(self):
#################################
"""
return the number of paticles types
"""
return len(self.npart)
#################################
def get_nbody(self):
#################################
"""
Return the local number of particles.
"""
if self.pos != None:
nbody = len(self.pos)
elif self.vel != None:
nbody = len(self.vel)
elif self.mass != None:
nbody = len(self.mass)
elif self.num != None:
nbody = len(self.num)
elif self.tpe != None:
nbody = len(self.tpe)
else:
nbody = 0
return nbody
#################################
def get_nbody_tot(self):
#################################
"""
Return the total number of particles.
"""
nbody_tot = mpi.mpi_allreduce(self.nbody)
return nbody_tot
#################################
def get_npart(self):
#################################
"""
Return the local number of particles of each types,
based on the variable tpe
"""
npart = array([],int)
n = 0
if self.tpe==None:
return npart.tolist()
for tpe in range(self.get_mxntpe()):
np = sum( (self.tpe==tpe).astype(int) )
npart = concatenate((npart,array([np])))
n = n + np
if n != self.nbody:
print "get_npart : n (=%d) is different from self.nbody (=%d)"%(n,self.nbody)
raise "get_npart : n is different from self.nbody"
return npart.tolist()
#################################
def get_npart_tot(self):
#################################
"""
Return the total number of particles of each types.
"""
npart = array(self.npart)
npart_tot = mpi.mpi_allreduce(npart)
npart_tot = npart_tot.tolist()
return npart_tot
#################################
def get_npart_all(self,npart_tot,NTask):
#################################
'''
From npart_tot, the total number of particles per type,
return npart_per_proc, an array where each element corresponds
to the value of npart of each process.
'''
if (type(npart_tot) != types.ListType) and (type(npart_tot) !=ndarray):
npart_tot = array([npart_tot])
ntype = len(npart_tot)
npart_all = zeros((NTask,ntype))
for i in range(len(npart_tot)):
for Task in range(NTask-1,-1,-1):
npart_all[Task,i] = npart_tot[i]/NTask + npart_tot[i]%NTask*(Task==0)
return npart_all
#################################
def get_npart_and_npart_all(self,npart):
#################################
'''
From npart (usually read for the header of a file), compute :
npart : number of particles in each type
npart_tot : total number of particles in each type
npart_all : npart for each process.
'''
#################################
def get_mxntpe(self):
#################################
'''
Return the max number of type for this format
'''
return 6
#################################
def make_default_vars_global(self):
#################################
'''
Make specific variables global
'''
self.spec_vars = self.get_default_spec_vars()
for name in self.spec_vars.keys():
if not self.has_var(name):
setattr(self, name, self.spec_vars[name])
#################################
def set_npart(self,npart):
#################################
"""
Set the local number of particles of each types.
This function modifies the variable self.tpe
"""
if sum(array(npart)) > self.nbody:
raise "Error (set_npart)","sum(npart) is greater than nbody"
i = 0
n0 = 0
for n in npart:
self.tpe[n0:n0+n] = ones(n)*i
i = i + 1
n0 = n0+n
self.tpe[n0:self.nbody] = ones(self.nbody-n0)*i
self.npart = self.get_npart()
self.npart_tot = self.get_npart_tot()
#################################
def set_tpe(self,tpe):
#################################
"""
Set all particles to the type tpe
"""
self.tpe = ones(self.nbody)*tpe
self.npart = self.get_npart()
self.npart_tot = self.get_npart_tot()
#################################
#
# parameters functions
#
#################################
'''
Warning, these routines are a bit bad...
'''
def set_parameters(self,params):
'''
Set parameters for the class
'''
self.parameters = param.Params(PARAMETERFILE,None)
self.parameters.params = params.params
self.defaultparameters = self.parameters.get_dic()
#################################
#
# units functions
#
#################################
'''
There is several ways to set the units in pNbody
In an object, the units are stored in
self.localsystem_of_units
which is a UnitSystem object defined in units.py
We define a unit system by giving Unit_lenght, Unit_mass, Unit_time, Unit_K, Unit_mol, and Unit_C
Actually only Unit_lenght, Unit_mass, Unit_time are used, all are Units object (units.py)
Following Gadget2, easy ways to definde units is to give three floats,
UnitVelocity_in_cm_per_s
UnitMass_in_g
UnitLength_in_cm
This is done using the method
self.set_local_system_of_units()
which uses UnitVelocity_in_cm_per_s,UnitMass_in_g,UnitLength_in_cm if they are given,
or read a gadget parameter file
or read a pNbody unitsparameter file
or use the default unitsparameter file.
'''
def init_units(self):
'''
This function is responsible for the units initialization.
It will create :
self.unitsparameters
that contains parameters like
- the hydrogen mass fraction,
- the metalicity ionisation flag
- the adiabatic index
- ...
and
self.localsystem_of_units
a UnitSystem object that really defines the system of units
in the Nbody object. It uses the values :
UnitLength_in_cm
UnitMass_in_g
UnitVelocity_in_cm_per_s
All physical values computed in pNbody should use self.localsystem_of_units to
be converted in other units.
self.unitsparameters is usefull if other parameters needs to be known, like
the adiabatic index, etc.
'''
self.unitsparameters = param.Params(UNITSPARAMETERFILE,None)
if self.unitsfile!=None:
##############################################################
# 1) this part should be only in the gadget.py format file, no ? BOF, non
# 2) we could simplify using self.set_local_system_of_units()
# 3) and some options -> but this needs to update self.unitsparameters
##############################################################
# if it is a gadget parameter file
try:
gparams = io.read_params(self.unitsfile)
self.unitsparameters.set('HubbleParam', gparams['HubbleParam'])
self.unitsparameters.set('UnitLength_in_cm', gparams['UnitLength_in_cm'])
self.unitsparameters.set('UnitMass_in_g', gparams['UnitMass_in_g'])
self.unitsparameters.set('UnitVelocity_in_cm_per_s',gparams['UnitVelocity_in_cm_per_s'])
# those parameters may be in the header of the file
self.unitsparameters.set('Omega0', gparams['Omega0'])
self.unitsparameters.set('OmegaLambda', gparams['OmegaLambda'])
self.unitsparameters.set('OmegaBaryon', gparams['OmegaBaryon'])
self.unitsparameters.set('BoxSize', gparams['BoxSize'])
self.unitsparameters.set('ComovingIntegrationOn', gparams['ComovingIntegrationOn'])
#self.set_local_system_of_units(gadgetparameterfile=self.unitsfile)
except:
# try to read a pNbody units file
try:
self.unitsparameters = param.Params(self.unitsfile,None)
#self.set_local_system_of_units(unitparameterfile=self.unitsfile)
except:
raise IOError(015,'format of unitsfile %s unknown ! Pease check.'%(self.unitsfile))
# define local system of units it it does not exists
#if not self.has_var("localsystem_of_units"):
self.set_local_system_of_units()
# print info
#self.localsystem_of_units.info()
def set_unitsparameters(self,unitsparams):
'''
Set units parameters for the class.
'''
print "!!!!!! in set_unitsparameters !!!!"
print "!!!!!! this is bad !!!! we should never use UNITSPARAMETERFILE"
print "!!!!!! this is bad !!!! we should never use UNITSPARAMETERFILE"
self.unitsparameters = param.Params(UNITSPARAMETERFILE,None)
self.unitsparameters.params = unitsparams.params
self.set_local_system_of_units()
def set_local_system_of_units(self,params=None,UnitLength_in_cm=None,UnitVelocity_in_cm_per_s=None,UnitMass_in_g=None,unitparameterfile=None,gadgetparameterfile=None):
'''
Set local system of units using UnitLength_in_cm,UnitVelocity_in_cm_per_s,UnitMass_in_g
1) if nothing is given, we use self.unitsparameters to obtain these values
2) if UnitLength_in_cm
UnitVelocity_in_cm_per_s
UnitMass_in_g
are given, we use them
2b) if UnitLength_in_cm,UnitVelocity_in_cm_per_s,UnitMass_in_g
are given in a dictionary
3) if unitparameterfile is given we read the parameters from the file (units parameter format)
4) if gadgetparameterfile is given we read the parameters from the file (gadget param format)
'''
if gadgetparameterfile!=None:
params = io.read_params(gadgetparameterfile)
#print "Units Set From %s"%gadgetparameterfile
elif unitparameterfile!=None:
unitsparameters = param.Params(unitparameterfile,None)
params = {}
params['UnitLength_in_cm'] = unitsparameters.get('UnitLength_in_cm')
params['UnitVelocity_in_cm_per_s'] = unitsparameters.get('UnitVelocity_in_cm_per_s')
params['UnitMass_in_g'] = unitsparameters.get('UnitMass_in_g')
print "Units Set From %s"%unitparameterfile
elif params!=None:
print "Units Set From %s"%params
elif UnitLength_in_cm!=None and UnitVelocity_in_cm_per_s!=None and UnitMass_in_g!=None:
params = {}
params['UnitLength_in_cm'] = UnitLength_in_cm
params['UnitVelocity_in_cm_per_s'] = UnitVelocity_in_cm_per_s
params['UnitMass_in_g'] = UnitMass_in_g
print "Units Set From UnitLength_in_cm,UnitVelocity_in_cm_per_s,UnitMass_in_g"
else:
params = {}
params['UnitLength_in_cm'] = self.unitsparameters.get('UnitLength_in_cm')
params['UnitVelocity_in_cm_per_s'] = self.unitsparameters.get('UnitVelocity_in_cm_per_s')
params['UnitMass_in_g'] = self.unitsparameters.get('UnitMass_in_g')
print "Units Set From %s (%s)"%("self.unitsparameters",self.unitsparameters.filename)
# now, create the
self.localsystem_of_units = units.Set_SystemUnits_From_Params(params)
#################################
#
# info functions
#
#################################
#################################
def info(self):
#################################
"""
Write info
"""
infolist = []
infolist.append("-----------------------------------")
if mpi.NTask>1:
infolist.append("")
infolist.append("ThisTask : %s"%mpi.ThisTask.__repr__())
infolist.append("NTask : %s"%mpi.NTask.__repr__())
infolist.append("")
infolist.append("particle file : %s"%self.p_name.__repr__())
infolist.append("ftype : %s"%self.ftype.__repr__())
infolist.append("mxntpe : %s"%self.get_mxntpe().__repr__())
infolist.append("nbody : %s"%self.nbody.__repr__())
infolist.append("nbody_tot : %s"%self.nbody_tot.__repr__())
infolist.append("npart : %s"%self.npart.__repr__())
infolist.append("npart_tot : %s"%self.npart_tot.__repr__())
infolist.append("mass_tot : %s"%self.mass_tot.__repr__())
infolist.append("byteorder : %s"%self.byteorder.__repr__())
infolist.append("pio : %s"%self.pio.__repr__())
if self.nbody != 0:
infolist.append("")
infolist.append("len pos : %s"%len(self.pos).__repr__())
infolist.append("pos[0] : %s"%self.pos[0].__repr__())
infolist.append("pos[-1] : %s"%self.pos[-1].__repr__())
infolist.append("len vel : %s"%len(self.vel).__repr__())
infolist.append("vel[0] : %s"%self.vel[0].__repr__())
infolist.append("vel[-1] : %s"%self.vel[-1].__repr__())
infolist.append("len mass : %s"%len(self.mass).__repr__())
infolist.append("mass[0] : %s"%self.mass[0].__repr__())
infolist.append("mass[-1] : %s"%self.mass[-1].__repr__())
infolist.append("len num : %s"%len(self.num).__repr__())
infolist.append("num[0] : %s"%self.num[0].__repr__())
infolist.append("num[-1] : %s"%self.num[-1].__repr__())
infolist.append("len tpe : %s"%len(self.tpe).__repr__())
infolist.append("tpe[0] : %s"%self.tpe[0].__repr__())
infolist.append("tpe[-1] : %s"%self.tpe[-1].__repr__())
if self.spec_info()!=None:
infolist = infolist + self.spec_info()
all_infolist = mpi.mpi_allgather(infolist)
if mpi.mpi_IsMaster():
for infolist in all_infolist:
for line in infolist:
#print line
self.log.write(line)
#################################
def spec_info(self):
#################################
"""
Write specific info
"""
return None
#################################
def object_info(self):
#################################
"""
Write class(object) info
"""
list_of_vars = self.get_list_of_vars()
list_of_array = self.get_list_of_array()
self.log.write("#############################")
self.log.write("list of vars")
self.log.write("#############################")
for name in list_of_vars:
self.log.write("%s %s"%( name,str(type(getattr(self,name)))))
self.log.write("#############################")
self.log.write("list of arrays")
self.log.write("#############################")
for name in list_of_array:
self.log.write("%s %s"%(name,str(type(getattr(self,name)))))
#################################
def nodes_info(self):
#################################
"""
Write info on nodes
"""
all_npart = mpi.mpi_allgather(self.npart)
all_nbody = mpi.mpi_allgather(self.nbody)
if mpi.mpi_IsMaster():
for Task in range(mpi.NTask):
line = "Task=%4d nbody=%10d"%(Task,all_nbody[Task])
line = line + " npart= "
for npart in all_npart[Task]:
line = line + "%10d "%npart
self.log.write(line)
#################################
def memory_info(self):
#################################
"""
Write info on memory size of the current object (only counting arrays size)
"""
total_size = 0
array_size = 0
elts = self.get_list_of_array()
for elt in elts:
#num_of_elts = getattr(self,elt).size
#byte_per_elts = getattr(self,elt).itemsize
#bytes = num_of_elts*byte_per_elts
bytes = getattr(self,elt).nbytes
total_size = total_size + bytes
array_size = array_size + bytes
print "(%d) %10s %14d"%(mpi.ThisTask,elt,bytes)
#elts = self.get_list_of_vars()
#for elt in elts:
array_size = mpi.mpi_reduce(array_size) # only the master return the info
total_size = mpi.mpi_reduce(total_size)
if mpi.mpi_IsMaster():
print "total size = %d octets"%(total_size)
if array_size < 1024:
print "total arrays size = %d octets"%(array_size)
else:
array_size = array_size/1024.0
if array_size < 1024:
print "total arrays size = %dK"%(array_size)
else:
array_size = array_size/1024.0
if array_size < 1024:
print "total arrays size = %dM"%(array_size)
else:
array_size = array_size/1024.0
if array_size < 1024:
print "total arrays size = %dG"%(array_size)
#################################
def print_filenames(self):
#################################
"""
Print files names
"""
self.log.write("p_name_global = %s"%str(self.p_name_global))
self.log.write("p_name = %s"%str(self.p_name))
#################################
#
# list of variables functions
#
#################################
def get_list_of_array(self):
"""
Return the list of numpy vectors of size nbody.
"""
list_of_arrays = []
for name in dir(self):
if type(getattr(self,name)) == ndarray:
if len(getattr(self,name)) == self.nbody:
#if (name!="nall") and (name!="nallhw") and (name!="massarr") and (name!="npart") and (name!="npart_tot"):
list_of_arrays.append(name)
return list_of_arrays
def get_list_of_method(self):
"""
Return the list of instance methods (functions).
"""
list_of_instancemethod = []
for name in dir(self):
if type(getattr(self,name)) == types.MethodType:
list_of_instancemethod.append(name)
return list_of_instancemethod
def get_list_of_vars(self):
"""
Get the list of vars that are linked to the model
"""
list_of_allvars = dir(self)
list_of_arrays = self.get_list_of_array()
list_of_method = self.get_list_of_method()
for name in list_of_arrays:
list_of_allvars.remove(name)
for name in list_of_method:
list_of_allvars.remove(name)
#list_of_allvars.remove('log')
#list_of_allvars.remove('read_fcts') # becose these vars are linked to fcts
#list_of_allvars.remove('write_fcts') # should be definitely removed
return list_of_allvars
def has_var(self,name):
'''
Return true if the object pNbody has
a variable called self.name
'''
get_list_of_vars = self.get_list_of_vars()
try:
getattr(self,name)
return True
except AttributeError:
return False
def has_array(self,name):
'''
Return true if the object pNbody has
an array called self.name
'''
list_of_array = self.get_list_of_array()
try:
list_of_array.index(name)
return True
except ValueError:
return False
def find_vars(self):
'''
This function return a list of variables defined in the current object
'''
elts = dir(self)
lst = []
for elt in elts:
exec("obj = self.%s"%(elt))
if type(obj) != types.MethodType:
lst.append(elt)
return lst
#################################
#
# check special values
#
#################################
def check_arrays(self):
'''
check if the array contains special values like NaN or Inf
'''
status = 0
for name in self.get_list_of_array():
vec = getattr(self,name)
# check nan
if isnan(vec).any():
msg = "array %s contains Nan !!!"%name
warnings.warn(msg)
status = 1
# check nan
if isinf(vec).any():
msg = "array %s contains Inf !!!"%name
warnings.warn(msg)
status = 1
return status
#################################
#
# read/write functions
#
#################################
def read(self):
"""
Read the particle file(s)
"""
for i in range(len(self.p_name)):
self.open_and_read(self.p_name[i],self.get_read_fcts()[i])
self.make_default_vars_global()
def open_and_read(self,name,readfct):
'''
open and read file name
name : name of the input
readfct : function used to read the file
'''
# check p_name
if self.pio=='yes' or mpi.mpi_IsMaster():
io.checkfile(name)
# get size
if self.pio=='yes' or mpi.mpi_IsMaster():
isize = os.path.getsize(name)
# open file
if self.pio=='yes' or mpi.mpi_IsMaster():
f = open(name,'r')
else:
f = None
# read the file
readfct(f)
if self.pio=='yes' or mpi.mpi_IsMaster():
fsize = f.tell()
else:
fsize = None
if self.pio=='yes' or mpi.mpi_IsMaster():
if fsize != isize:
raise "ReadError","file %s not red completely"%(name)
# close file
if self.pio=='yes' or mpi.mpi_IsMaster():
f.close()
def write(self):
"""
Write the particle file(s)
"""
for i in range(len(self.p_name)):
self.open_and_write(self.p_name[i],self.get_write_fcts()[i])
def open_and_write(self,name,writefct):
"""
Open and write file
name : name of the output
writefct : function used to write the file
"""
if self.pio=='yes' or mpi.mpi_IsMaster():
f = open(name,'w')
else:
f = None
writefct(f)
if self.pio=='yes' or mpi.mpi_IsMaster():
f.close()
def write_num(self,name):
"""
Write a num file
name : name of the output
"""
if self.pio =='yes':
f = open("%s.%d"%(name,mpi.ThisTask),'w')
for n in self.num:
f.write('%8i\n'%(n))
f.close()
else:
if mpi.mpi_IsMaster():
f = open(name,'w')
for Task in range(mpi.NTask-1,-1,-1):
if Task != 0:
num = mpi.mpi_recv(source = Task)
for n in num:
f.write('%8i\n'%(n))
else:
for n in self.num:
f.write('%8i\n'%(n))
else:
mpi.mpi_send(self.num, dest = 0)
def read_num(self,name):
"""
Read a num file
name : name of the input
"""
#################################
#
# coordinate transformation
#
#################################
#################################
# positions
#################################
def x(self):
"""
Return a 1xn float array containing x coordinate
"""
return self.pos[:,0]
def y(self):
"""
Return a 1xn float array containing y coordinate
"""
return self.pos[:,1]
def z(self):
"""
Return a 1xn float array containing z coordinate
"""
return self.pos[:,2]
def rxyz(self,center=None):
"""
Return a 1xn float array that corresponds to
the distance from the center of each particle.
"""
if center!=None:
r = sqrt( (self.pos[:,0]-center[0])**2 + (self.pos[:,1]-center[1])**2 + (self.pos[:,2]-center[2])**2 )
else:
r = sqrt( self.pos[:,0]**2 + self.pos[:,1]**2 + self.pos[:,2]**2 )
return r
def phi_xyz(self):
"""
Return a 1xn float array that corresponds to
the azimuth in spherical coordinate of each particle.
"""
r = self.rxyz()
rxy = self.rxy()
xp = self.pos[:,0]*r/rxy # x projection in the plane
yp = self.pos[:,1]*r/rxy # y projection in the plane
p = arctan2(yp,xp)
return p
def theta_xyz(self):
"""
Return a 1xn float array that corresponds to
the elevation angle in spherical coordinate of each particle.
"""
r = self.rxyz()
t = arcsin(self.pos[:,2]/r)
return t
def rxy(self):
"""
Return a 1xn float array that corresponds to
the projected distance from the center of each particle.
"""
r = sqrt( self.pos[:,0]**2 + self.pos[:,1]**2)
return r
def phi_xy(self):
"""
Return a 1xn float array that corresponds to
the azimuth in cylindrical coordinate of each particle.
"""
p = arctan2(self.pos[:,1],self.pos[:,0])
return p
r = rxyz
R = rxy
######################
# spherical coord
######################
def cart2sph(self,pos=None):
"""
Transform carthesian coodinates x,y,z into spherical
coordinates r,p,t
Return a 3xn float array.
"""
if pos!=None:
x = pos[:,0]
y = pos[:,1]
z = pos[:,2]
else:
x = self.pos[:,0]
y = self.pos[:,1]
z = self.pos[:,2]
r = self.rxyz()
rxy = self.rxy()
#xp = x*r/rxy # x projection in the plane
#yp = y*r/rxy # y projection in the plane
#p = arctan2(yp,xp)
#t = arcsin(z/r)
p = arctan2(y,x)
t = arctan2(rxy,z)
return transpose(array([r,p,t])).astype(float32)
def sph2cart(self,pos=None):
"""
Transform spherical coordinates r,p,t into carthesian
coodinates x,y,z
Return a 3xn float array.
"""
if pos!=None:
r = pos[:,0]
p = pos[:,1]
t = pos[:,2]
else:
r = self.pos[:,0]
p = self.pos[:,1]
t = self.pos[:,2]
x = r*sin(t)*cos(p)
y = r*sin(t)*sin(p)
z = r*cos(t)
return transpose(array([x,y,z])).astype(float32)
#################################
# velocities
#################################
def vx(self):
"""
Return a 1xn float array containing x velocity
"""
return self.vel[:,0]
def vy(self):
"""
Return a 1xn float array containing y velocity
"""
return self.vel[:,1]
def vz(self):
"""
Return a 1xn float array containing z velocity
"""
return self.vel[:,2]
def vn(self):
"""
Return a 1xn float array that corresponds to
the norm of velocities
"""
return sqrt(self.vel[:,0]*self.vel[:,0] + self.vel[:,1]*self.vel[:,1] + self.vel[:,2]*self.vel[:,2])
def vrxyz(self):
"""
Return a 1xn float array that corresponds to
the radial velocity in spherical system
"""
r = self.rxyz()
return (self.pos[:,0]*self.vel[:,0] + self.pos[:,1]*self.vel[:,1] + self.pos[:,2]*self.vel[:,2])/r
def Vr(self):
"""
Return the radial velocies of particles
The output is an 3xn float array.
"""
xr = sqrt(self.pos[:,0]**2+self.pos[:,1]**2)
vr = (self.pos[:,0]*self.vel[:,0] + self.pos[:,1]*self.vel[:,1]) / xr
return vr
def Vt(self):
"""
Return the tangential velocies of particles
The output is an 3xn float array.
"""
xr = sqrt(self.pos[:,0]**2+self.pos[:,1]**2)
vt = (self.pos[:,0]*self.vel[:,1] - self.pos[:,1]*self.vel[:,0]) / xr
return vt
def Vz(self):
"""
Return a 1xn float array containing z velocity
"""
return self.vel[:,2]
######################
# cylindrical coord
######################
def vel_cyl2cart(self,pos=None,vel=None):
"""
Transform velocities in cylindrical coordinates vr,vt,vz into carthesian
coodinates vx,vy,vz.
Pos is the position of particles in cart. coord.
Vel is the velocity in cylindrical coord.
Return a 3xn float array.
"""
return vel_cyl2cart(self.pos,self.vel)
def vel_cart2cyl(self):
"""
Transform velocities in carthesian coordinates vx,vy,vz into cylindrical
coodinates vr,vz,vz.
Pos is the position of particles in cart. coord.
Vel is the velocity in cart. coord.
Return a 3xn float array.
"""
return vel_cart2cyl(self.pos,self.vel)
#################################
#
# physical values
#
#################################
def get_ns(self):
"""
Return in an array the number of particles of each node.
"""
ns = mpi.mpi_allgather(self.nbody)
return ns
def get_mass_tot(self):
"""
Return the total mass of system.
"""
mass_tot = mpi.mpi_sum(self.mass)
return mass_tot
def size(self):
"""
Estimate the model size, using the inertial momentum
"""
return max(self.minert())
def cm(self):
"""
Return the mass center of the model.
The output is an 3x1 float array.
"""
mtot = mpi.mpi_sum(self.mass.astype(FLOAT))
cmx = mpi.mpi_sum(self.pos[:,0].astype(float64)*self.mass.astype(FLOAT)) / mtot
cmy = mpi.mpi_sum(self.pos[:,1].astype(float64)*self.mass.astype(FLOAT)) / mtot
cmz = mpi.mpi_sum(self.pos[:,2].astype(float64)*self.mass.astype(FLOAT)) / mtot
return array([cmx,cmy,cmz])
def get_histocenter(self,rbox=50,nb=500):
"""
Return the position of the higher density region
in x,y,z (not good)
found by the function "histocenter".
rbox : size of the box
nb : number of bins in each dimension
"""
rm = rbox/2.
bins = arange(-rm,rm,float(2*rm)/float(nb))
# histograms in x,y,z (cut the tail)
hx = mpi.mpi_histogram(self.pos[:,0],bins)[:-1]
hy = mpi.mpi_histogram(self.pos[:,1],bins)[:-1]
hz = mpi.mpi_histogram(self.pos[:,2],bins)[:-1]
# max in each dim
dx = bins[argmax(hx)]
dy = bins[argmax(hy)]
dz = bins[argmax(hz)]
return array([dx,dy,dz])
def get_histocenter2(self,rbox=50,nb=64):
"""
Return the position of the higher density region
in x,y,z (not good)
found by the function "histocenter".
rbox : size of the box
nb : number of bins in each dimension
"""
# transformation -rbox->0, 0->nb/2, rbox->nb
# y = (x+rbox)/(2*rbox)*nb
pos = ( self.pos + [rbox,rbox,rbox] )/(2*rbox) # 0 to 1
pos = pos*[nb,nb,nb] # 0 to nb
pos = pos.astype(float32)
mass = self.mass.astype(float32)
mat = mkmap3d(pos/nb,mass,mass,(nb,nb,nb))
# find max
m = ravel(mat)
arg = argmax(m)
i = indices((nb,nb,nb)) # not that good
ix = ravel(i[0]) # not that good
iy = ravel(i[1]) # not that good
iz = ravel(i[2]) # not that good
ix = ix[arg]
iy = iy[arg]
iz = iz[arg]
# transformation inverse
# x = 2*rbox*(y/nb)-rbox
dx = 2*rbox*(float(ix)/nb)-rbox
dy = 2*rbox*(float(iy)/nb)-rbox
dz = 2*rbox*(float(iz)/nb)-rbox
return array([dx,dy,dz])
def cv(self):
"""
Return the center of the velocities of the model.
The output is an 3x1 float array.
"""
cmx = mpi.mpi_sum(self.vel[:,0]*self.mass) / self.mass_tot
cmy = mpi.mpi_sum(self.vel[:,1]*self.mass) / self.mass_tot
cmz = mpi.mpi_sum(self.vel[:,2]*self.mass) / self.mass_tot
return array([cmx,cmy,cmz])
def minert(self):
"""
Return the diagonal of the intertial momentum.
"""
mx = mpi.mpi_sum(self.pos[:,0]**2 *self.mass) / self.mass_tot
my = mpi.mpi_sum(self.pos[:,1]**2 *self.mass) / self.mass_tot
mz = mpi.mpi_sum(self.pos[:,2]**2 *self.mass) / self.mass_tot
mx = sqrt(mx)
my = sqrt(my)
mz = sqrt(mz)
return array([mx,my,mz])
def inertial_tensor(self):
"""
Return the inertial tensor.
"""
Ixx = mpi.mpi_sum(self.mass * (self.y()**2 + self.z()**2))
Iyy = mpi.mpi_sum(self.mass * (self.x()**2 + self.z()**2))
Izz = mpi.mpi_sum(self.mass * (self.x()**2 + self.y()**2))
Ixy = -mpi.mpi_sum(self.mass * self.x() * self.y())
Ixz = -mpi.mpi_sum(self.mass * self.x() * self.z())
Iyz = -mpi.mpi_sum(self.mass * self.y() * self.z())
I = array( [[Ixx,Ixy,Ixz],[Ixy,Iyy,Iyz],[Ixz,Iyz,Izz]] )
return I
def x_sigma(self):
"""
Return the norm of the position dispersions.
"""
x = (self.pos - self.cm())
x2 = x[:,0]**2 + x[:,1]**2 + x[:,2]**2
x_s2 = mpi.mpi_sum( x2 *self.mass )/self.mass_tot
x_s = sqrt(x_s2)
return x_s
def v_sigma(self):
"""
Return the norm of the velocity dispersions.
"""
v = (self.vel - self.cv())
v2 = v[:,0]**2 + v[:,1]**2 + v[:,2]**2
v_s2 = mpi.mpi_sum( v2 *self.mass )/self.mass_tot
v_s = sqrt(v_s2)
return v_s
def dx_mean(self):
"""
Return the average distance between particles.
"""
# 1) estimate the size of the system
D = self.x_sigma()
# 2) estimate the # of particules per unit volume
n = self.nbody_tot/D
# 3) estimate the average distance between particules
l = 1./n**(1./3.)
return l
def dv_mean(self):
"""
Return the average relative speed between particles.
"""
# 1) estimate the size of the system
D = self.v_sigma()
# 2) estimate the # of particules per unit volume
n = self.nbody_tot/D
# 3) estimate the average distance between particules
l = 1./n**(1./3.)
return l
def Ekin(self):
"""
Return the total kinetic energy
"""
E = 0.5 * mpi.mpi_sum (self.mass * (self.vel[:,0]**2 + self.vel[:,1]**2 + self.vel[:,2]**2) )
return E
def ekin(self):
"""
Return the total specific kinetic energy
"""
E = 0.5 * mpi.mpi_sum ( (self.vel[:,0]**2 + self.vel[:,1]**2 + self.vel[:,2]**2) )
return E
def Epot(self,eps):
"""
Return the total potential energy using the softening lenght eps.
eps : softening
WARNING : THIS FUNCTION DO NOT WORK IN MPI MODE
"""
E = epot(self.pos,self.mass,eps)
return E
def epot(self,eps):
"""
Return the total specific potential energy using the softening lenght eps.
eps : softening
WARNING : THIS FUNCTION DO NOT WORK IN MPI MODE
"""
e = epot(self.pos,self.mass,eps)/self.mass_tot
return e
def L(self):
"""
Return the angular momentum in x,y,z of all particles.
The output is an 3xn float array.
"""
l = amxyz(self.pos,self.vel,self.mass)
return l
def l(self):
"""
Return the specific angular momentum in x,y,z of all particles.
The output is an 3xn float array.
"""
l = samxyz(self.pos,self.vel,self.mass)
return l
def Ltot(self):
"""
Return the total angular momentum.
The output is an 3x1 float array.
"""
l = mpi.mpi_allreduce (am(self.pos,self.vel,self.mass))
#l = mpi.mpi_sum(self.L())
return l
def ltot(self):
"""
Return the specific total angular momentum.
The output is an 3x1 float array.
"""
l = mpi.mpi_allreduce (am(self.pos,self.vel,self.mass))/self.mass_tot
#l = self.Ltot()/self.mass_tot
return l
def Pot(self,x,eps):
"""
Return the potential at a given position, using the softening lenght eps.
x : position (array vector)
eps : softening
"""
if type(x) == ndarray:
p = zeros(len(x),float32)
for i in range(len(x)):
p[i] = mpi.mpi_allreduce ( potential(self.pos,self.mass,array(x[i],float32),eps) )
else:
p = mpi.mpi_allreduce ( potential(self.pos,self.mass,array(x,float32),eps) )
return p
def TreePot(self,pos,eps,Tree=None):
"""
Return the potential at a given position, using the softening lenght eps
and using a tree.
pos : position (array vector)
eps : softening
Tree: gravitational tree if already computed
WARNING : this function do not work in parallel
"""
if Tree==None:
self.Tree = Tree = self.getTree()
pot = Tree.Potential(pos,eps)
return pot
def Accel(self,x,eps):
"""
Return the acceleration at a given position, using the softening lenght eps.
x : position (array vector)
eps : softening
"""
if type(x) == ndarray:
ax = zeros(len(x),float32)
ay = zeros(len(x),float32)
az = zeros(len(x),float32)
for i in range(len(x)):
ax[i],ay[i],az[i] = acceleration(self.pos,self.mass,array(x[i],float32),eps)
a = transpose(array([ax,ay,az],float32))
else:
ax,ay,az = acceleration(self.pos,self.mass,array(x,float32),eps)
ax = mpi.mpi_allreduce ( ax )
ay = mpi.mpi_allreduce ( ay )
az = mpi.mpi_allreduce ( az )
a = array([ax,ay,az],float32)
return a
def TreeAccel(self,pos,eps,Tree=None):
"""
Return the acceleration at a given position, using the softening lenght eps
and using a tree.
pos : position (array vector)
eps : softening
Tree: gravitational tree if already computed
WARNING : this function do not work in parallel
"""
if Tree==None:
self.Tree = Tree = self.getTree()
acc = Tree.Acceleration(pos,eps)
return acc
def tork(self,acc):
"""
Return the total tork on the system due to the force
acting on each particle (acc).
The output is an 3xn float array.
acc : 3xn float array
"""
trk = mpi.mpi_allreduce ( am(self.pos,array(acc,float32),self.mass) )
return trk
def dens(self,r=None,nb=25,rm=50):
"""
Return the number density at radius r (supposing a spherical density distribution).
If r is not specified, it is computed with nb and rm.
The output is an n x 1 float array.
!!! This routine do not use masses !!!
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
xr = sqrt(self.pos[:,0]**2 + self.pos[:,1]**2 + self.pos[:,2]**2)
dens,r = histogram(xr,r)
r1 = r[:-1]
r2 = r[1:]
dv = (4./3.)*pi*(r2**3-r1**3)
dens = dens/dv # surface density
# take the mean
r = (r1+r2)/2
return r,mpi.mpi_allreduce(dens)
def mdens(self,r=None,nb=25,rm=50):
"""
Return the density at radius r (supposing a spherical density distribution).
If r is not specified, it is computed with nb and rm.
The output is an n x 1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
xr = sqrt(self.pos[:,0]**2 + self.pos[:,1]**2 + self.pos[:,2]**2)
dens = whistogram(xr.astype(float),self.mass.astype(float),r.astype(float))
r1 = r[:-1]
r2 = r[1:]
dv = (4./3.)*pi*(r2**3-r1**3)
dens = dens[:-1]/dv # surface density
# take the mean
r = (r1+r2)/2
return r,mpi.mpi_allreduce(dens)
def mr(self,r=None,nb=25,rm=50):
"""
Return the mass inside radius r (supposing a spherical density distribution).
If r is not specified, it is computed with nb and rm.
The output is an n x 1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
xr = self.rxyz()
mr = whistogram(xr.astype(float),self.mass.astype(float),r.astype(float))
mr = add.accumulate(mr)
return r,mpi.mpi_allreduce(mr)
def Mr_Spherical(self,nr=25,rmin=0,rmax=50):
"""
Return the mass inside radius r (supposing a spherical density distribution).
The output is 2 n x 1 float arrays.
nr : number of bins (size of the output)
rmin : minimal radius (this must be zero, instead it is wrong...)
rmax : maximal radius
"""
rmin = float(rmin)
rmax = float(rmax)
shape = (nr,)
val = ones(self.pos.shape).astype(float32)
mass = self.mass.astype(float32)
r = self.rxyz()
r = (r-rmin)/(rmax-rmin)
r = r.astype(float32)
# compute the map
mr = mkmap1d(r,mass,val,shape).astype(float)
# compute the radii
rs = arange(0.,rmax,(rmax-rmin)/nr)
# sum
mr = add.accumulate(mr)
return rs,mpi.mpi_allreduce(mr)
def sdens(self,r=None,nb=25,rm=50):
"""
Return the surface density at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
!!! This routine do not uses masses !!!
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
xr = sqrt(self.pos[:,0]**2 + self.pos[:,1]**2)
sdens,r = histogram(xr,r)
r1 = r[:-1]
r2 = r[1:]
ds = pi*(r2**2-r1**2)
sdens = sdens/ds # surface density
# take the mean
r = (r1+r2)/2.
return r,mpi.mpi_allreduce(sdens)
def msdens(self,r=None,nb=25,rm=50):
"""
Return the mass surface density at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
xr = sqrt(self.pos[:,0]**2 + self.pos[:,1]**2)
sdens = whistogram(xr.astype(float),self.mass.astype(float),r.astype(float))
r1 = r[:-1]
r2 = r[1:]
ds = pi*(r2**2-r1**2)
sdens = sdens[:-1]/ds # surface density
# take the mean
r = (r1+r2)/2.
return r,mpi.mpi_allreduce(sdens)
def sigma_z(self,r=None,nb=25,rm=50):
"""
Return the vertical dispertion in z at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
r,h = self.Histo(r,mode='sz')
return r,h
def sigma_vz(self,r=None,nb=25,rm=50):
"""
Return the vertical dispertion in z at radius r.
If r is not specified, it is computed with nb and rm.
The output is an nx1 float array.
r : radius
nb : number of bins (size of the output)
rm : maximal radius
"""
if r!= None:
r = array(r,float)
else:
rmax = rm
dr = rm/float(nb)
r = arange(0.,rm,dr)
r,h = self.Histo(r,mode='svz')
return r,h
def zprof(self,z=None,r=2.5,dr=0.5,nb=25,zm=5.):
"""
Return the z-profile in a vector for a given radius
!!! This routine works only if particles have equal masses !!!
z : bins in z (optional)
r : radius of the cut
dr : width in r of the cut
nb : number of bins (size of the output)
zm : maximal height
"""
if z!= None:
pass
else:
zmax = zm
dz = 2.*zm/float(nb)
z = arange(-zm,zm,dz)
# select
r1 = r-dr/2.
r2 = r+dr/2.
ann = self.selectc((self.rxy()>r1)*((self.rxy()r1[i])*((self.rxy() 1:
sr.append(vr.std())
st.append(vt.std())
sz.append(vz.std())
mt.append(vt.mean())
else:
sr.append(0.)
st.append(0.)
sz.append(0.)
mt.append(0.)
sr = array(sr,float)
st = array(st,float)
sz = array(sz,float)
mt = array(mt,float)
return r,sr,st,sz,mt
def histovel(self,nb=100,vmin=None,vmax=None,mode='n'):
"""
Return or plot the histrogram of the norm of velocities or of the radial velocities.
The output is a list (r,h) of 2 nx1 float arrays,
where r is the radius and h the values of the histogram.
nb : number of bins (size of the output)
vmax : maximum velocity
vmin : minimum velocity
mode : 'n' (norme of the velocities)
'r' (radial velocities)
"""
if mode == 'r':
v = (self.pos[:,0]*self.vel[:,0] + self.pos[:,1]*self.vel[:,1]) / sqrt(self.pos[:,0]**2+self.pos[:,1]**2)
elif mode == 'n':
v = sqrt(self.vel[:,0]**2 + self.vel[:,1]**2 + self.vel[:,2]**2)
if vmax == None : vmax = mpi.mpi_max(v)
if vmin == None : vmin = mpi.mpi_min(v)
bins = arange(vmin,vmax,(vmax-vmin)/float(nb))
h = mpi.mpi_histogram(v,bins)
return h,bins
def zmodes(self,nr=32,nm=16,rm=32):
"""
Compute the vertical modes of a model
nm = 16 : number of modes
nr = 32 : number of radius
rm = 50 : max radius
return
r : the radius used
m : the modes computed
m1 : the matrix of the amplitude
m2 : the matrix of the phases
"""
ps = arange(-pi,pi+pi/(2.*nm),2*pi/(2.*nm))+pi # phases
R = arange(0,nr+1,1)*float(rm)/nr # radius
Rs = array([],float)
r = self.rxy()
m1 = array([],float)
m2 = array([],float)
# loop over all radius
for i in range(len(R)-1):
c = (r>=R[i])*(r<=R[i+1])
an = self.selectc(c)
if sum(c.astype(int))<=1:
#print "less than 1 particle in the coupe",R[i]
amp = zeros(len(ps)/2).astype(float)
m1 = concatenate((m1,amp))
m2 = concatenate((m2,amp))
continue
x = an.pos[:,0]
y = an.pos[:,1]
z = an.pos[:,2]
t = arctan2(y,x)+pi
zm = []
ok = 0
for j in range(len(ps)-1):
c = (t>=ps[j])*(t=R[i])*(r<=R[i+1])
an = self.selectc(c)
if sum(c.astype(int))<=1:
#print "less than 1 particle in the coupe",R[i]
amp = zeros(len(ps)/2).astype(float)
m1 = concatenate((m1,amp))
m2 = concatenate((m2,amp))
continue
x = an.pos[:,0]
y = an.pos[:,1]
z = an.pos[:,2]
t = arctan2(y,x)+pi
dm = []
ok = 0
for j in range(len(ps)-1):
c = (t>=ps[j])*(t [0,boxsize]
centred : -> [-boxsize/2,boxsize/2]
[x,y,z] :
"""
if boxsize==None:
if self.has_var('boxsize'):
boxsize = self.boxsize
if boxsize != None:
if mode == None:
self.pos[:,0] = where((self.pos[:,0]<0.0 ),self.pos[:,0]+boxsize,self.pos[:,0])
self.pos[:,1] = where((self.pos[:,1]<0.0 ),self.pos[:,1]+boxsize,self.pos[:,1])
self.pos[:,2] = where((self.pos[:,2]<0.0 ),self.pos[:,2]+boxsize,self.pos[:,2])
self.pos[:,0] = where((self.pos[:,0]>boxsize),self.pos[:,0]-boxsize,self.pos[:,0])
self.pos[:,1] = where((self.pos[:,1]>boxsize),self.pos[:,1]-boxsize,self.pos[:,1])
self.pos[:,2] = where((self.pos[:,2]>boxsize),self.pos[:,2]-boxsize,self.pos[:,2])
elif mode=='centred':
self.pos[:,0] = where((self.pos[:,0]<=-boxsize/2.),self.pos[:,0]+boxsize,self.pos[:,0])
self.pos[:,1] = where((self.pos[:,1]<=-boxsize/2.),self.pos[:,1]+boxsize,self.pos[:,1])
self.pos[:,2] = where((self.pos[:,2]<=-boxsize/2.),self.pos[:,2]+boxsize,self.pos[:,2])
self.pos[:,0] = where((self.pos[:,0]> boxsize/2.),self.pos[:,0]-boxsize,self.pos[:,0])
self.pos[:,1] = where((self.pos[:,1]> boxsize/2.),self.pos[:,1]-boxsize,self.pos[:,1])
self.pos[:,2] = where((self.pos[:,2]> boxsize/2.),self.pos[:,2]-boxsize,self.pos[:,2])
elif (type(mode)==ndarray) or (type(mode)==types.ListType):
self.pos[:,0] = where((self.pos[:,0]<=mode[0]-boxsize/2.),self.pos[:,0]+boxsize,self.pos[:,0])
self.pos[:,1] = where((self.pos[:,1]<=mode[1]-boxsize/2.),self.pos[:,1]+boxsize,self.pos[:,1])
self.pos[:,2] = where((self.pos[:,2]<=mode[2]-boxsize/2.),self.pos[:,2]+boxsize,self.pos[:,2])
self.pos[:,0] = where((self.pos[:,0]> mode[0]+boxsize/2.),self.pos[:,0]-boxsize,self.pos[:,0])
self.pos[:,1] = where((self.pos[:,1]> mode[1]+boxsize/2.),self.pos[:,1]-boxsize,self.pos[:,1])
self.pos[:,2] = where((self.pos[:,2]> mode[2]+boxsize/2.),self.pos[:,2]-boxsize,self.pos[:,2])
def rotate_old(self,angle=0,mode='a',axis='x'):
"""
Rotate the positions and/or the velocities of the object around a specific axis.
angle : rotation angle in radian
axis : 'x' : around x
'y' : around y
'z' : around z
: [x,y,z] : around this axis
mode : 'p' : rotate only position
'v' : rotate only velocities
'a' : rotate both (default)
"""
if type(axis) == type('a'): # rotate around x,y or z
if axis =='x':
if mode=='p' or mode=='a':
self.pos=rotx(angle,self.pos)
if mode=='v' or mode=='a':
self.vel=rotx(angle,self.vel)
elif axis =='y':
if mode=='p' or mode=='a':
self.pos=roty(angle,self.pos)
if mode=='v' or mode=='a':
self.vel=roty(angle,self.vel)
elif axis =='z':
if mode=='p' or mode=='a':
self.pos=rotz(angle,self.pos)
if mode=='v' or mode=='a':
self.vel=rotz(angle,self.vel)
else: # rotate around a given axis
# construction of the rotation matrix
nxy = sqrt(axis[0]**2+axis[1]**2)
theta_x = angle
theta_z = 2.*pi - arctan2(axis[1],axis[0])
theta_y = arctan2(axis[2],nxy)
if mode=='p' or mode=='a':
# rot in z
self.pos=rotz(theta_z,self.pos)
# rot in y
self.pos=roty(theta_y,self.pos)
# rot in x
self.pos=rotx(theta_x,self.pos)
# rot in -y
self.pos=roty(-theta_y,self.pos)
# rot in -z
self.pos=rotz(-theta_z,self.pos)
if mode=='v' or mode=='a':
# rot in z
self.vel=rotz(theta_z,self.vel)
# rot in y
self.vel=roty(theta_y,self.vel)
# rot in x
self.vel=rotx(theta_x,self.vel)
# rot in -y
self.vel=roty(-theta_y,self.vel)
# rot in -z
self.vel=rotz(-theta_z,self.vel)
def rotate(self,angle=0,axis=[1,0,0],point=[0,0,0],mode='a'):
"""
Rotate the positions and/or the velocities of the object around a specific axis
defined by a vector and an point.
angle : rotation angle in radian
axis : direction of the axis
point : center of the rotation
mode : 'p' : rotate only position
'v' : rotate only velocities
'a' : rotate both (default)
"""
if axis=='x':
axis = array([1,0,0],float)
elif axis=='y':
axis = array([0,1,0],float)
elif axis=='z':
axis = array([0,0,1],float)
x = self.pos
v = self.vel
# center point
x = x-point
# construction of the rotation matrix
norm = sqrt(axis[0]**2 + axis[1]**2 + axis[2]**2)
if norm == 0:
return x
sn = sin(-angle/2.)
e0 = cos(-angle/2.)
e1 = axis[0]*sn/norm
e2 = axis[1]*sn/norm
e3 = axis[2]*sn/norm
a = zeros((3,3),float)
a[0,0] = e0**2 + e1**2 - e2**2 - e3**2
a[1,0] = 2.*(e1*e2 + e0*e3)
a[2,0] = 2.*(e1*e3 - e0*e2)
a[0,1] = 2.*(e1*e2 - e0*e3)
a[1,1] = e0**2 - e1**2 + e2**2 - e3**2
a[2,1] = 2.*(e2*e3 + e0*e1)
a[0,2] = 2.*(e1*e3 + e0*e2)
a[1,2] = 2.*(e2*e3 - e0*e1)
a[2,2] = e0**2 - e1**2 - e2**2 + e3**2
a = a.astype(float)
# multiply x and v
if mode=='p':
x = dot(x,a)
elif mode=='v':
v = dot(v,a)
else:
x = dot(x,a)
v = dot(v,a)
# decenter point
x = x+point
self.pos = x.astype(float32)
self.vel = v.astype(float32)
def rotateR(self,R,mode='a'):
"""
Rotate the model using the matrix R
mode : 'p' : only position
'v' : only velocities
'a' : both (default)
"""
# multiply x and v
if mode=='p':
self.pos = dot(self.pos,R)
elif mode=='v':
self.vel = dot(self.vel,R)
else:
self.pos = dot(self.pos,R)
self.vel = dot(self.vel,R)
def get_rotation_matrix_to_align_with_main_axis(self):
"""
Get the rotation matrix used to rotate the object in order to align
it's main axis with the axis of its inertial tensor.
"""
# compute inertial tensor
I = self.inertial_tensor()
# find eigen values and vectors
val,vec =linalg.eig(I)
l1 = val[0]
l2 = val[1]
l3 = val[2]
a1 = vec[:,0]
a2 = vec[:,1]
a3 = vec[:,2]
# find Rm such that Rm*1,0,0 = a1
# that Rm*0,1,0 = a2
# that Rm*0,0,1 = a3
Rm = transpose(array([a1,a2,a3]))
return Rm
def align_with_main_axis(self,mode='a'):
"""
Rotate the object in order to align it's major axis with
the axis of its inertial tensor.
mode : 'p' : only position
'v' : only velocities
'a' : both (default)
"""
# find rotation matrix
R = self.get_rotation_matrix_to_align_with_main_axis()
# apply it
self.rotateR(R,mode)
def align(self,axis,mode='a',sgn='+',fact=None):
"""
Rotate the object in order to align the axis 'axis' with the z axis.
axis : [x,y,z]
mode : 'p' : only position
'v' : only velocities
'a' : both (default)
sgn : '+' : normal rotation
'-' : reverse sense of rotation
fact : int : factor to increase the angle
"""
n = [axis[1], -axis[0],0.]
theta = arccos(axis[2]/sqrt(axis[0]**2+axis[1]**2+axis[2]**2))
if sgn =='-': theta = -theta
if fact != None: theta = theta*fact
self.rotate(angle=theta,mode=mode,axis=n)
def align2(self,axis1=[1,0,0],axis2=[0,0,1],point=[0,0,0]):
'''
Rotate the object in order to align the axis 'axis' with the z axis.
axis1 : [x,y,z]
axis2 : [x,y,z]
point : [x,y,z]
'''
a1 = array(axis1,float)
a2 = array(axis2,float)
a3 = array([0,0,0],float)
a3[0] = a1[1]*a2[2] - a1[2]*a2[1]
a3[1] = a1[2]*a2[0] - a1[0]*a2[2]
a3[2] = a1[0]*a2[1] - a1[1]*a2[0]
n1 = sqrt(a1[0]**2 + a1[1]**2 + a1[2]**2)
n2 = sqrt(a2[0]**2 + a2[1]**2 + a2[2]**2)
angle = arccos(inner(a1,a2)/(n1*n2))
self.rotate(angle=angle,axis=a3,point=point)
def spin(self,omega=None,L=None,j=None,E=None):
"""
Spin the object with angular velocity "omega" (rigid rotation).
Omega is a 1 x 3 array object
If L (total angular momentum) is explicitely given, compute Omega from L (1 x 3 array object).
omega : angular speed (array vector)
L : desired angular momentum
j : desired energy fraction in rotation
E : Total energy (without rotation)
"""
# do nothing
if L==None and omega==None and j==None:
pass
# use j and E (spin around z axis)
if j!=None:
if E==None:
"spin : print you must give E"
else:
if (j > 1):
self.log.write("spin : j must be less than 1")
sys.exit()
Erot = j*E/(1-j)
omega = sqrt(2*Erot/mpi_sum(self.mass*self.rxy()**2) )
omega = array([0,0,omega],float32)
self.vel=spin(self.pos,self.vel,omega)
# use omega
elif L==None and omega!=None:
omega = array(omega,float32)
self.vel=spin(self.pos,self.vel,omega)
# use L
# Pfenniger 93
elif L!=None:
L = array(L,float32)
aamx = L[0]
aamy = L[1]
aamz = L[2]
x = self.pos[:,0]
y = self.pos[:,1]
z = self.pos[:,2]
vx = self.vel[:,0]
vy = self.vel[:,1]
vz = self.vel[:,2]
m = self.mass
Ixy = sum(m*x*y)
Iyz = sum(m*y*z)
Izx = sum(m*z*x)
Ixx = sum(m*x*x)
Iyy = sum(m*y*y)
Izz = sum(m*z*z)
Axx = Iyy+Izz
Ayy = Izz+Ixx
Azz = Ixx+Iyy
Axy = -Ixy
Ayz = -Iyz
Azx = -Izx
D = Axx*Ayy*Azz + 2*Axy*Ayz*Azx - Axx*Ayz**2 - Ayy*Azx**2 - Azz*Axy**2
DLX = sum(m*(y*vz-z*vy))-aamx
DLY = sum(m*(z*vx-x*vz))-aamy
DLZ = sum(m*(x*vy-y*vx))-aamz
Bxx = Ayy*Azz - Ayz**2
Byy = Azz*Axx - Azx**2
Bzz = Axx*Ayy - Axy**2
Bxy = Azx*Ayz - Axy*Azz
Byz = Axy*Azx - Ayz*Axx
Bzx = Ayz*Axy - Azx*Ayy
omega = array([0,0,0],float32)
omega[0] = -(Bxx*DLX + Bxy*DLY + Bzx*DLZ)/D
omega[1] = -(Bxy*DLX + Byy*DLY + Byz*DLZ)/D
omega[2] = -(Bzx*DLX + Byz*DLY + Bzz*DLZ)/D
self.vel=spin(self.pos,self.vel,omega)
#################################
#
# selection of particles
#
#################################
def selectc(self,c,local=False):
"""
Return an N-body object that contain only particles where the
corresponding value in c is not zero.
c is a nx1 Nbody array.
c : the condition vector
local : local selection (True) or global selection (False)
"""
new = Nbody(status='new',ftype=self.ftype[6:],local=local)
# now, copy all var linked to the model
for name in self.get_list_of_vars():
setattr(new, name, getattr(self,name))
# here, we create ptype on the fly (used to create new.npart)
#self.ptype = array([],int)
#for i in range(len(self.npart)):
# self.ptype = concatenate( (self.ptype,ones(self.npart[i])*i) )
# now, copy and compress all array linked to the model
for name in self.get_list_of_array():
vec = getattr(self,name)
setattr(new, name, compress(c,vec,axis=0))
# now, compute new.npart
#new.npart = array([],int)
#for i in range(len(self.npart)):
# c = (new.tpe==i)
# npart_i = sum(c.astype(int))
# new.npart = concatenate( (new.npart, npart_i ) )
# check
#if len(new.pos)!= sum(new.npart):
# pass
# other vars
new.init()
return new
def selecti(self,i,local=False):
"""
Return an N-body object that contain only particles having
their index (not id) in i.
i : vector containing indexes
local : local selection (True) or global selection (False)
"""
new = Nbody(status='new',ftype=self.ftype[6:],local=local)
# now, copy all var linked to the model
for name in self.get_list_of_vars():
setattr(new, name, getattr(self,name))
# here, we create ptype on the fly (used to create new.npart)
#self.ptype = array([],int)
#for i in range(len(self.npart)):
# self.ptype = concatenate( (self.ptype,ones(self.npart[i])*i) )
# now, copy and compress all array linked to the model
for name in self.get_list_of_array():
vec = getattr(self,name)
setattr(new, name, vec[i])
# now, compute new.npart
#new.npart = array([],int)
#for i in range(len(self.npart)):
# c = (new.tpe==i)
# npart_i = sum(c.astype(int))
# new.npart = concatenate( (new.npart, npart_i ) )
# check
#if len(new.pos)!= sum(new.npart):
# pass
# other vars
new.init()
return new
def select(self,i=0):
"""
Return an N-body object that contain only particles of type i
"""
import types
if type(i)== int:
return self.selectc(self.tpe==i)
elif type(i)==types.ListType:
types = i
for j in types:
c = c * (j==self.tpe)
return self.selectc(c)
else:
return self
def sub(self,n1=0,n2=None):
"""
Return an N-body object that have particles whith indicies in the range [n1:n2].
n1 : number of the first particule
n2 : number of the last particule
Note : the first particle is 0
"""
if n1 == None:
n1 = 0
if n2 == None:
n2 = self.nbody
if n2 <= n1:
n2 = n1+1
num = arange(self.nbody)
return self.selectc((num>=n1)*(num<=n2))
def reduc(self,n,mass=False):
"""
Return an N-body object that contain a fraction 1/n of particles.
n : inverse of the fraction of particule to be returned
"""
c = where(fmod(arange(self.nbody),n).astype(int)==0,1,0)
nb = self.selectc(c)
if mass:
nb.mass = nb.mass * n
return nb
def selectp(self,lst=None,file=None,reject=False,local=False,from_num=True):
"""
Return an N-body object that contain only particles with specific number id.
The list of id's is given either by lst (nx1 int array) or
by the name ("file") of a file containing the list of id's.
lst : vector list (integer)
reject : True/False : if True, reject particles in lst (default = False)
local : local selection (True) or global selection (False)
frum_num : if True, use self.num to select particules
if False, use arange(self.nbody)
"""
if lst != None:
lst = array(lst,int)
if file != None:
lst = []
f = open(file)
while 1:
try:
lst.append(int(string.split(f.readline())[0]))
except:
break
f.close()
lst = array(lst,int)
# 1) sort the list
ys = sort(lst)
# 2) sort index in current file
if from_num:
xs = sort(self.num)
zs = take(arange(self.nbody),argsort(self.num)) # sort 0,1,2,n following xs (or self.num)
else:
xs = arange(self.nbody)
# 3) apply mask on sorted lists (here, getmask need xs and ys to be sorted)
m = getmask(xs.astype(int),ys.astype(int))
if reject:
m = logical_not(m)
# 4) revert mask, following zs inverse transformation
if from_num:
c = take(m,argsort(zs))
else:
c = m
new = self.selectc(c,local=local)
return new
def getindex(self,num):
"""
Return an array of index of a particle from its specific number id.
The array is empty if no particle corresponds to the specific number id.
num : Id of the particle
"""
idx = compress((self.num == num),arange(self.nbody))
if len(idx)==1:
return idx[0]
else:
return idx
#################################
#
# add particles
#
#################################
def append(self,solf,do_not_sort=False):
"""
Add to the current N-body object, particles form the
N-body object "new".
solf : Nbody object
"""
if solf.ftype != self.ftype:
raise "append Error","files have different type"
return
if solf.get_list_of_array() != self.get_list_of_array():
raise "append Error","files have different arrays"
return
# loop over all types
self_npart = self.npart
solf_npart = solf.npart
if len(self_npart) != len(self_npart):
print "append : files have different mxnpart !"
sys.exit()
# add array linked to the model
names = self.get_list_of_array()
for name in names:
vec1 = getattr(self,name)
vec2 = getattr(solf,name)
'''
vec = array([],float32)
if vec1.ndim == 1:
vec.shape = (0,)
else:
vec.shape = (0,3)
# here, we guarantee the order of particles according to npart
for i in arange(len(self_npart)):
e11 = sum((arange(len(self_npart)) < i) * self_npart,0)
e21 = sum((arange(len(solf_npart)) < i) * solf_npart,0)
vec = concatenate((vec,vec1[e11:e11+self_npart[i]],vec2[e21:e21+solf_npart[i]]))
'''
vec = concatenate((vec1,vec2))
setattr(self, name, vec)
# here, we sort the particles, according to tpe
if do_not_sort:
pass
else:
sequence = self.tpe.argsort()
for name in names:
vec = getattr(self,name)
vec = take(vec,sequence,axis=0)
setattr(self, name, vec)
self.nbody = self.nbody + solf.nbody
self.npart = self.get_npart() # needed by self.get_num()
self.npart_tot = self.get_npart_tot() # needed by self.get_num()
self.num = self.get_num()
self.init()
def __add__(self,solf,do_not_sort=False):
# first copy self
new = deepcopy(self)
# now, add solf
new.append(solf,do_not_sort)
return new
#################################
#
# sort particles
#
#################################
def sort(self):
'''
sort particles according to their num variable
'''
new = Nbody(status='new',ftype=self.ftype[6:])
sequence = argsort(self.num)
# now, copy all var linked to the model
for name in self.get_list_of_vars():
setattr(new, name, getattr(self,name))
# add array linked to the model
for name in self.get_list_of_array():
setattr(new, name, take(getattr(self,name),sequence,axis=0))
new.num = new.get_num()
new.init()
return new
def sort_type(self):
'''
Contrary to sort, this fonction sort particles
respecting their type.
'''
new = Nbody(status='new',ftype=self.ftype[6:])
# now, copy all var linked to the model
for name in self.get_list_of_vars():
setattr(new, name, getattr(self,name))
# add array linked to the model
for name in self.get_list_of_array():
#vec = take(getattr(self,name),sequence,axis=0)
vec = array([],float32)
vec1 = getattr(self,name)
if vec1.ndim == 1:
vec.shape = (0,)
else:
vec.shape = (0,3)
# loop over all types
npart = self.npart
for i in arange(len(npart)):
e11 = sum((arange(len(npart)) < i) * npart)
sequence = argsort(self.num[e11:e11+npart[i]])
vec = concatenate((vec,take(vec1[e11:e11+npart[i]],sequence,axis=0)))
setattr(new, name, vec)
new.num = new.get_num()
new.init()
return new
#################################
#
# Tree and SPH functions
#
#################################
def InitSphParameters(self,DesNumNgb=33,MaxNumNgbDeviation=3):
self.DesNumNgb = DesNumNgb
self.MaxNumNgbDeviation = MaxNumNgbDeviation
self.Density = None
self.Hsml = None
if not self.has_var('Tree'):
self.Tree = None
def setTreeParameters(self,Tree,DesNumNgb,MaxNumNgbDeviation):
if Tree==None:
self.Tree = Tree = self.getTree()
if DesNumNgb==None:
DesNumNgb = self.DesNumNgb
else:
self.DesNumNgb = DesNumNgb
if MaxNumNgbDeviation==None:
MaxNumNgbDeviation = self.MaxNumNgbDeviation
else:
self.MaxNumNgbDeviation = MaxNumNgbDeviation
return Tree,DesNumNgb,MaxNumNgbDeviation
def getTree(self,force_computation=False,ErrTolTheta=0.8):
'''
Return a Tree object
'''
if self.Tree!=None and force_computation==False:
return self.Tree
else:
print "create the tree : ErrTolTheta=",ErrTolTheta
# decide if we use tree or ptree
npart = array(self.npart)
if mpi.mpi_NTask()>1:
print "%d : use ptree"%(mpi.mpi_ThisTask())
self.Tree = ptreelib.Tree(npart=npart,pos=self.pos,vel=self.vel,mass=self.mass,num=self.num,tpe=self.tpe)
else:
self.Tree = treelib.Tree(npart=npart,pos=self.pos,vel=self.vel,mass=self.mass,ErrTolTheta=ErrTolTheta)
return self.Tree
def get_rsp_approximation(self,DesNumNgb=None,MaxNumNgbDeviation=None,Tree=None):
'''
Return an aproximation of rsp, based on the tree.
'''
Tree,DesNumNgb,MaxNumNgbDeviation = self.setTreeParameters(Tree,DesNumNgb,MaxNumNgbDeviation)
return Tree.InitHsml(DesNumNgb,MaxNumNgbDeviation)
def ComputeSph(self,DesNumNgb=None,MaxNumNgbDeviation=None,Tree=None):
'''
Compute self.Density and self.Hsml using sph approximation
'''
Tree,DesNumNgb,MaxNumNgbDeviation = self.setTreeParameters(Tree,DesNumNgb,MaxNumNgbDeviation)
if self.Hsml==None:
if not self.has_array('rsp'):
self.Hsml = self.get_rsp_approximation(DesNumNgb,MaxNumNgbDeviation,Tree)
else:
self.Hsml=self.rsp
self.Density,self.Hsml = Tree.Density(self.pos,self.Hsml,DesNumNgb,MaxNumNgbDeviation)
def ComputeDensityAndHsml(self,pos=None,Hsml=None,DesNumNgb=None,MaxNumNgbDeviation=None,Tree=None):
'''
Compute Density and Hsml (for a specific place)
'''
Tree,DesNumNgb,MaxNumNgbDeviation = self.setTreeParameters(Tree,DesNumNgb,MaxNumNgbDeviation)
if pos==None:
pos = self.pos
if Hsml==None:
Hsml = ones(len(pos)).astype(float32)
Density,Hsml = Tree.Density(pos,Hsml,DesNumNgb,MaxNumNgbDeviation)
return Density,Hsml
def SphEvaluate(self,val,pos=None,vel=None,hsml=None,DesNumNgb=None,MaxNumNgbDeviation=None,Tree=None):
'''
Return an sph evaluation of the variable var
'''
Tree,DesNumNgb,MaxNumNgbDeviation = self.setTreeParameters(Tree,DesNumNgb,MaxNumNgbDeviation)
if pos == None:
pos = self.pos
if vel == None:
vel = self.vel
if hsml == None:
if self.Hsml==None:
if not self.has_array('rsp'):
self.Hsml = self.get_rsp_approximation(DesNumNgb,MaxNumNgbDeviation,Tree)
else:
self.Hsml=self.rsp
hsml = self.Hsml
if self.Density==None:
if not self.has_array('rho'):
self.Density = self.SphDensity(DesNumNgb,MaxNumNgbDeviation,Tree)
else:
self.Density=self.rho
if type(val) == ndarray:
val = Tree.SphEvaluate(pos,hsml,self.Density,val,DesNumNgb,MaxNumNgbDeviation)
else:
if val =='div':
val = Tree.SphEvaluateDiv(pos,vel,hsml,self.Density,DesNumNgb,MaxNumNgbDeviation)
elif val =='rot':
val = Tree.SphEvaluateRot(pos,vel,hsml,self.Density,DesNumNgb,MaxNumNgbDeviation)
elif val =='ngb':
val = Tree.SphEvaluateNgb(pos,hsml,DesNumNgb,MaxNumNgbDeviation)
return val
#################################
#
# sph functions
#
#################################
def weighted_numngb(self,num):
'''
num = particle where to compute weighted_numngb
see Springel 05
'''
def wk1(hinv3,u):
KERNEL_COEFF_1=2.546479089470
KERNEL_COEFF_2=15.278874536822
wk = hinv3 * (KERNEL_COEFF_1 + KERNEL_COEFF_2 * (u - 1) * u * u)
return wk
def wk2(hinv3,u):
KERNEL_COEFF_5=5.092958178941
wk = hinv3 * KERNEL_COEFF_5 * (1.0 - u) * (1.0 - u) * (1.0 - u)
return wk
def getwk(r,h):
# we do not exclude the particle itself
u = r/h
hinv3 = 1./h**3
wk = where((u<0.5),wk1(hinv3,u),wk2(hinv3,u))
wk = where((r1:
list_of_array = self.get_list_of_array()
# loop over all particles type
npart = self.npart
new_npart = npart
for i in range(len(npart)):
#if i==0:
nparts = mpi.mpi_allgather(npart[i])
nparts = array(nparts)
if mpi.mpi_IsMaster():
ex_table = mpi.mpi_GetExchangeTable(nparts)
ex_table = mpi.mpi_bcast(ex_table,0)
else:
ex_table = None
ex_table = mpi.mpi_bcast(ex_table,0)
# send particles
for toTask in range(mpi.NTask):
if ex_table[mpi.ThisTask,toTask] > 0:
n_elt = ex_table[mpi.ThisTask,toTask]
#print "%d send %d to %d"%(mpi.ThisTask,n_elt,toTask)
# first_elt = first elt of the current block
first_elt = sum((arange(len(new_npart)) < i) * new_npart)
# update npart
new_npart[i] = new_npart[i] - n_elt
# loop over all vect erd,mass,num,pos,rho,rsp,u,vel
for name in list_of_array:
vec = getattr(self,name)
sub_vec = vec[first_elt:first_elt+n_elt]
if len(sub_vec) != n_elt:
print "redistribute error :"
print "node %d should send len=%d got len=%d"%(mpi.ThisTask,n_elt,len(sub_vec))
sys.exit()
mpi.mpi_send(name,toTask)
mpi.mpi_send(sub_vec,toTask)
#self.pos = concatenate( (self.pos[:first_elt],self.pos[first_elt+n_elt:]) )
setattr(self, name, concatenate( (vec[:first_elt],vec[first_elt+n_elt:]) ) )
# recieve particles
for fromTask in range(mpi.NTask):
if ex_table[fromTask,mpi.ThisTask] > 0:
n_elt = ex_table[fromTask,mpi.ThisTask]
#print "%d get %d from %d"%(mpi.ThisTask,n_elt,fromTask)
# first_elt = first elt of the current block
first_elt = sum((arange(len(new_npart)) < i) * new_npart)
# update npart
new_npart[i] = new_npart[i] + n_elt
# loop over all vect
for name in list_of_array:
# first, check name
send_name = mpi.mpi_recv(fromTask)
if send_name != name:
raise "Task %d FromTask %d, %s != %s"%(mpi.mpi_ThisTask(),fromTask,send_name,name)
vec = getattr(self,name)
sub_vec = mpi.mpi_recv(fromTask)
if len(sub_vec) != n_elt:
print "redistribute error :"
print "node %d should recive len=%d got len=%d"%(mpi.ThisTask,n_elt,len(sub_vec))
sys.exit()
#self.pos = concatenate( (vec[:first_elt],sub_vec,vec[first_elt:]) )
setattr(self, name, concatenate( (vec[:first_elt],sub_vec,vec[first_elt:]) ) )
self.init()
def ExchangeParticles(self):
'''
Exchange particles betwee procs, using peano-hilbert decomposition computed in ptree
'''
if self.Tree==None:
self.Tree = self.getTree()
# get num and procs from the Tree
num,procs = self.Tree.GetExchanges()
# compute the transition table T
H,bins = histogram(procs,arange(mpi.mpi_NTask()))
T = mpi.mpi_AllgatherAndConcatArray(H)
T.shape = (mpi.mpi_NTask(),mpi.mpi_NTask())
# loop over all numpy vectors
list_of_array = self.get_list_of_array()
# loop over all vect
for name in list_of_array:
if name != "num":
setattr(self, name, mpi.mpi_ExchangeFromTable(T,procs,num,getattr(self,name),copy(self.num)) )
# do num at the end
self.num = mpi.mpi_ExchangeFromTable(T,procs,num,self.num,copy(self.num))
self.init()
def SendAllToAll(self):
'''
Send all particles to all nodes
at the end of the day, all nodes have the same nbody object
'''
nbs = []
for i in xrange(mpi.NTask-1):
prev = (mpi.ThisTask-i-1)%mpi.NTask
next = (mpi.ThisTask+i+1)%mpi.NTask
nbs.append(mpi.mpi_sendrecv(self,dest=next,source=prev))
for nbi in nbs:
self = self + nbi
return self
#################################
#
# specific parallel functions
#
#################################
def gather_pos(self):
'''
Gather in a unique array all positions of all nodes.
'''
return self.gather_vec(self.pos)
def gather_vel(self):
'''
Gather in a unique array all velocites of all nodes.
'''
return self.gather_vec(self.vel)
def gather_mass(self):
'''
Gather in a unique array all mass of all nodes.
'''
return self.gather_vec(self.mass)
def gather_num(self):
'''
Gather in a unique array all num of all nodes.
'''
return self.gather_vec(self.num)
def gather_vec(self,vec):
'''
Gather in a unique array all vectors vec of all nodes.
'''
# here, we assume that we have a vector npart
# giving the number of particles per type
vec_all = array([],vec.dtype)
if vec.ndim==1:
vec_all.shape = (0,)
else:
vec_all.shape = (0,vec.shape[1])
i1 = 0
npart = self.npart
for i in range(len(npart)):
i2 = i1 + npart[i]
if (i1!=i2):
vec_all = concatenate((vec_all,mpi.mpi_AllgatherAndConcatArray(vec[i1:i2])))
i1 = i1 + npart[i]
return vec_all
#################################
#
# graphical operations
#
#################################
def display(self,*arg,**kw):
'''
Display the model
'''
if kw.has_key('palette'):
palette = kw['palette']
else:
palette = None
if kw.has_key('save'):
save = kw['save']
else:
save = None
if kw.has_key('marker'):
marker = kw['marker']
else:
marker = None
params = extract_parameters(arg,kw,self.defaultparameters)
mat,matint,mn_opts,mx_opts,cd_opts = self.Map(params)
if mpi.mpi_IsMaster():
if save != None:
if os.path.splitext(save)[1] == ".fits":
io.WriteFits(transpose(mat).astype(float32),save, None)
return
if palette!=None:
mplot(matint,palette=palette,save=save,marker=marker)
else:
mplot(matint,save=save,marker=marker)
def show(self,*arg,**kw):
'''
Display the model
this is an alias to display
'''
self.display(*arg,**kw)
def Map(self,*arg,**kw):
'''
Return 2 final images (float and int)
'''
params = extract_parameters(arg,kw,self.defaultparameters)
mn_opts = []
mx_opts = []
cd_opts = []
if self.nbody==0 and mpi.mpi_NTask()==1:
mat = zeros(params['shape'],float32)
matint = mat.astype(int)
mn_opts.append(params['mn'])
mx_opts.append(params['mx'])
cd_opts.append(params['cd'])
return mat,matint,mn_opts,mx_opts,cd_opts
# compute map
mat = self.CombiMap(params)
# set ranges
matint,mn_opt,mx_opt,cd_opt = set_ranges(mat,scale=params['scale'],cd=params['cd'],mn=params['mn'],mx=params['mx'])
mn_opts.append(mn_opt)
mx_opts.append(mx_opt)
cd_opts.append(cd_opt)
# add contour
if params['l_color'] != 0:
matint = contours(mat,matint,params['l_n'],params['l_min'],params['l_max'],params['l_kx'],params['l_ky'],params['l_color'],params['l_crush'])
# add box and ticks
if params['b_weight'] != 0:
matint = add_box(matint,shape=params['shape'],size=params['size'],center=None,box_opts=(params['b_weight'],params['b_xopts'],params['b_yopts'],params['b_color']))
return mat,matint,mn_opts,mx_opts,cd_opts
def CombiMap(self,*arg,**kw):
'''
Return an image in form of a matrix (nx x ny float array).
Contrary to ComputeMap, CombiMap compose different output of ComputeMap.
pos : position of particles (moment 0)
sr : dispertion in r (with respect to xp)
svr : dispertion in vr
vxyr : mean velocity in the plane
svxyr: dispertion in vxy
vtr : mean tangential velocity in the plane
svtr : dispertion in vt
szr : ratio sigma z/sigma r
'''
params = extract_parameters(arg,kw,self.defaultparameters)
mode = params['mode']
#if mode == 'pos':
# mat = self.ComputeMap(params)
if mode == 'm':
mat = self.ComputeMap(params)
elif mode == 'sr':
mat = self.ComputeSigmaMap(params,mode1='r',mode2='r2')
elif mode == 'svr':
mat = self.ComputeSigmaMap(params,mode1='vr',mode2='vr2')
elif mode == 'svxyr':
mat = self.ComputeSigmaMap(params,mode1='vxyr',mode2='vxyr2')
elif mode == 'svtr':
mat = self.ComputeSigmaMap(params,mode1='vtr',mode2='vtr2')
elif mode == 'szr': # could be simplified
m0 = self.ComputeMap(params,mode='m')
m1 = self.ComputeMap(params,mode='vr')
m2 = self.ComputeMap(params,mode='vr2')
m1 = where(m0==0,0,m1)
m2 = where(m0==0,0,m2)
m0 = where(m0==0,1,m0)
mat = m2/m0 - (m1/m0)**2
mat_sz = sqrt(numclip(mat,0,1e10))
m0 = self.ComputeMap(params,mode='m')
m1 = self.ComputeMap(params,mode='vxyr')
m2 = self.ComputeMap(params,mode='vxyr2')
m1 = where(m0==0,0,m1)
m2 = where(m0==0,0,m2)
m0 = where(m0==0,1,m0)
mat = m2/m0 - (m1/m0)**2
mat_sr = sqrt(numclip(mat,0,1e10))
mat_sz = where(mat_sr==0,0,mat_sz)
mat_sr = where(mat_sr==0,1,mat_sr)
mat = mat_sz/mat_sr
elif mode == 'lum':
mat = self.ComputeMap(params,mode='lum')
else:
mat = self.ComputeMeanMap(params,mode1=mode)
return mat
def ComputeMeanMap(self,*arg,**kw):
"""
Compute the mean map of an observable.
"""
params = extract_parameters(arg,kw,self.defaultparameters)
if kw.has_key('mode1'):
mode1 = kw['mode1']
else:
raise "ComputeMeanMap :","you must give parameter mode1"
m0 = self.ComputeMap(params,mode='0')
m1 = self.ComputeMap(params,mode=mode1)
m1 = where(m0==0,0,m1)
m0 = where(m0==0,1,m0)
mat = m1/m0
return mat
def ComputeSigmaMap(self,*arg,**kw):
"""
Compute the sigma map of an observable.
"""
params = extract_parameters(arg,kw,self.defaultparameters)
if kw.has_key('mode1'):
mode1 = kw['mode1']
else:
raise "ComputeMeanMap","you must give parameter mode1"
if kw.has_key('mode2'):
mode2 = kw['mode2']
else:
raise "ComputeMeanMap","you must give parameter mode2"
m0 = self.ComputeMap(params,mode='0')
m1 = self.ComputeMap(params,mode=mode1)
m2 = self.ComputeMap(params,mode=mode2)
m1 = where(m0==0,0,m1)
m2 = where(m0==0,0,m2)
m0 = where(m0==0,1,m0)
mat = m2/m0 - (m1/m0)**2
mat = sqrt(numclip(mat,0,1e10))
return mat
def ComputeMap(self,*arg,**kw):
'''
Return an image in form of a matrix (nx x ny float array)
obs : position of observer
x0 : eye position
xp : focal position
alpha : angle of the head
view : 'xy' 'xz' 'yz'
eye : 'right' 'left'
dist_eye : distance between eyes
mode : mode of map
space : pos or vel
persp : 'on' 'off'
clip : (near,far)
size : (maxx,maxy)
cut : 'yes' 'no'
frsp : factor for rsp
shape : shape of the map
'''
params = extract_parameters(arg,kw,self.defaultparameters)
obs = params['obs']
x0 = params['x0']
xp = params['xp']
alpha = params['alpha']
mode = params['mode']
view = params['view']
r_obs = params['r_obs']
eye = params['eye']
dist_eye = params['dist_eye']
foc = params['foc']
space = params['space']
persp = params['persp']
clip = params['clip']
size = params['size']
shape = params['shape']
cut = params['cut']
frsp = params['frsp']
filter_name = params['filter_name']
filter_opts = params['filter_opts']
# 0)
if getvaltype(mode)=='normal':
val = getval(self,mode=mode,obs=obs)
# 1) get observer position
if obs==None:
obs = geo.get_obs(x0=x0,xp=xp,alpha=alpha,view=view,r_obs=r_obs)
# 2) expose the model # !!! as in self.expose we use Nbody() this must be called by each Task
nb,obs = self.expose(obs,eye,dist_eye,foc=foc,space=space)
if self.nbody > 0:
# 3) compute val
if getvaltype(mode)=='in projection':
val = getval(nb,mode=mode,obs=obs)
# 4) projection transformation
if persp == 'on':
zp = - nb.pos[:,2] # save dist obs-point
pos = geo.frustum(nb.pos,clip,size)
else:
pos = geo.ortho(nb.pos,clip,size)
# 5) keep only particles in 1:1:1
if not self.has_array('rsp'): # bad !!!
self.rsp = None
if cut=='yes':
if self.rsp!= None:
if params['rendering']=='map':
pos,(mass,rsp,val,zp) = geo.boxcut(pos,[self.mass,self.rsp,val,zp])
else:
pos,(mass,rsp,val,zp) = geo.boxcut_segments(pos,[self.mass,self.rsp,val,zp])
else:
if params['rendering']=='map':
pos,(mass,val,zp) = geo.boxcut(pos,[self.mass,val,zp])
else:
pos,(mass,val,zp) = geo.boxcut_segments(pos,[self.mass,val,zp])
rsp = None
else:
mass = self.mass
rsp = self.rsp
if len(pos)!=0:
# 6) scale rsp and scale mass
if frsp!= 0:
if (rsp==None) or (sum(rsp)==0):
rsp = ones(len(pos),float32)
if persp == 'on':
fact = 1/(zp+clip[0])
# rsp is distance dependant...
rsp = rsp * fact
rsp = rsp.astype(float32)
# mass is distance dependant...
mass = mass*fact**2
mass = mass.astype(float32)
rsp = rsp*frsp # multiply with the factor
self.log.write( "rsp : min = %10.5f max = %10.5f mean = %10.5f"%(min(rsp),max(rsp),rsp.mean()) )
rsp = numclip(rsp,0,100)
self.log.write( "rsp : min = %10.5f max = %10.5f mean = %10.5f"%(min(rsp),max(rsp),rsp.mean()) )
rsp = rsp.astype(float32)
else:
rsp = None
# 7) viewport transformation : (x,y) -> ((0,1),(0,1))
pos = geo.viewport(pos,shape=None)
pos = pos.astype(float32)
# 8) render : map or lines
if params['rendering']=='map':
if rsp != None:
mat = mkmap2dsph(pos,mass,val,rsp,shape)
else:
mat = mkmap2d(pos,mass,val,shape)
elif params['rendering']=='polygon':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_polygon(mat,pos[:,0],pos[:,1],1)
elif params['rendering']=='lines':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_lines(mat,pos[:,0],pos[:,1],1)
elif params['rendering']=='segments':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_segments(mat,pos[:,0],pos[:,1],1,zp)
elif params['rendering']=='points':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_points(mat,pos[:,0],pos[:,1],1)
elif params['rendering']=='polygon2':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_polygonN(mat,pos[:,0],pos[:,1],1,2)
elif params['rendering']=='polygon4':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_polygonN(mat,pos[:,0],pos[:,1],1,4)
elif params['rendering']=='polygon10':
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_polygonN(mat,pos[:,0],pos[:,1],1,10)
elif params['rendering'][:8]=='polygon#':
n = int(params['rendering'][8:])
pos = pos * array([params['shape'][0],params['shape'][1] ,0])
mat = zeros(params['shape'],float32)
mat = draw_polygonN(mat,pos[:,0],pos[:,1],1,n)
else: # compute a map
if rsp != None:
mat = mkmap2dsph(pos,mass,val,rsp,shape)
else:
mat = mkmap2d(pos,mass,val,shape)
# there is no particles (after 5)
else:
mat = zeros(params['shape'],float32)
# there is no particles
else:
mat = zeros(params['shape'],float32)
# 9) sum mat over all proc
mat = mpi.mpi_allreduce(mat) # could be more efficient if only the master get the final mat
# 10) filter matrix
if mpi.mpi_IsMaster():
if params['filter_name'] != None:
mat = apply_filter(mat,name=filter_name,opt=filter_opts)
return mat
def ComputeObjectMap(self,*arg,**kw):
'''
* * * IN DEVELOPPEMENT : allow to draw an object like a box, a grid... * * *
Return an image in form of a matrix (nx x ny float array)
obs : position of observer
x0 : eye position
xp : focal position
alpha : angle of the head
view : 'xy' 'xz' 'yz'
eye : 'right' 'left'
dist_eye : distance between eyes
mode : mode of map
space : pos or vel
persp : 'on' 'off'
clip : (near,far)
size : (maxx,maxy)
cut : 'yes' 'no'
frsp : factor for rsp
shape : shape of the map
'''
# here, nb must represent a geometric object
# ob
# expose : -> must use ob instead of self
# --> we can give explicitely pos and vel
# ensuite, le nb est le bon
params = extract_parameters(arg,kw,self.defaultparameters)
obs = params['obs']
x0 = params['x0']
xp = params['xp']
alpha = params['alpha']
mode = params['mode']
view = params['view']
r_obs = params['r_obs']
eye = params['eye']
dist_eye = params['dist_eye']
foc = params['foc']
space = params['space']
persp = params['persp']
clip = params['clip']
size = params['size']
shape = params['shape']
cut = params['cut']
frsp = params['frsp']
filter_name = params['filter_name']
filter_opts = params['filter_opts']
# 0)
if getvaltype(mode)=='normal':
val = getval(self,mode=mode,obs=obs)
# 1) get observer position
if obs==None:
obs = geo.get_obs(x0=x0,xp=xp,alpha=alpha,view=view,r_obs=r_obs)
# 2) expose the model # !!! as in self.expose we use Nbody() this must be called by each Task
nb,obs = self.expose(obs,eye,dist_eye,foc=foc,space=space)
if self.nbody > 0:
# 3) compute val
if getvaltype(mode)=='in projection':
val = getval(nb,mode=mode,obs=obs)
# 4) projection transformation
if persp == 'on':
zp = - nb.pos[:,2] # save dist obs-point
pos = geo.frustum(nb.pos,clip,size)
else:
pos = geo.ortho(nb.pos,clip,size)
# 5) keep only particles in 1:1:1
if not self.has_array('rsp'): # bad !!!
self.rsp = None
if cut=='yes':
if self.rsp!= None:
pos,(mass,rsp,val,zp) = geo.boxcut(pos,[self.mass,self.rsp,val,zp])
else:
pos,(mass,val,zp) = geo.boxcut(pos,[self.mass,val,zp])
rsp = None
else:
mass = self.mass
rsp = self.rsp
if len(pos)!=0:
# 6) scale rsp and scale mass
if frsp!= 0:
if (rsp==None) or (sum(rsp)==0):
rsp = ones(len(pos),float32)
if persp == 'on':
fact = 1/((zp-clip[0])+ 2*clip[0])
# rsp is distance dependant...
rsp = rsp * fact
rsp = rsp.astype(float32)
# mass is distance dependant...
mass = mass*fact**2
mass = mass.astype(float32)
rsp = rsp*frsp # multiply with the factor
self.log.write( "rsp : min = %10.5f max = %10.5f mean = %10.5f"%(min(rsp),max(rsp),rsp.mean()) )
rsp = numclip(rsp,0,100)
self.log.write( "rsp : min = %10.5f max = %10.5f mean = %10.5f"%(min(rsp),max(rsp),rsp.mean()) )
rsp = rsp.astype(float32)
else:
rsp = None
# 7) viewport transformation : (x,y) -> ((0,1),(0,1))
pos = geo.viewport(pos,shape=None)
pos = pos.astype(float32)
# 8) get the map
#if rsp != None:
# mat = mkmap2dsph(pos,mass,val,rsp,shape)
#else:
# mat = mkmap2d(pos,mass,val,shape)
#
# empty matrix
mat = zeros(params['shape'],float32)
#for po in pos:
# i = int(po[0]*params['shape'][0])
# j = int(po[1]*params['shape'][1])
# mat[i,j]=255
pos = pos * [ params['shape'][0],params['shape'][1],1 ]
x0 = pos[0][0]
y0 = pos[0][1]
x1 = pos[1][0]
y1 = pos[1][1]
mat = libutil.draw_line(mat,x0,x1,y0,y1,255)
#mat = libutil.draw_cube(mat,pos,255)
# there is no particles (after 5)
else:
mat = zeros(params['shape'],float32)
# there is no particles
else:
mat = zeros(params['shape'],float32)
# 9) sum mat over all proc
mat = mpi.mpi_allreduce(mat) # may be inefficient, better use reduce ?
# 10) filter matrix
if mpi.mpi_IsMaster():
if params['filter_name'] != None:
mat = apply_filter(mat,name=filter_name,opt=filter_opts)
return mat
def expose(self,obs,eye=None,dist_eye=None,foc=None,space='pos',pos=None,vel=None):
"""
Rotate and translate the object in order to be seen as if the
observer was in x0, looking at a point in xp.
obs : observer matrix
eye : 'right' or 'left'
dist_eye : distance between eyes (separation = angle)
space : pos or vel
foc : focal
"""
# create a minimal copy of self
if pos!=None and vel!=None:
obj = Nbody(status='new',p_name='none',pos=pos,vel=vel,mass=None,ftype='default')
else:
obj = Nbody(status='new',p_name='none',pos=self.pos,vel=self.vel,mass=None,ftype='default')
if space=='vel':
obj.pos = self.vel
# first : put x0 at the origin
obj.translate(- obs[0])
obs = obs - obs[0]
# second : anti-align e1 with z
obj.align2( axis1=obs[1],axis2=[0,0,-1])
obs = geo.align(obs,axis1=obs[1],axis2=[0,0,-1])
# third : align e3 with y
obj.align2( axis1=obs[3],axis2=[0,1,0])
obs = geo.align(obs,axis1=obs[3],axis2=[0,1,0])
# fourth if eye is defined
if eye=='right':
if foc==None or foc==0: # simple translation (wee look at infini)
obj.translate([-dist_eye,0,0]) # not /2 for compatibility with glups
else:
Robs = foc
phi = -arctan(dist_eye)
obj.rotate( angle=-phi,axis=[0,1,0],point=[0,0,-Robs])
elif eye=='left':
if foc==None or foc==0: # simple translation (wee look at infini)
obj.translate([+dist_eye,0,0]) # not /2 for compatibility with glups
else:
Robs = foc
phi = -arctan(dist_eye)
obj.rotate( angle=+phi,axis=[0,1,0],point=[0,0,-Robs])
return obj,obs
'''
def getvxy(self,shape=(256,256),size=(30.,30.),center=(0.,0.,0.),view='xz',vn=8.,vmax=0.1,color=1):
self.log.write( "the result may be incertain (in development)" )
# choice of the view
if view=='xz':
view=1
elif view=='xy':
view=2
elif view=='yz':
view=3
elif view!='xz'and view!='xy'and view!='yz':
view=1
dx = mapone(self.pos,self.mass,self.vel[:,0],shape,size,center,view) * vn/vmax
dy = - mapone(self.pos,self.mass,self.vel[:,2],shape,size,center,view) * vn/vmax
# mask
mask = fromfunction(lambda x,y: (fmod(x,vn) + fmod(y,vn))==0 ,shape)
# points de depart
x0 = indices(shape)[0] + int(vn/2.)
y0 = indices(shape)[1] + int(vn/2.)
# points d'arrivee
x1 = x0 + dx.astype(int)
y1 = y0 + dy.astype(int)
# truncation
x1 = numclip(x1,0,shape[0])
y1 = numclip(y1,0,shape[1])
# compress
mask = mask*(x1!=x0)*(y1!=y0)
mask = ravel(mask)
x0 = compress(mask,ravel(x0))
x1 = compress(mask,ravel(x1))
y0 = compress(mask,ravel(y0))
y1 = compress(mask,ravel(y1))
# trace lines
mat = zeros(shape,float32)
color = array(color,int8)[0]
for i in range(len(x0)):
create_line(mat,x0[i],y0[i],x1[i],y1[i],color)
create_line(mat,x0[i],y0[i],x0[i]+1,y0[i]+1,color)
create_line(mat,x0[i],y0[i],x0[i]+1,y0[i] ,color)
create_line(mat,x0[i],y0[i],x0[i] ,y0[i]+1,color)
return mat.astype(int8)
'''
#################################
#
# 1d histograms routines
#
#################################
###########################
def Histo(self,bins,mode='m',space='R'):
###########################
histo = self.CombiHisto(bins,mode=mode,space=space)
# take the mean
bins1 = bins[:-1]
bins2 = bins[1:]
bins = (bins1+bins2)/2.
return bins,mpi.mpi_allreduce(histo)
###########################
def CombiHisto(self,bins,mode='m',space='R'):
###########################
if mode == 'm':
histo = self.ComputeHisto(bins,mode='0',space=space)
elif mode == 'sz':
histo = self.ComputeSigmaHisto(bins,mode1='z',mode2='z2',space=space)
elif mode == 'svz':
histo = self.ComputeSigmaHisto(bins,mode1='vz',mode2='vz2',space=space)
elif mode == 'svt':
histo = self.ComputeSigmaHisto(bins,mode1='vt',mode2='vt2',space=space)
elif mode == 'svr':
histo = self.ComputeSigmaHisto(bins,mode1='vr',mode2='vr2',space=space)
elif mode == 'vt':
histo = self.ComputeMeanHisto(bins,mode1='vt',space=space)
elif mode == 'vr':
histo = self.ComputeMeanHisto(bins,mode1='vr',space=space)
elif mode == 'vz':
histo = self.ComputeMeanHisto(bins,mode1='vz',space=space)
else:
print "unknown mode %s"%(mode)
return histo
#################################
def ComputeMeanHisto(self,bins,mode1,space):
#################################
"""
Compute the mean map of an observable.
"""
h0 = self.ComputeHisto(bins,mode='0',space=space)
h1 = self.ComputeHisto(bins,mode=mode1,space=space)
h1 = where(h0==0,0,h1)
h0 = where(h0==0,1,h0)
h = h1/h0
return h
#################################
def ComputeSigmaHisto(self,bins,mode1,mode2,space):
#################################
"""
Compute the histogram of an observable.
"""
h0 = self.ComputeHisto(bins,mode='0',space=space)
h1 = self.ComputeHisto(bins,mode=mode1,space=space)
h2 = self.ComputeHisto(bins,mode=mode2,space=space)
h1 = where(h0==0,0,h1)
h2 = where(h0==0,0,h2)
h0 = where(h0==0,1,h0)
h = h2/h0 - (h1/h0)**2
h = sqrt(numclip(h,0,1e10))
return h
#################################
def ComputeHisto(self,bins,mode,space):
#################################
'''
Compute and histogram
'''
# set space
if space == 'R':
x = self.rxy()
elif space == 'r':
x = self.rxyz()
# set mode
if mode == 'm' or mode=='0':
v = self.mass
elif mode == 'z':
v = self.mass*self.z()
elif mode == 'z2':
v = self.mass*self.z()**2
elif mode == 'vz':
v = self.mass*self.vz()
elif mode == 'vz2':
v = self.mass*self.vz()**2
elif mode == 'vt':
v = self.mass*self.Vt()
elif mode == 'vt2':
v = self.mass*self.Vt()**2
elif mode == 'vr':
v = self.mass*self.Vr()
elif mode == 'vr2':
v = self.mass*self.Vr()**2
else:
print "unknown mode %s"%(mode)
histo = whistogram(x.astype(float),v.astype(float),bins.astype(float))
return histo
############################################
#
# Routines to get velocities from positions
#
############################################
def Get_Velocities_From_Virial_Approximation(self,select=None,vf=1.,eps=0.1,UseTree=True,Tree=None,ErrTolTheta=0.5):
'''
This routine does not work ! Do not use it, or check !
'''
if select!=None:
nb_sph = self.select(select)
else:
nb_sph = self
# build the Tree for nb
self.getTree(force_computation=True,ErrTolTheta=ErrTolTheta)
# compute potential
pot = 0.5*self.TreePot(nb_sph.pos,eps)
# virial approximation to get the velocities
sigmasp = sqrt(-pot/3*vf)
# compute accel
acc = self.TreeAccel(nb_sph.pos,eps)
pot = (acc[:,0]*nb_sph.pos[:,0] + acc[:,1]*nb_sph.pos[:,1] + acc[:,2]*nb_sph.pos[:,2])
# virial approximation to get the velocities
sigmas = sqrt(-pot/3*vf)
# avoid negative values
sigmas = where( (pot>0),sigmasp, sigmas )
# generate velocities
vx = sigmas*RandomArray.standard_normal([nb_sph.nbody])
vy = sigmas*RandomArray.standard_normal([nb_sph.nbody])
vz = sigmas*RandomArray.standard_normal([nb_sph.nbody])
nb_sph.vel = transpose(array([vx,vy,vz])).astype(float32)
return nb_sph
def Get_Velocities_From_AdaptativeSpherical_Grid(self,select=None,eps=0.1,n=1000,UseTree=True,Tree=None,phi=None,ErrTolTheta=0.5):
'''
Computes velocities using the jeans equation in spherical coordinates.
An adaptative grid is set automatically.
'''
if select!=None:
nb_sph = self.select(select)
else:
nb_sph = self
# create the adaptiative grid and compute rho
r = nb_sph.rxyz()
a = r.argsort()
x = take(nb_sph.pos[:,0],a)
y = take(nb_sph.pos[:,1],a)
z = take(nb_sph.pos[:,2],a)
mass = take(nb_sph.mass,a)
r = sqrt( x**2 + y**2 + z**2 )
n_bins = int((nb_sph.nbody+1)/n + 1)
rs = []
rsmin = []
rsmax = []
rhos = []
ns = []
for i in xrange(n_bins):
jmin = i*n
jmax = i*n + n
jmin = min(jmin,nb_sph.nbody-1)
jmax = min(jmax,nb_sph.nbody-1)
if jmin!=jmax:
rr = r[jmin:jmax]
mm = mass[jmin:jmax]
rmean = rr.mean()
rmin = rr.min()
rmax = rr.max()
rs.append(rmean)
rsmin.append(rmin)
rsmax.append(rmax)
# density
rho = sum(mm)/(4/3.*pi*(rmax**3-rmin**3))
rhos.append(rho)
# number
ns.append(len(rr))
r = array(rs)
rsmin = array(rsmin)
rsmax = array(rsmax)
rho = array(rhos)
dr = rsmax-rsmin
nn = array(ns)
# build the Tree for nb
self.getTree(force_computation=True,ErrTolTheta=ErrTolTheta)
# compute potential
x = r
y = zeros(len(r))
z = zeros(len(r))
pos = transpose(array([x,y,z])).astype(float32)
phi = self.TreePot(pos,eps)
# compute sigma
sigma = libdisk.get_1d_Sigma_From_Rho_Phi(rho=rho,phi=phi,r=r,dr=dr)
# generate velocities for all particles
sigmas = lininterp1d(nb_sph.rxyz().astype(float32),r.astype(float32),sigma.astype(float32))
vx = sigmas*RandomArray.standard_normal([nb_sph.nbody])
vy = sigmas*RandomArray.standard_normal([nb_sph.nbody])
vz = sigmas*RandomArray.standard_normal([nb_sph.nbody])
nb_sph.vel = transpose(array([vx,vy,vz])).astype(float32)
# here we should limit the speed according to max speed
phis = lininterp1d(nb_sph.rxyz().astype(float32),r.astype(float32),phi.astype(float32))
vm = 0.95*sqrt(-2*phis)
vn = nb_sph.vn()
vf = where(vn>vm,vm/vn,1)
vf.shape = (len(vf),1)
nb_sph.vel = nb_sph.vel * vf
# other info
phi
dphi = libgrid.get_First_Derivative(phi,r)
vcirc = libdisk.Vcirc(r,dphi)
stats = {}
stats['r'] = r
stats['nn'] = nn
stats['phi'] = phi
stats['rho'] = rho
stats['sigma'] = sigma
stats['vc'] = vcirc
return nb_sph,phi,stats
def Get_Velocities_From_Spherical_Grid(self,select=None,eps=0.1,nr=128,rmax=100.0,UseTree=True,Tree=None,phi=None,ErrTolTheta=0.5,g=None,gm=None,NoDispertion=False,omega=None):
'''
Computes velocities using the jeans equation in spherical coordinates.
'''
if select!=None:
nb_sph = self.select(select)
else:
nb_sph = self
# build the Tree for nb
self.getTree(force_computation=True,ErrTolTheta=ErrTolTheta)
# create the grid
G = libgrid.Spherical_1d_Grid(rmin=0,rmax=rmax,nr=nr,g=g,gm=gm)
if phi==None:
phi = G.get_PotentialMap(self,eps=eps,UseTree=UseTree)
r = G.get_r()
rho = G.get_DensityMap(nb_sph)
nn = G.get_NumberMap(nb_sph)
# dr
dr = G.get_r(offr=1)-G.get_r(offr=0)
# compute sigma
sigma = libdisk.get_1d_Sigma_From_Rho_Phi(rho=rho,phi=phi,r=r,dr=dr)
# correct sigma in case of rotation (we assume the rotation around z)
if omega!=None:
print "add rotation"
e_jeans = 0.5*sigma*sigma
e_rot = 0.5*r**2 * omega**2
e = e_jeans - e_rot
if (e<0).any():
print "at some radius the kinetic specifig energy is less than zero\nYou should decrease omega."
e = where(e<0,0,e)
sigma = sqrt(2*e)
# generate velocities for all particles
sigmas = G.get_Interpolation(nb_sph.pos,sigma)
if NoDispertion:
vx = sigmas*ones(nb_sph.nbody)
vy = sigmas*ones(nb_sph.nbody)
vz = sigmas*ones(nb_sph.nbody)
else:
vx = sigmas*RandomArray.standard_normal([nb_sph.nbody])
vy = sigmas*RandomArray.standard_normal([nb_sph.nbody])
vz = sigmas*RandomArray.standard_normal([nb_sph.nbody])
nb_sph.vel = transpose(array([vx,vy,vz])).astype(float32)
# do not spin
# add rotation
#if omega!=None:
# nb_sph.spin(omega=array([0,0,omega]))
# here we should limit the speed according to max speed
phis = G.get_Interpolation(nb_sph.pos,phi)
vm = 0.95*sqrt(-2*phis)
vn = nb_sph.vn()
vf = where(vn>vm,vm/vn,1)
vf.shape = (len(vf),1)
nb_sph.vel = nb_sph.vel * vf
# other info
phi
dphi = libgrid.get_First_Derivative(phi,r)
vcirc = libdisk.Vcirc(r,dphi)
stats = {}
stats['r'] = r
stats['nn'] = nn
stats['phi'] = phi
stats['rho'] = rho
stats['sigma'] = sigma
stats['vc'] = vcirc
return nb_sph,phi,stats
- def Get_Velocities_From_Cylindrical_Grid(self,select='disk',disk=('gas','disk'),eps=0.1,nR=32,nz=32,nt=2,Rmax=100,zmin=-10,zmax=10,params=[None,None,None],UseTree=True,Tree=None,Phi=None,ErrTolTheta=0.5,AdaptativeSoftenning=False,g=None,gm=None):
+ def Get_Velocities_From_Cylindrical_Grid(self,select='disk',disk=('gas','disk'),eps=0.1,nR=32,nz=32,nt=2,Rmax=100,zmin=-10,zmax=10,params=[None,None,None],UseTree=True,Tree=None,Phi=None,ErrTolTheta=0.5,AdaptativeSoftenning=False,g=None,gm=None,NoDispertion=False):
'''
Computes velocities using the jeans equation in cylindrical coordinates.
'''
mode_sigma_z = params[0]
mode_sigma_r = params[1]
mode_sigma_p = params[2]
if params[0]==None:
mode_sigma_z = {"name":"jeans","param":None}
if params[1]==None:
mode_sigma_r = {"name":"toomre","param":1.0}
if params[2]==None:
mode_sigma_p = {"name":"epicyclic_approximation","param":None}
nb_cyl = self.select(select) # current component
nb_dis = self.select(disk) # disk component, for Q computation
# build the Tree for nb
self.getTree(force_computation=True,ErrTolTheta=ErrTolTheta)
# create the grid
G = libgrid.Cylindrical_2drz_Grid(rmin=0,rmax=Rmax,nr=nR,zmin=zmin,zmax=zmax,nz=nz,g=g,gm=gm)
R,z = G.get_rz()
####################################
# compute Phi in a 2d rz grid
####################################
# here, we could use Acc instead
Phi = G.get_PotentialMap(self,eps=eps,UseTree=UseTree,AdaptativeSoftenning=AdaptativeSoftenning)
Phi = libgrid.get_Symetrisation_Along_Axis(Phi,axis=1)
#Accx,Accy,Accz = libgrid.get_AccelerationMap_On_Cylindrical_2dv_Grid(self,nR,nz,Rmax,zmin,zmax,eps=eps)
#Ar = sqrt(Accx**2+Accy**2)
####################################
# compute Phi (z=0) in a 2d rt grid
####################################
Grt = libgrid.Cylindrical_2drt_Grid(rmin=0,rmax=Rmax,nr=nR,nt=nt,z=0,g=g,gm=gm)
Accx,Accy,Accz = Grt.get_AccelerationMap(self,eps=eps,UseTree=UseTree,AdaptativeSoftenning=AdaptativeSoftenning)
Ar = sqrt(Accx**2+Accy**2)
Ar = sum(Ar,axis=1)/nt
Rp,tp = Grt.get_rt()
Phi0 = Phi[:,nz/2] # not used
dPhi0 = Ar
d2Phi0 = libgrid.get_First_Derivative(dPhi0,R)
# density
rho = G.get_DensityMap(nb_cyl,offz=-0.5)
rho = libgrid.get_Symetrisation_Along_Axis(rho,axis=1)
# number per bin
nn = G.get_NumberMap(nb_cyl,offz=-0.5)
Sden = G.get_SurfaceDensityMap(nb_cyl,offz=-0.5)
Sdend = G.get_SurfaceDensityMap(nb_dis,offz=-0.5)
# compute frequencies (in the plane)
kappa = libdisk.Kappa(R,dPhi0,d2Phi0)
omega = libdisk.Omega(R,dPhi0)
vcirc = libdisk.Vcirc(R,dPhi0)
nu = libdisk.Nu(z,Phi)
# compute sigma_z
if mode_sigma_z['name']=='jeans':
R1,z1 = G.get_rz(offz=0)
R2,z2 = G.get_rz(offz=1)
dz = z2-z1
sigma_z = libdisk.get_2d_Sigma_From_Rho_Phi(rho=rho,Phi=Phi,z=z,dz=dz)
sigma_z2 = sigma_z**2
elif mode_sigma_z['name']=='surface density':
"""sigma_z2 = pi*G*Sden*Hz"""
print "mode sigma z : 'surface density', not implemented yet"
sys.exit()
# compute sigma_r
if mode_sigma_r['name']=='epicyclic_approximation':
beta2 = mode_sigma_r['param']
f = where( kappa**2>0 , (1./beta2) * (nu**2/kappa**2) , 1.0 )
f.shape = (nR,1)
sigma_r2 = sigma_z2 * f
elif mode_sigma_r['name']=='isothropic':
sigma_r2 = sigma_z2
elif mode_sigma_r['name']=='toomre':
Q = mode_sigma_r['param']
Gg = 1.0
sr = where(kappa>0,Q*3.36*Gg*Sdend/kappa,sigma_z[:,nz/2])
sr.shape = (nR,1)
sigma_r2 = ones((nR,nz)) * sr
sigma_r2 = sigma_r2**2
elif mode_sigma_r['name']=='constant':
sr = mode_sigma_r['param']
sigma_r2 = ones((nR,nz)) * sr
sigma_r2 = sigma_r2**2
# compute sigma_p
if mode_sigma_p['name']=='epicyclic_approximation':
f = where( omega**2>0 , (1/4.0) * (kappa**2/omega**2) , 1.0 )
f.shape = (nR,1)
sigma_p2 = sigma_r2 * f
elif mode_sigma_p['name']=='isothropic':
sigma_p2 = sigma_z2
notok = True
count = 0
while notok:
count = count + 1
print "compute vm"
# compute vm
sr2 = sigma_r2[:,nz/2] # should not be only in the plane
sp2 = sigma_p2[:,nz/2] # should not be only in the plane
vc = vcirc # should not be only in the plane
T1 = vc**2
T2 = + sr2 - sp2
T3 = where(Sden>0,R/Sden,0)* libgrid.get_First_Derivative(Sden*sr2,R)
vm2 = T1 + T2 + T3
# if vm2 < 0
c = (vm2<0)
if sum(c)>0:
print "Get_Velocities_From_Cylindrical_Grid : vm2 < 0 for %d elements"%(sum(c))
'''
vm2 = where(c,0,vm2)
dsr2 = where(c,(T1+T2+T3)/2.,0) # energie qu'il faut retirer a sr
dsp2 = where(c,(T1+T2+T3)/2.,0) # energie qu'il faut retirer a sp
# take energy from sigma_r and sigma_p
sigma_r2 = transpose(transpose(sigma_r2) + dsr2)
sigma_p2 = transpose(transpose(sigma_p2) + dsp2)
'''
E = sr2 + sp2 + vm2
if sum(E<0) != 0:
print "-----------------------------------------------------"
for i in range(len(R)):
print R[i],vc[i]**2,sr2[i],sp2[i],vm2[i],sigma_z[i,nz/2]**2
print "-----------------------------------------------------"
print "Get_Velocities_From_Cylindrical_Grid : we are in trouble here..."
raise "E<0"
vm2 = where(c,E/3.,vm2)
sr2 = where(c,E/3.,sr2)
sp2 = where(c,E/3.,sp2)
sigma_r2 = transpose(ones((nz,nR)) * sr2)
sigma_p2 = transpose(ones((nz,nR)) * sp2)
if count > 0:
notok = False
else:
notok = False
# old implementation
#vm2 = where(c,T1,vm2)
#dsr2 = where(c,-(T2+T3)/2.,0)
#dsp2 = where(c,-(T2+T3)/2.,0)
# check again
c = (vm2<0).astype(int)
nvm = sum(c)
if sum(nvm)>0:
print "WARNING : %d cells still have vm<0 !!!"%(nvm)
print "Vc^2 < 0 !!!"
vm2 = where(c,0,vm2)
vm = where(vm2>0,sqrt(vm2),0)
# generate velocities for all particles
sigma_r2s = G.get_Interpolation(nb_cyl.pos,sigma_r2)
sigma_p2s = G.get_Interpolation(nb_cyl.pos,sigma_p2)
sigma_z2s = G.get_Interpolation(nb_cyl.pos,sigma_z2)
sigma_rs = where(sigma_r2s>0,sqrt(sigma_r2s),0)
sigma_ps = where(sigma_p2s>0,sqrt(sigma_p2s),0)
sigma_zs = where(sigma_z2s>0,sqrt(sigma_z2s),0)
vcircs = G.get_r_Interpolation(nb_cyl.pos,vcirc)
vms = G.get_r_Interpolation(nb_cyl.pos,vm)
-
- vr = sigma_rs*RandomArray.standard_normal([nb_cyl.nbody])
- vp = sigma_ps*RandomArray.standard_normal([nb_cyl.nbody]) + vms
- vz = sigma_zs*RandomArray.standard_normal([nb_cyl.nbody])
+ if NoDispertion:
+ vr = sigma_rs
+ vp = sigma_ps*0 + vms
+ vz = sigma_zs
+ else:
+ vr = sigma_rs*RandomArray.standard_normal([nb_cyl.nbody])
+ vp = sigma_ps*RandomArray.standard_normal([nb_cyl.nbody]) + vms
+ vz = sigma_zs*RandomArray.standard_normal([nb_cyl.nbody])
vel = transpose(array([vr,vp,vz])).astype(float32)
nb_cyl.vel = libutil.vel_cyl2cart(nb_cyl.pos,vel)
# here we should limit the speed according to max speed
phis = G.get_Interpolation(nb_cyl.pos,Phi)
vmax = 0.95*sqrt(-2*phis)
vn = nb_cyl.vn()
vf = where(vn>vmax,vmax/vn,1)
vf.shape = (len(vf),1)
nb_cyl.vel = nb_cyl.vel * vf
# some output
sr = sigma_r = sqrt(sigma_r2[:,nz/2])
sp = sigma_p = sqrt(sigma_p2[:,nz/2])
sz = sigma_z = sqrt(sigma_z2[:,nz/2])
Q = where((Sden>0),sr*kappa/(3.36*Sdend),0)
stats = {}
stats['R'] = R
stats['z'] = z
stats['vc'] = vc
stats['vm'] = vm
stats['sr'] = sr
stats['sp'] = sp
stats['sz'] = sz
stats['kappa'] = kappa
stats['omega'] = omega
stats['nu'] = nu
stats['Sden'] = Sden
stats['Sdend'] = Sdend
stats['Q'] = Q
#stats['Ar'] = Ar
stats['rho'] = rho
stats['phi'] = Phi
stats['nn'] = nn
stats['sigma_z']= sqrt(sigma_z2)
stats['Phi0'] = Phi0
stats['dPhi0'] = dPhi0
stats['d2Phi0'] = d2Phi0
return nb_cyl,Phi,stats
############################################
#
# evolution routines
#
############################################
def IntegrateUsingRK(self,tstart=0,dt=1,dt0=1e-5,epsx=1.e-13,epsv=1.e-13):
"""
Integrate the equation of motion using RK78 integrator.
tstart : initial time
dt : interval time
dt0 : inital dt
epsx : position precision
epsv : velocity precision
tmin,tmax,dt,dtout,epsx,epsv,filename
"""
tend = tstart + dt
self.pos,self.vel,self.atime,self.dt = nbdrklib.IntegrateOverDt(self.pos.astype(float),self.vel.astype(float),self.mass.astype(float),tstart,tend,dt,epsx,epsv)
self.pos = self.pos.astype(float32)
self.vel = self.vel.astype(float32)
#################################
#
# Thermodynamic functions
#
#################################
def U(self):
'''
Return the gas specific energy of the model.
The output is an nx1 float array.
'''
return self.u
def Rho(self):
'''
Return the gas density of the model.
The output is an nx1 float array.
'''
try:
a3inv = 1./self.atime**3
except:
a3inv = 1.
if self.unitsparameters.get('HubbleParam') == 1:
self.log.write("assuming non cosmological simulation")
a3inv = 1.
try:
rho = self.rho*a3inv
return rho
except:
return self.rho
def T(self):
'''
Return the gas temperature of the model.
The output is an nx1 float array.
'''
gamma = self.unitsparameters.get('gamma')
xi = self.unitsparameters.get('xi')
ionisation = self.unitsparameters.get('ionisation')
mu = thermodyn.MeanWeight(xi,ionisation)
mh = ctes.PROTONMASS.into(self.localsystem_of_units)
k = ctes.BOLTZMANN.into(self.localsystem_of_units)
thermopars = {"k":k,"mh":mh,"mu":mu,"gamma":gamma}
T = where((self.u>0),thermodyn.Tru(self.Rho(),self.u,thermopars),0)
return T
def MeanWeight(self):
'''
Return the mean weight of a model, taking into account
heating by UV source.
The output is an nx1 float array.
'''
xi = self.unitsparameters.get('xi')
Redshift = 1./self.atime - 1.
UnitDensity_in_cgs = self.localsystem_of_units.get_UnitDensity_in_cgs()
UnitEnergy_in_cgs = self.localsystem_of_units.get_UnitEnergy_in_cgs()
UnitMass_in_g = self.localsystem_of_units.get_UnitMass_in_g()
HubbleParam = self.hubbleparam
# 0) convert into cgs
Density = self.rho.astype(float) *UnitDensity_in_cgs * (HubbleParam*HubbleParam) / self.atime**3
Egyspec = self.u.astype(float) *UnitEnergy_in_cgs/UnitMass_in_g
# 1) compute mu
MeanWeight,Lambda = coolinglib.cooling(Egyspec,Density,xi,Redshift)
return MeanWeight.astype(float32)
def Tmu(self):
'''
Return the gas temperature of the model.
The output is an nx1 float array.
'''
gamma = self.unitsparameters.get('gamma')
mh = ctes.PROTONMASS.into(self.localsystem_of_units)
k = ctes.BOLTZMANN.into(self.localsystem_of_units)
T = (gamma-1) *self.MeanWeight().astype(float) *mh/k * self.u
return T.astype(float32)
def A(self):
'''
Return the gas entropy of the model.
The output is an nx1 float array.
'''
gamma = self.unitsparameters.get('gamma')
xi = self.unitsparameters.get('xi')
ionisation = self.unitsparameters.get('ionisation')
mu = thermodyn.MeanWeight(xi,ionisation)
mh = ctes.PROTONMASS.into(self.localsystem_of_units)
k = ctes.BOLTZMANN.into(self.localsystem_of_units)
thermopars = {"k":k,"mh":mh,"mu":mu,"gamma":gamma}
A = where((self.u>0),thermodyn.Aru(self.Rho(),self.u,thermopars),0)
return A
def P(self):
'''
Return the gas pressure of the model.
The output is an nx1 float array.
'''
gamma = self.unitsparameters.get('gamma')
xi = self.unitsparameters.get('xi')
ionisation = self.unitsparameters.get('ionisation')
mu = thermodyn.MeanWeight(xi,ionisation)
mh = ctes.PROTONMASS.into(self.localsystem_of_units)
k = ctes.BOLTZMANN.into(self.localsystem_of_units)
thermopars = {"k":k,"mh":mh,"mu":mu,"gamma":gamma}
P = where((self.u>0),thermodyn.Pru(self.Rho(),self.u,thermopars),0)
return P
def Tcool(self,coolingfile=None):
'''
Return the cooling time of the model.
The output is an nx1 float array.
'''
gamma = self.unitsparameters.get('gamma')
xi = self.unitsparameters.get('xi')
ionisation = self.unitsparameters.get('ionisation')
metalicity = self.unitsparameters.get('metalicity')
hubbleparam= self.unitsparameters.get('HubbleParam')
if coolingfile==None:
coolingfile = self.unitsparameters.get('coolingfile')
mu = thermodyn.MeanWeight(xi,ionisation)
mh = ctes.PROTONMASS.into(self.localsystem_of_units)
k = ctes.BOLTZMANN.into(self.localsystem_of_units)
try:
if self.hubbleparam != hubbleparam:
self.log.write("Warning (Tcool): using hubbleparam=%f, but self.hubbleparam=%f"%(hubbleparam,self.hubbleparam))
except:
pass
thermopars = {"k":k,"mh":mh,"mu":mu,"gamma":gamma,"Xi":xi,"metalicity":metalicity,"hubbleparam":hubbleparam}
tc,c = thermodyn.CoolingTime(self.Rho(),self.u,self.localsystem_of_units,thermopars,coolingfile)
tc = where(c,tc,0)
return tc
def Ne(self):
'''
Return the electron density of the model.
The output is an nx1 float array.
'''
xi = self.unitsparameters.get('xi')
ionisation = self.unitsparameters.get('ionisation')
mh = ctes.PROTONMASS.into(self.localsystem_of_units)
thermopars = {"mh":mh,"Xi":xi,"ionisation":ionisation}
ne = thermodyn.ElectronDensity(self.Rho(),thermopars)
return ne
def S(self):
'''
Return the `entropy` of the model, defined as
S = T * Ne^(1-gamma)
The output is an nx1 float array.
'''
gamma = self.unitsparameters.get('gamma')
s = self.T()*self.Ne()**(1.-gamma)
return s
def Lum(self):
'''
Return the luminosty of the model, defined as
Lum = m*u/Tcool = m*Lambda/rho
The output is an nx1 float array.
'''
Lum = self.mass*self.u/self.Tcool()
return Lum
####################################################################################################################################
#
# other classes
#
####################################################################################################################################
#if FORMATSFILE != None:
# execfile(FORMATSFILE)
#if USERFORMATSFILE != None:
# execfile(USERFORMATSFILE)
#if USERFORMATSDIR != None:
# formatsfiles = glob.glob(os.path.join(USERFORMATSDIR,'*.py'))
if FORMATSDIR != None:
formatsfiles = glob.glob(os.path.join(FORMATSDIR,'*.py'))
for format in formatsfiles:
execfile(format)
####################################################################################################################################
#
# NBODY REDIRECTOR
#
####################################################################################################################################
ELTS = dir()
def get_known_formats():
'''
return the name of known Nbody formats
'''
formats = []
for elt in ELTS:
if elt[:6]=='Nbody_':
formats.append(elt)
return formats
def Nbody(*arg,**kw):
"""
The aim of this function is simply to return to the right class
"""
# default value
nb = None
# gather all known classes
formats = get_known_formats()
# check ftype
if kw.has_key('ftype'):
if kw['ftype'] != None:
format = "Nbody_%s"%kw['ftype']
class_name = eval(format)
nb = class_name(*arg,**kw)
else:
format = 'Nbody_default'
class_name = eval(format)
nb = class_name(*arg,**kw)
if nb == None:
self.log.write( "you should give the right format ftype" )
sys.exit()
'''
# check ftype
if kw.has_key('ftype'):
if kw['ftype'] != None:
format = "Nbody_%s"%kw['ftype']
# check if format is known
try:
formats.index(format)
except ValueError:
print "%s format is unknown"%format
format = None
class_name = eval(format)
nb = class_name(*arg,**kw)
# if format exists, try to create the object
if format != None:
class_name = eval(format)
try:
nb = class_name(*arg,**kw)
return nb
except "ReadBlockError":
pass
except "ReadAsciiError":
pass
except "ReadError":
pass
except "IOError":
print "IOError"
# except:
# pass
print "not a %s format"%(format)
# test all known Nbody class
for format in formats:
#print "try to open as %s"%format
class_name = eval(format)
try:
nb = class_name(*arg,**kw)
break
except "ReadBlockError":
pass
except "ReadAsciiError":
pass
except "ReadError":
pass
except "IOError":
print "IOError"
# except:
# pass
if nb == None:
print "unreconized format"
sys.exit()
'''
return nb