get_ax
- mdtools.dtrj.get_ax(ax_cmp=None, ax_fr=None)[source]
Return the frame/compound axis for a discrete trajectory given its compound/frame axis.
- Parameters:
- Returns:
- Raises:
numpy.exceptions.AxisError – If the given compound/frame axis is out of bounds for a discrete trajectory with two dimensions.
Notes
All returned axis indices will be positive.
Examples
>>> mdt.dtrj.get_ax(ax_cmp=0) (0, 1) >>> mdt.dtrj.get_ax(ax_cmp=1) (1, 0) >>> mdt.dtrj.get_ax(ax_cmp=-1) (1, 0) >>> mdt.dtrj.get_ax(ax_cmp=-2) (0, 1)
>>> mdt.dtrj.get_ax(ax_fr=0) (1, 0) >>> mdt.dtrj.get_ax(ax_fr=1) (0, 1) >>> mdt.dtrj.get_ax(ax_fr=-1) (0, 1) >>> mdt.dtrj.get_ax(ax_fr=-2) (1, 0)