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**3
units.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
) – Eitherpixel
if the grid is not scaled to the source AREPO snapshot, elsephysical
.xmin (
Quantity
) – Minimum value of the \(x\)-axis of the grid, in eitherpixel
orphysical
units.xmin – Maximum value of the \(x\)-axis of the grid, in either
pixel
orphysical
units.ymin (
Quantity
) – Minimum value of the \(y\)-axis of the grid, in eitherpixel
orphysical
units.ymax (
Quantity
) – Maximum value of the \(y\)-axis of the grid, in eitherpixel
orphysical
units.zmin (
Quantity
) – Minimum value of the \(z\)-axis of the grid, in eitherpixel
orphysical
units.zmax (
Quantity
) – Maximum value of the \(z\)-axis of the grid, in eitherpixel
orphysical
units.xlength (
Quantity
) – Length of one voxel along \(x\)-axis, in eitherpixel
orphysical
units.ylength (
Quantity
) – Length of one voxel along \(y\)-axis, in eitherpixel
orphysical
units.zlength (
Quantity
) – Length of one voxel along \(z\)-axis, in eitherpixel
orphysical
units.
- Parameters:
file_path (
str
) – File path of the AREPO grid.AREPO_bounds (
list
orndarray
orQuantity
, 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_LENGTH
units.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.