z_to_portnum

bapsflib.lapd.tools.tools.z_to_portnum(z: int | float | Quantity, unit='cm', round_to_nearest=False) Quantity

Converts LaPD axial z location to port number.

Parameters:
  • z (Union[int, float, u.Quantity]) – axial z location

  • unit (str, optional) – string or astropy.units specifying unit type

  • round_to_nearest (bool, optional) – False (DEFAULT), True will round the port number to the nearest full integer

  • note:: (..) – Port 53 defines z = 0 cm and is the most Northern port. The +z axis points South towards the main cathode.