sim_analysis: A function for measuring the particle properties of the input...

View source: R/sim_analysis.R

sim_analysisR Documentation

A function for measuring the particle properties of the input simulation

Description

The purpose of this function is to measure the true particle properties of the simulation prior to observation. This function produces a list that includes a summary of the total galaxy, a summary of the half-mass properties, and a data.frame containing the radial trends of a series of properties, computed in a series of spherical shells.

Usage

sim_analysis(
  simspin_file,
  type = "stars",
  half_mass = NA,
  bin_breaks = NA,
  verbose = F,
  shape = T
)

Arguments

simspin_file

The path to the location of the SimSpin .Rdata file OR output list from make_simspin_file().

type

String "stars" (default) or "gas" to specify which set of of particles are used in the property calculations.

half_mass

If simulation file contains all particles cutout from a box (rather than just particles from a single galaxy), you can the half-mass value at which the alignment function is run. Numeric length = 1. Default is NA, in which case half the total mass of the supplied simulation data is used.

bin_breaks

Optional parameter that allows you to specify radial bin break positions. Default will give bins spaced with varying sized bins: 'seq(0, 9, by=1), seq(12, 51, by=3), seq(61, 101, by=10), seq(151, 501, by=50)'

verbose

Boolean to describe if the code should give updates on progress. Default is FALSE.

shape

Boolean to describe whether or not the shape of the system should be measured at increasing radii. Default is TRUE.

Value

Returns a list that contains:

Properties

list()

HalfMassProperties

list()

RadialTrends_Spherical

data.frame()

RadialTrends_Cylindrical

data.frame()

where Properties includes:

Type

Component considered within analysis

TotalMass

Total mass (solar)

MeanAge

Mean age (Gyr)

MeanMetallicity

Mean metallicity (fraction of solar)

NumberOfParticles

Total number of particles

where HalfMassProperties includes:

Mass

Half mass (solar)

RadiusCircular

Circularised radius at half-mass (kpc)

RadiusElliptical

Elliptical radius at half-mass given shapes p & q (kpc)

Shape_p

Axis ratio (b/a) of particles within half-mass

Shape_q

Axis ratio (c/a) of particles within half-mass

where RadialTrends_Spherical includes:

Radius

Radial coordinate at the centre of the radial bin (kpc)

Mass

Mass (solar) contained within radial bin

CumulativeMass

Mass (solar) of all particles contained within radius of this bin

Density

Mass density of shell (Msol/kpc^3)

Age

Mean age (Gyr) of particles within radial bin

Metallicity

Mean metallicity (fraction of solar) of particles within radial bin

VelocityAnisotropy

Beta parameter of particles within radial bin

SpinParameter_Bullock

Bullock et al (2001) spin parameter measured from all particles contained within radius of this bin

SpecificAngularMomentum

Mass weighted angular momentum, j (kpc km/s), of particles within radial bin

Shape_p

Axis ratio (b/a) of all particles within radius of this bin

Shape_q

Axis ratio (c/a) of all particles within radius of this bin

,

NumberOfParticles

Number of particles contained within radial bin

where RadialTrends_Cylindrical includes:

Radius

Radial coordinate at the centre of the radial bin (kpc)

Mass

Mass (solar) contained within radial bin

CumulativeMass

Mass (solar) of all particles contained within radius of this bin

Density

Mass density of shell (Msol/kpc^3)

Age

Mean age (Gyr) of particles within radial bin

Metallicity

Mean metallicity (fraction of solar) of particles within radial bin

CircularVelocity

Circular velocity (km/s) due to mass contained within radius of this bin

RotationalVelocity

Mean velocity along circular orbits (km/s) in radial bin

RotationalDispersion

Standard deviation of velocities in circular orbits (km/s) in radial bin

Circularity

The circularity parameter j[z]/j[circ](E), as defined in Abadi et al. (2003).

KappaRot

The fraction of kinetic energy of the system contained within a rotational component, as defined by Sales et al. (2010).

KappaCoRot

The fraction of kinetic energy of the system conatined within a co-rotating component, as defined by Correa et al. (2017).

SpinParameter_Wilkinson

The stellar spin parameter as defined in Wilkinson et al (2023).

DisktoTotal

The mass fraction of orbits with circularity > 0.7, as defined by Sales et al. (2010).

SpheroidtoTotal

Twice the mass fraction of counter-rotating orbits, as defined in Wilkinson et al. (2023).

NumberOfParticles

Number of particles contained within radial bin

Examples

ss_gadget = system.file("extdata", "SimSpin_example_Gadget_spectra.Rdata",
                        package = "SimSpin")
props = sim_analysis(simspin_file = ss_gadget)


kateharborne/SimSpin documentation built on March 27, 2024, 7:10 a.m.