vice.toolkit.hydrodisk.hydrodiskstars.decomp_filter

Filter the star particles from the hydrodynamic simulation based on the kinematic decomposition.

Parameters

valueslist [elements of type int]

The integer values of the “decomp” column in the analog_data attribute to base the filter on. Those with a decomposition tag equal to one of the values in this list will pass the filter and remain in the sample.

Note

The integer values mean that an individual star particle has kinematics associated with the following sub-populations:

  • 1: thin disk

  • 2: thick disk

  • 3: bulge

  • 4: pseudobulge

  • 5: halo

Example Code

>>> from vice.toolkit.hydrodisk import hydrodiskstars
>>> import numpy as np
>>> example = hydrodiskstars(np.linspace(0, 20, 81))
>>> len(example.analog_data['id'])
102857
>>> example.decomp_filter([1, 2]) # disk stars only
>>> len(example.analog_data['id'])
57915
>>> all([i in [1, 2] for i in example.analog_data['decomp']])
True
>>> example = hydrodiskstars(np.linspace(0, 20, 81))
>>> len(example.analog_data['id'])
102857
>>> example.decomp_filter([3, 4]) # bulge stars only
>>> len(example.analog_data['id'])
44942
>>> all([i in [3, 4] for i in example.analog_data['decomp']])
True