voronoi | R Documentation |
The purpose of this function is to bin particles into Voronoi tesselated pixels which meet a minimum particle per pixel limit to reduce the effects of shot noise on the resulting kinematic measurements.
voronoi(
part_in_spaxel,
obs,
particle_limit,
roundness_limit = 0.3,
uniform_limit = 0.8,
verbose = F
)
part_in_spaxel |
The list containing the pixel position
( |
obs |
The list produced as part of the |
particle_limit |
Numeric. The minimum number of requested particles per pixel. |
roundness_limit |
Numeric float between 0 and 1. Default is 0.3. Describes how round pixels should be within the voronoi tesselation, where 0 is perfectly round and 1 is elongated. |
uniform_limit |
Numeric float between 0 and 1. Default is 0.8. Describes how close to the particle limit joined pixels must be to be binned together. |
verbose |
Boolean. Default is FALSE. Outputs running commentary of code progress when TRUE. |
Returns a list mimicking part_in_spaxel
input, but with each
row describing a voronoi bin and $pixel_pos
describing all pixel
positions within that bin. List should contain:
pixel_pos
- a numeric array containing all pixel positions
within a givien voronoi bin.
ID
- a numeric array of the particle IDs belonging within the
voronoi bin.
N
- the number of particles within the voronoi bin.
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(),
voronoi_bin = TRUE, vorbin_limit = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.