AbsorberExtractor

class salsa.AbsorberExtractor(ds_filename, ion_name='H I', wavelength_center=None, velocity_res=10, absorber_min=None)

Bases: object

Base class for extracting absorbers from a Trident lightray for a given ion species.

Only setup is performed; actual extraction is not performed by this class.

Parameters:
  • ds_filename (str or YT dataset) – Either Path/name of the dataset to be loaded or the dataset itself

  • ray_filename (str or Trident ray) – Path/name of the hdf5 ray file to be loaded or the ray already loaded

  • ion_name (string, optional) – Name of the ion to extract absorbers of Default: “H I”

  • wavelegnth_center (float, optional) – The specific absorption line to look at (in unit Angstrom). None defaults to strongest absorption line for specified ion (using trident’s ion table). Default: None

  • velocity_res (float, optional) – Set minimum resolution (in km/s) for lines. Default: 10

  • absorber_min (float, optional) – Minimum Log Column Density that will be used to define an absorber. If None, defaults to either default for specific ion or 13 Default: None

Methods Summary

close()

close all opened files, dataset, ray

get_all_absorbers(ray_list, *args, **kwargs)

Create catalog of the given rays using absorber extractor

get_current_absorbers(*args, **kwargs)

Stub to be implemented by child classes.

load_ray(new_ray)

loads a new ray into the multi_plot class.

ray_position_prop([units])

returns positional/directional properties of the ray so that it can be used like a vector

Methods Documentation

close()

close all opened files, dataset, ray

get_all_absorbers(ray_list, *args, **kwargs)

Create catalog of the given rays using absorber extractor

Parameters:

ray_list (list of str or trident.ray objects) – List of ray objects or list of trident rays whose absorbers will be extracted

Returns:

full_df – Catalog of absorber properties.

Return type:

astropy QTable

get_current_absorbers(*args, **kwargs)

Stub to be implemented by child classes.

load_ray(new_ray)

loads a new ray into the multi_plot class. (same dataset)

Parameters:

new_ray (str or yt.ray) – either filename to rayfile or a trident ray that’s already opened

ray_position_prop(units='code_length')

returns positional/directional properties of the ray so that it can be used like a vector

Parameters:

units (str, optional) – YT defined units to return arrays in. defaults to ‘code length’. Default: ‘code_length’

Returns:

  • ray_begin (yt.arr) – the starting coordinates of ray

  • ray_end (yt.arr) – the ending coordinates of the ray

  • ray_length (yt.arr) – the length of the ray

  • ray_unit (yt.arr) – unit vector showing direction of the ray