twist_galaxy: Twisting the galaxy relative to the observer.

View source: R/RcppExports.R

twist_galaxyR Documentation

Twisting the galaxy relative to the observer.

Description

The purpose of this function is to re-orient the galaxy and rotate the observer around the z-axis.

Usage

twist_galaxy(part_data, twist_rad)

Arguments

part_data

A data.frame describing the particles positions and velocities.

twist_rad

The observed inclination angle in radians.

Value

Returns the original data frame containing the original particle information but in the new orientation.

Examples

  galaxy_data = data.frame("x"=stats::rnorm(100), "y"=stats::rnorm(100),
                           "z"=stats::rnorm(100), "vx"=stats::rnorm(100),
                           "vy"=stats::rnorm(100), "vz"=stats::rnorm(100))
  observed_data = twist_galaxy(galaxy_data, twist_rad = 1.047)

kateharborne/SimSpin documentation built on April 28, 2024, 2 p.m.