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 = np.copy(pos[:,0]) y = np.copy(pos[:,1]) z = np.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 = np.copy(pos[:,0]) y = np.copy(pos[:,1]) z = np.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 = np.copy(pos[:,0]) y = np.copy(pos[:,1]) z = np.copy(pos[:,2])

x.shape = (nr,nt) y.shape = (nr,nt) z.shape = (nr,nt)

# to get r and theta r = np.sqrt(x**2+y**2+z**2) t = arctan2(y,x)*180/np.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 = np.copy(pos[:,0]) y = np.copy(pos[:,1]) z = np.copy(pos[:,2])

x.shape = (nr,nt) y.shape = (nr,nt) z.shape = (nr,nt)

# to get r and theta r = np.sqrt(x**2+y**2+z**2) t = arctan2(y,x)*180/np.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 = np.sqrt(x**2+y**2+z**2) t = arctan2(y,x)*180/np.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.