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 AREPO umass/ulength**3 units.

  • nx (Quantity) – Number of grid points along \(x\)-axis of the grid in units of u.pix.

  • ny (Quantity) – Number of grid points along \(y\)-axis of the grid in units of u.pix.

  • nz (Quantity) – Number of grid points along \(z\)-axis of the grid in units of u.pix.

  • scale (str) – Either pixel if the grid is not scaled to the source AREPO snapshot, else physical.

  • xmin (Quantity) – Minimum value of the \(x\)-axis of the grid, in either pixel or physical units.

  • xmin – Maximum value of the \(x\)-axis of the grid, in either pixel or physical units.

  • ymin (Quantity) – Minimum value of the \(y\)-axis of the grid, in either pixel or physical units.

  • ymax (Quantity) – Maximum value of the \(y\)-axis of the grid, in either pixel or physical units.

  • zmin (Quantity) – Minimum value of the \(z\)-axis of the grid, in either pixel or physical units.

  • zmax (Quantity) – Maximum value of the \(z\)-axis of the grid, in either pixel or physical units.

  • xlength (Quantity) – Length of one voxel along \(x\)-axis, in either pixel or physical units.

  • ylength (Quantity) – Length of one voxel along \(y\)-axis, in either pixel or physical units.

  • zlength (Quantity) – Length of one voxel along \(z\)-axis, in either pixel or physical units.

Parameters:
  • file_path (str) – File path of the AREPO grid.

  • AREPO_bounds (list or ndarray or Quantity, optional) – The bounds of the source AREPO snapshot corresponding to the grid, in the format [xmin, xmax, ymin, ymax, zmin, zmax]. If None (default), then scale='pixel', else scale='physical'. If not an Quantity, assumed to be in AREPO_LENGTH units.

  • verbose (bool, optional) – If True, prints output during file reading. Default value is False.

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.