generate_lrays
- salsa.generate_lrays(ds, center, n_rays, max_impact_param, min_impact_param=0.0, length=200, fld_params={}, ion_list=['H I', 'C IV', 'O VI'], fields=None, ftype='gas', ray_directory='./')
Generate a sample of trident lightrays that randomly, uniformly cover impact parameter.
- Parameters:
ds_file (str or YT Dataset) – path to dataset or already loaded, YT dataset
center (arr) – coordinates of the center of the galaxy
n_rays (int) – number of light rays to construct
max_impact_param (float) – maximum impact param to sample from in kpc
min_impact_param (float) – minimum impact param to sample from in kpc
length (float) – length of the sightline in kpc
ion_list (list) – ions to add to lightray
fields (list) – fields to add to lightray
ftype (str) – The field to be passed to trident that ion fields will be added to, i.e. (‘gas’, ‘H_p0_number_density’). ‘gas’ should work for most grid-based simulations. For particle-based simulations this will not work and needs to be changed. ‘PartType0’ often works though it varies. See trident.add_ion_fields() for more information
ray_directory (string) – path to where ray files will be written