fiesta.arepo.ArepoCubicGrid#
- class fiesta.arepo.ArepoCubicGrid(file_path, AREPO_bounds=None, verbose=False)[source]#
Class to deal with AREPO cubic/cuboidal grids that have been ray-casted from snapshots.
- Variables:
density (
Quantity) – 3D array containing density at each grid point in AREPOumass/ulength**3units.nx (
Quantity) – Number of grid points along \(x\)-axis of the grid in units ofu.pix.ny (
Quantity) – Number of grid points along \(y\)-axis of the grid in units ofu.pix.nz (
Quantity) – Number of grid points along \(z\)-axis of the grid in units ofu.pix.scale (
str) – Eitherpixelif the grid is not scaled to the source AREPO snapshot, elsephysical.xmin (
Quantity) – Minimum value of the \(x\)-axis of the grid, in eitherpixelorphysicalunits.xmin – Maximum value of the \(x\)-axis of the grid, in either
pixelorphysicalunits.ymin (
Quantity) – Minimum value of the \(y\)-axis of the grid, in eitherpixelorphysicalunits.ymax (
Quantity) – Maximum value of the \(y\)-axis of the grid, in eitherpixelorphysicalunits.zmin (
Quantity) – Minimum value of the \(z\)-axis of the grid, in eitherpixelorphysicalunits.zmax (
Quantity) – Maximum value of the \(z\)-axis of the grid, in eitherpixelorphysicalunits.xlength (
Quantity) – Length of one voxel along \(x\)-axis, in eitherpixelorphysicalunits.ylength (
Quantity) – Length of one voxel along \(y\)-axis, in eitherpixelorphysicalunits.zlength (
Quantity) – Length of one voxel along \(z\)-axis, in eitherpixelorphysicalunits.
- Parameters:
file_path (
str) – File path of the AREPO grid.AREPO_bounds (
listorndarrayorQuantity, optional) – The bounds of the source AREPO snapshot corresponding to the grid, in the format[xmin, xmax, ymin, ymax, zmin, zmax]. IfNone(default), thenscale='pixel', elsescale='physical'. If not anQuantity, assumed to be inAREPO_LENGTHunits.verbose (bool, optional) – If
True, prints output during file reading. Default value isFalse.
ArepoCubicGrid.get_density([unit])Returns
density.ArepoCubicGrid.get_ndensity([unit])Returns the number density of the grid.
ArepoCubicGrid.plot_grid([length_unit, ...])Plot the 3D number density grid.
ArepoCubicGrid.plot_projection([projection, ...])Plot the 2D projection of the number density grid.
ArepoCubicGrid.plot_slice([x, y, z, ...])Plot a slice of 3D number density grid.
ArepoCubicGrid.set_scale(AREPO_bounds)Set the physical scale of the grid by specifying the bounds of the source AREPO snapshot that the grid corresponds to.
ArepoCubicGrid.write_mask_to_FITS(...[, verbose])Write a mask .FITS file.
ArepoCubicGrid.write_to_FITS(FITS_file_path)Write out the AREPO grid into a .FITS file.