View source: R/build_datacube.R
build_datacube | R Documentation |
The purpose of this function is to generate a mock IFU data cube from
a SimSpin file, as generated using the make_simspin_file()
function.
The data cube produced can be either a spectral cube or a velocity cube.
build_datacube(
simspin_file,
telescope,
observing_strategy,
method,
verbose = F,
write_fits = F,
output_location,
object_name = "GalaxyID_unknown",
telescope_name = "SimSpin",
observer_name = "Anonymous",
split_save = F,
cores = 1,
mass_flag = F,
voronoi_bin = F,
vorbin_limit = 10
)
simspin_file |
The path to the location of the SimSpin .Rdata file OR
output list from |
telescope |
An object of the telescope class describing the
specifications of the observing telescope (i.e. field of view, spatial
resolution, wavelength resolution, etc.). See
|
observing_strategy |
An object of the observing_strategy class that
describes the properties of the observed simulation (i.e. redshift,
inclination, seeing conditions). See |
method |
String to describe whether cubes output are "spectral", "gas", "sf gas" or "velocity" (as in SimSpin v1) along the z-axis. Default is "spectral". |
verbose |
Default is |
write_fits |
Default is |
output_location |
Optional parameter that describes the path and file
name of the FITS file output if |
object_name |
Optional string used in |
telescope_name |
Optional string used in |
observer_name |
Optional string used in |
split_save |
Boolean describing whether to split the output from
|
cores |
Float describing the number of cores to run the interpolation and velocity gridding on. Default is 1. |
mass_flag |
Boolean flag that, when set to TRUE, will compute properties using a mass weighting rather than a luminosity weighting. Default is FALSE. |
voronoi_bin |
Boolean flag that, when set to TRUE, will bin pixels into
voronoi tessellated cells that contain a minimum number of particles per
pixel, specified by |
vorbin_limit |
Integer float that describes the minimum number of
particles per pixel within a given bin, only used if |
Returns a list containing four elements:
spectral_cube
or velocity_cube
- a 3D array containing
either a spectral cube or a velocity cube, where the output type is
determined by the method
selected in the telescope
function.
observation
- a list containing a summary of the details of the
observation (i.e. the output from the function observation()
).
raw_images
- a list of 2D arrays, where each 2D array represents
a raw particle image gridded as for the observation details.
observed_images
- NULL or a list of 2D arrays (again, where the
output type is determined by the method
selected in the
telescope
function.) containing kinematic images of the collapsed
cube. If blur=T
, these images will be blurred to the specified amount.
If write_fits = T
, a .fits file that contains a the generated cube and
relevant header describing the mock observation will also be produced at the
specified output_location
.
ss_gadget = system.file("extdata", "SimSpin_example_Gadget_spectra.Rdata",
package = "SimSpin")
cube = build_datacube(simspin_file = ss_gadget,
telescope = telescope(type="SAMI"),
observing_strategy = observing_strategy())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.