random_sightlines¶
-
salsa.random_sightlines(ds_file, center, num_sightlines, max_impact_param, min_impact_param=0, length=200)¶ randomly sample impact parameter to get random sightlines from a given galaxy center
- Parameters
ds_file (str or YT dataset) – path to dataset to loar or already loaded dataset
center (array like) – coordinates of the center of the galaxy in units code_length
num_sightlines (int) – number of sightlines to return
max_impact_param (float) – maximum impact param to sample from in kpc
min_impact_param (float, optional) – minimum impact param to sample from in kpc Default: 0.
length (float, optional) – length of the sightline in kpc Default: 200
- Returns
start_points (array) – 2d array of the startpoints for each sightline in code_length
end_points (array) – 2d array of the endpoints for each sightline in code_length
impact_param (array) – array of impact parameters for each ray created in kpc