kateharborne / SimSpin

SimSpin - A package for the kinematic analysis of galaxy simulations
https://kateharborne.github.io/SimSpin/
GNU Lesser General Public License v3.0
23 stars 3 forks source link
galaxies ifs kinematics simulation

SimSpin

R-CMD-check codecov ascl:1903.006

 

v2.9.5 - A package for producing mock observations:

SimSpin allows you to take a simulation of a galaxy and produce a data cube in the style of an Integral Field Spectroscopy (IFS) instrument. You can find the live documentation for this code at the following website.

A mock observation is produced using three simple steps:

  1. Read in your particle data and produce the relevant spectra using the make_simspin_file function.
  2. Setup the observation by defining your telescope and observing_strategy.
  3. Build your data cube using the build_datacube.

The data cube produced can be saved as a FITS file for ease of comparison with real observations. This package, once installed, is fully documented and tested.

Another implementation of this code (SimSpin v1.1.3) written in Julia is also available at SimSpin.jl developed by Gerry Gralton.

Package installation

To install directly into R:

install.packages("devtools")
library(devtools)
install_github("kateharborne/SimSpin")

Else, please fork a copy of this repository for your own development using the code button to the upper right.

Package examples

The following lines will take you from a particle simulation of a galaxy, an example of which is included in this package, through to the production of a mock-IFS data cube.

ss_file = make_simspin_file(filename = system.file("extdata","SimSpin_example_Gadget",
                                                    package = "SimSpin"),
                            write_to_file = FALSE) # generate a spectra file

SAMI = telescope(type="SAMI")                      # initialise a telescope

strategy = observing_strategy(dist_z = 0.05)       # initialise obsering conditions

cube = build_datacube(simspin_file = ss_file,      # build data cube
                      telescope = SAMI,
                      observing_strategy = strategy,
                      method = "spectral")

For a longer example of how each function can be used, please take a look at the documentation for the package. Short examples for each function are provided in each function's documentation, as well as an explanation of each of the possible input variables.

From within R, you can display the package documentation by typing ?SimSpin and select "Index" at the bottom of the page to view all available functions. Alternatively, type ? followed by the function name to see function specific documentation.

Longer examples are published online and demonstrate a walk-through the basic code operation for SimSpin v2.5.0.

If you have any further questions or requests for features in the code, report an issue or drop an email to katherine.harborne\@uwa.edu.au.

Citation

If you use this code in any of your own published research, please make sure to include the following citations in your bibliography:

NEW PUBLICATION K.E. Harborne, A. Serene, E.J.A. Davies, C. Derkenne, S. Vaughan, A.I. Burdon, C. del P. Lagos, R. McDermid, S. O'Toole, C. Power, A.S.G Robotham, G. Santucci, R. Tobar (2023), SimSpin v2.6.0—constructing synthetic spectral IFU cubes for comparison with observational surveys, Publications of the Astronomical Society of Australia, Volume 40, article id. e048

K.E. Harborne, C.Power and A.S.G. Robotham, (2020), "SIMSPIN - Constructing mock IFS kinematic data cubes", Publications of the Astronomical Society of Australia, Volume 37, article id. e016

K.E. Harborne, (2019), "SimSpin: Kinematic analysis of galaxy simulations", Astrophysics Source Code Library, record ascl:1903.006