Global constants

This is a list of constant and types used in GalaxyInspector.

None of these constants and types are exported.


GalaxyInspector.ALPHA_BLITZConstant

Reference exponent for the molecular fraction-pressure relation, taken from Blitz et al. (2006) (Table 2, "Mean" row, Second column).

We use -α here.

References

L. Blitz et al. (2006). The Role of Pressure in GMC Formation II: The H2-Pressure Relation. The Astrophysical Journal, 650(2), 933. doi:10.1086/505417

source
GalaxyInspector.A_BIGIEL2008_BF_MOLECULARConstant

Kennicutt-Schmidt law best-fit for molecular gas, from Bigiel et al. (2008) (Section 4.3, Equation 3).

Power-law index, N, and $A = \log_{10}(a)$, where $a$ is $\Sigma_\mathrm{SFR}$ at the fiducial gas surface density of $10 \, \mathrm{M_\odot \, pc^{-2}}$ are given.

\[\Sigma_\mathrm{SFR} = a \left( \frac{\Sigma_\mathrm{H_2}}{10 \, \mathrm{M_\odot \, pc^{-2}}} \right)^{\!N} \, ,\]

References

F. Bigiel et al. (2008). THE STAR FORMATION LAW IN NEARBY GALAXIES ON SUB-KPC SCALES. The Astrophysical Journal, 136(6), 2846. doi:10.1088/0004-6256/136/6/2846

source
GalaxyInspector.A_BIGIEL2008_MOLECULARConstant

Kennicutt-Schmidt law fits for molecular and neutral gas, from Bigiel et al. (2008) (Table 2, Average).

Power-law index, N, and $A = \log_{10}(a)$, where $a$ is $\Sigma_\mathrm{SFR}$ at the fiducial gas surface density of $10 \, \mathrm{M_\odot \, pc^{-2}}$ are given.

\[\Sigma_\mathrm{SFR} = a \left( \frac{\Sigma_\mathrm{HI, H_2, gas}}{10 \, \mathrm{M_\odot \, pc^{-2}}} \right)^{\!N} \, ,\]

References

F. Bigiel et al. (2008). THE STAR FORMATION LAW IN NEARBY GALAXIES ON SUB-KPC SCALES. The Astrophysical Journal, 136(6), 2846. doi:10.1088/0004-6256/136/6/2846

source
GalaxyInspector.BIGIEL2008_SFR_RANGEConstant

Range of values for

\[\Sigma_\mathrm{SFR} \, [\mathrm{M_\odot \, yr^{-1} \, kpc^{-2}}] \, ,\]

in the seven spiral in Table 1 of Bigiel et al. (2008), with associated molecular data.

The actual values for the SFR density are taken from Table 2 in Bigiel et al. (2010), using only the ones with associated molecular data.

References

F. Bigiel et al. (2008). THE STAR FORMATION LAW IN NEARBY GALAXIES ON SUB-KPC SCALES. The Astrophysical Journal, 136(6), 2846. doi:10.1088/0004-6256/136/6/2846

F. Bigiel et al. (2010). EXTREMELY INEFFICIENT STAR FORMATION IN THE OUTER DISKS OF NEARBY GALAXIES. The Astrophysical Journal, 140(5), 1194. doi:10.1088/0004-6256/140/5/1194

source
GalaxyInspector.COSMO_THRESHOLD_DENSITYConstant

Cosmological threshold density above which the gas cells/particles can turn into stars.

This value corresponds to CritOverDensity $= 57.7 \, [\mathrm{cm^{-3}}]$ in the param.txt file (used only in cosmological simulations). Which is converted to internal units within the code using OverDensThresh = CritOverDensity * OmegaBaryon * 3 * Hubble * Hubble / (8 * M_PI * G). Then, to go to physical units again one has to do:OverDensThresh*UnitDensityincgs*cf_a3inv*HubbleParam*HubbleParam`.

Using the unit factors,

UnitLength_in_cm = $3.085678 \times 10^{24}$

UnitMass_in_g = $1.989 \times 10^{43}$

UnitVelocity_in_cm_per_s = $100000$

The derived units,

UnitTime_in_s = UnitLength_in_cm * UnitVelocity_in_cm_per_s^-1 = $3.08568 \times 10^{19}$

UnitDensity_in_cgs = UnitMass_in_g * UnitLength_in_cm^-3 = $6.76991 \times 10^{-31}$

The parameters,

OmegaBaryon = $0.048$

HubbleParam = $0.6777$

PROTONMASS = $1.67262178 \times 10^{-24}$

HYDROGEN_MASSFRAC = $0.76$

GRAVITY = $6.6738 \times 10^{-8}$

HUBBLE = $3.2407789 \times 10^{-18}$

And the derived parameters,

Hubble = HUBBLE * UnitTime_in_s = $100$

G = GRAVITY * UnitLength_in_cm^-3 * UnitMass_in_g * UnitTime_in_s^2 = $43.0187$

One gets,

OverDensThresh = 76.8495 [internal units of density]

And, for a cosmological simulation at redshift 0 (cf_a3inv = 1), this result in a physical density threshold of $1.42857 \times 10^{-5} \, [\mathrm{cm^{-3}}]$, or adding the proton mass a value of:

$\log_{10} \rho \ [\mathrm{M_\odot \, kpc^{-3}}] = 2.548$

source
GalaxyInspector.DEFAULT_THEMEConstant

Default plot theme.

Regarding the graphic units used, we know that $1 \, \mathrm{mm} = 2.83466 \, \mathrm{pt}$ and $1 \, \mathrm{in} = 25.4 \, \mathrm{mm}$. Then, if we want $1 \, \mathrm{[code\,\,]unit} = 0.1 \, \mathrm{mm}$ in vector graphics, we have to use pt_per_unit = 0.283466.

For pixel images, we control the ppi with px_per_unit. A reasonable high ppi is 600. So, using px_per_unit = $2.3622$ we get $23.622 \, \mathrm{px/mm} \sim 600 \, \mathrm{px/in}$ (remember that $1 \, \mathrm{[code\,\,]unit} = 0.1 \, \mathrm{mm}$).

source
GalaxyInspector.HUBBLE_CONSTANTConstant

Hubble constant in $\mathrm{Gyr^{-1}}$.

This value corresponds to $H_0 = 0.102201 \, \mathrm{Gyr}^{-1} = 100 \, \mathrm{km} \, \mathrm{s}^{-1} \, \mathrm{Mpc}^{-1}$.

source
GalaxyInspector.KS98_SFR_RANGEConstant

Range of values for

\[\Sigma_\mathrm{SFR} \, [\mathrm{M_\odot \, yr^{-1} \, kpc^{-2}}] \, ,\]

from the combine data (Table 1 and 2) in Kennicutt (1998).

References

R. C. Kennicutt (1998). The Global Schmidt Law in Star-forming Galaxies. The Astrophysical Journal, 498(2), 541-552. doi:10.1086/305588

source
GalaxyInspector.MOLLA2015_DATA_PATHConstant

Path to the file with the Milky Way profiles from Mollá et al. (2015).

References

M. Mollá et al. (2015). Galactic chemical evolution: stellar yields and the initial mass function. Monthly Notices of the Royal Astronomical Society 451(4), 3693–3708. doi:10.1093/mnras/stv1102

source
GalaxyInspector.N_KS98Constant

Slope of the Kennicutt-Schmidt law, taken from Kennicutt (1998) (Section 4, Equation 4).

\[\Sigma_\mathrm{SFR} = a \left( \frac{\Sigma_\mathrm{gas}}{1 \, \mathrm{M_\odot \, pc^{-2}}} \right)^{\!N} \mathrm{M_\odot \, yr^{-1} \, kpc^{-2}} \, ,\]

References

R. C. Kennicutt (1998). The Global Schmidt Law in Star-forming Galaxies. The Astrophysical Journal, 498(2), 541-552. doi:10.1086/305588

source
GalaxyInspector.P0Constant

Reference pressure for the molecular fraction-pressure relation, taken from Blitz et al. (2006) (Table 2, "Mean" row, Third column).

References

L. Blitz et al. (2006). The Role of Pressure in GMC Formation II: The H2-Pressure Relation. The Astrophysical Journal, 650(2), 933. doi:10.1086/505417

source
GalaxyInspector.SOLAR_ABUNDANCEConstant

Solar abundances.

They are defined as $12 + \log_{10}(N_\mathrm{X} / N_\mathrm{H})$, where $N_\mathrm{X}$ and $N_\mathrm{H}$ are the number densities of element $\mathrm{X}$ and hydrogen respectively.

References

M. Asplund et al. (2009). The Chemical Composition of the Sun. Annual Review of Astronomy and Astrophysics, 47(1), 481–522. doi:10.1146/annurev.astro.46.060407.145222

source
GalaxyInspector.THRESHOLD_DENSITYConstant

Threshold density above which the gas cells/particles can turn into stars.

This value corresponds to CritPhysDensity $= 0.318 \, [\mathrm{cm^{-3}}]$ in the param.txt file (used in cosmological and non-cosmological simulations). Which is converted to internal units within the code using PhysDensThresh = CritPhysDensity * PROTONMASS / HYDROGEN_MASSFRAC / UnitDensity_in_cgs. Then, to go to physical units again one has to do: PhysDensThresh * UnitDensity_in_cgs * cf_a3inv * HubbleParam * HubbleParam.

PhysDensThresh = $1.03378 \times 10^{6}$ [internal units of density]

For a cosmological simulation at redshift 0 (cf_a3inv = 1), this result in a physical density threshold of $0.192 \, [\mathrm{cm^{-3}}]$, or adding the proton mass a value of:

$\log_{10} \rho \, [\mathrm{M_\odot \, kpc^{-3}}] = 6.677$

source
GalaxyInspector.a_KS98Constant

Intercept of the Kennicutt-Schmidt law, taken from Kennicutt (1998) (Section 4, Equation 4).

\[\Sigma_\mathrm{SFR} = a \left( \frac{\Sigma_\mathrm{gas}}{1 \, \mathrm{M_\odot \, pc^{-2}}} \right)^{\!N} \mathrm{M_\odot \, yr^{-1} \, kpc^{-2}} \, ,\]

References

R. C. Kennicutt (1998). The Global Schmidt Law in Star-forming Galaxies. The Astrophysical Journal, 498(2), 541-552. doi:10.1086/305588

source
GalaxyInspector.CircularGridType

Circular grid (2D or 3D).

Series of concentric rings or spherical shells.

Fields

  • grid::Vector{<:Number}: Vector with the distance of each bin to the center of the grid.
  • ticks::Vector{<:Number}: Vector with the edges of the bins.
  • center::Vector{<:Number}: 3D location of the center of the grid. In the 2D case the grid is assumed to be in the xy plane.
  • bin_area::Vector{<:Number}: Area of each ring.
  • bin_volumes::Vector{<:Number}: Volume of each spherical shell.
  • log::Bool: If the grid is logarithmic.
source
GalaxyInspector.CubicGridType

Cubic grid (3D).

Fields

  • grid::Array{NTuple{3,<:Number},3}: Matrix with the physical coordinates of each voxel in the grid.
  • x_ticks::Vector{<:Number}: Full set of possible values for the x coordinate.
  • y_ticks::Vector{<:Number}: Full set of possible values for the y coordinate.
  • z_ticks::Vector{<:Number}: Full set of possible values for the z coordinate.
  • physical_size::Number: Side length of the cubic grid.
  • n_bins::Int: Number of bins per side of the grid.
  • bin_width::Number: Side length of each bin.
  • bin_area::Number: Face area of each bin.
  • bin_volume::Number: Volume of each bin.
source
GalaxyInspector.GroupCatHeaderType

Data in the "Header" group of a HDF5 group catalog file.

Default values are for when there are no group catalog files.

Fields

  • box_size::Float64 = NaN: Total size of the simulation box.
  • h::Float64 = NaN: Hubble parameter.
  • n_groups_part::Int32 = -1: Number of halos (FoF groups) in this file chunk.
  • n_groups_total::Int32 = -1: Total number of halos (FoF groups) in this snapshot.
  • n_subgroups_part::Int32 = -1: Number of subhalos (subfind) in this file chunk.
  • n_subgroups_total::Int32 = -1: Total number of subhalos (subfind) in this snapshot.
  • num_files::Int32 = -1: Number of file chunks per snapshot.
  • omega_0::Float64 = NaN: The cosmological density parameter for matter.
  • omega_l::Float64 = NaN: The cosmological density parameter for the cosmological constant.
  • redshift::Float64 = NaN: The redshift.
  • time::Float64 = NaN: The physical time/scale factor.
source
GalaxyInspector.GroupCatalogType

Metadata for a group catalog file.

Fields

  • path::Union{String,Missing}: Full path to the group catalog file.
  • header::GroupCatHeader: Header of the group catalog.
source
GalaxyInspector.InternalUnitsType

Unit conversion factors.

Fields

  • x_cgs::Unitful.Length: Length, from internal units to $\mathrm{cm}$.
  • x_cosmo::Unitful.Length: Length, from internal units to $\mathrm{kpc}$.
  • x_comoving::Unitful.Length: Length, from internal units to $\mathrm{ckpc}$.
  • v_cgs::Unitful.Velocity: Velocity, from internal units to $\mathrm{cm \, s^{-1}}$.
  • v_cosmo::Unitful.Velocity: Velocity, from internal units to $\mathrm{km \, s^{-1}}$.
  • m_cgs::Unitful.Mass: Mass, from internal units to $\mathrm{g}$.
  • m_cosmo::Unitful.Mass: Mass, from internal units to $\mathrm{M_\odot}$.
  • t_cgs::Unitful.Time: Time, from internal units to $\mathrm{s}$.
  • t_cosmo::Unitful.Time: Time, from internal units to $\mathrm{Myr}$.
  • U_cgs::Unitful.Energy: Specific energy, from internal units to $\mathrm{erg \, g^{-1}}$.
  • rho_cgs::Unitful.Density: Density, from internal units to $\mathrm{g \, cm^{-3}}$.
  • P_Pa::Unitful.Pressure: Pressure, from internal units to $\mathrm{Pa}$.
source
GalaxyInspector.LinearGridType

Linear grid (1D).

Fields

  • grid::Vector{<:Number}: Vector with the central value of each bin.
  • ticks::Vector{<:Number}: Vector with the edges of the bins.
  • bin_widths::Vector{<:Number}: Widths of the bins.
  • log::Bool: If the grid is logarithmic.
source
GalaxyInspector.PlotParamsType

Plotting parameters for a quantity.

Fields

  • request::Dict{Symbol,Vector{String}} = Dict{Symbol,Vector{String}}(): Data request for readSnapshot. It must have the shape cell/particle type -> [block, block, block, ...].
  • var_name::AbstractString = "": Name of the quantity for the plot axis. It should not include units or scaling factors.
  • exp_factor::Int = 0: Numerical exponent to scale down the axis, e.g. if x_exp_factor = 10 the values will be divided by $10^{10}$. The default is no scaling.
  • unit::Unitful.Units = Unitful.NoUnits: Target unit for the axis.
  • axis_label::AbstractString = "auto_label": Label for the axis. It can contain the string auto_label, which will be replaced by the default label: var_name / 10^exp_factor unit.
source
GalaxyInspector.QtyType

Dimensional information about a physical quantity.

Fields

  • hdf5_name::String: HDF5 block name.
  • dimensions::Unitful.Dimensions: Physical dimensions of the quantity, e.g. Unitful.𝐋 * Unitful.𝐓^-1.
  • unit::Union{Unitful.Units,Symbol}: Units of the quantity within the simulation code. It can be a unit from Unitful or UnitfulAstro, or it can be the symbol :internal which denotes internal code units.
source
GalaxyInspector.SimulationType

Metadata for a simulation.

Fields

  • path::String: Full path to the simulation directory.

  • index::Int: An index associated with the simulation.

  • slice::IndexType: Slice of the simulation, i.e. which snapshots will be read. It can be an integer (a single snapshot), a vector of integers (several snapshots), an UnitRange (e.g. 5:13), an StepRange (e.g. 5:2:13) or (:) (all snapshots).

  • cosmological::Bool: If the simulation is cosmological,

    • false -> Newtonian simulation (ComovingIntegrationOn = 0).
    • true -> Cosmological simulation (ComovingIntegrationOn = 1).
  • table::DataFrame: A dataframe where each row is a snapshot, and the following 8 colums:

    • :ids -> Dataframe index of each snapshot, i.e. if there are 10 snapshots in total it runs from 1 to 10.
    • :numbers -> Number in the file name of each snapshot.
    • :scale_factors -> Scale factor of each snapshot.
    • :redshifts -> Redshift of each snapshot.
    • :physical_times -> Physical time since the Big Bang.
    • :lookback_times -> Physical time left to reach the last snapshot.
    • :snapshot_paths -> Full path to each snapshots.
    • :groupcat_paths -> Full path to each group catalog files.
source
GalaxyInspector.SnapshotType

Metadata for a snapshot.

Fields

  • path::String: Full path to the snapshot.
  • global_index::Int: Index of the snapshot in the context of the whole simulation.
  • slice_index::Int: Index of the snapshot in the context of the slice.
  • physical_time::Unitful.Time: Physical time since the Big Bang.
  • lookback_time::Unitful.Time: Physical time left to reach the last snapshot.
  • scale_factor::Float64: Scale factor of the snapshot.
  • redshift::Float64: Redshift of the snapshot.
  • header::SnapshotHeader: Header of the snapshot.
source
GalaxyInspector.SnapshotHeaderType

Data in the "Header" group of a HDF5 snapshot file.

Fields

  • box_size::Float64: Total size of the simulation box.
  • h::Float64: Hubble parameter.
  • mass_table::Vector{Float64}: Masses of particle types which have a constant mass.
  • num_files::Int32: Number of file chunks per snapshot.
  • num_part::Vector{Int32}: Number of particles (of each type) included in this file chunk.
  • num_total::Vector{UInt32}: Total number of particles (of each type) for this snapshot.
  • omega_0::Float64: The cosmological density parameter for matter.
  • omega_l::Float64: The cosmological density parameter for the cosmological constant.
  • redshift::Float64: The redshift.
  • time::Float64: The physical time/scale factor.
  • l_unit::Unitful.Length: Conversion factor from internal units of length to centimeters.
  • m_unit::Unitful.Mass: Conversion factor from internal units of mass to grams.
  • v_unit::Unitful.Velocity: Conversion factor from internal units of velocity to centimeters per second.
source
GalaxyInspector.SquareGridType

Square grid (2D).

Fields

  • grid::Matrix{NTuple{2,<:Number}}: Matrix with the physical coordinates of each pixel in the grid.
  • x_ticks::Vector{<:Number}: Full set of possible values for the x coordinate.
  • y_ticks::Vector{<:Number}: Full set of possible values for the y coordinate.
  • physical_size::Number: Side length of the square grid.
  • n_bins::Int: Number of bins per side of the grid.
  • bin_width::Number: Side length of each bin.
  • bin_area::Number: Area of each bin.
source