compute_zenith_distance

compute_zenith_distance(field_direction: DirectionDict, epoch: EpochDict, observatory: str, coordinate_frame: str = 'AZELGEO') QuantityDict[source]

Calculate zenith distance for a field at a given time and observatory.

This function uses CASA measures to calculate the zenith distance, similar to how compute_az_el_to_field works in htmlrenderer.py.

Parameters:
  • field_direction -- CASA direction measure dictionary for the field.

  • epoch -- CASA epoch measure dictionary for the observation time.

  • observatory -- Name of the observatory (e.g., 'VLA', 'ALMA').

  • coordinate_frame -- Coordinate frame for the calculation (e.g., 'AZELGEO', 'AZEL'). Defaults to 'AZELGEO'.

Returns:

A CASA quantity dictionary containing the zenith distance in radians.

Examples

>>> direction = {'m0': {'value': 4.18879, 'unit': 'rad'},
...              'm1': {'value': 0.58534, 'unit': 'rad'},
...              'refer': 'J2000', 'type': 'direction'}
>>> epoch = {'m0': {'value': 58089.82, 'unit': 'd'}, 'refer': 'UTC', 'type': 'epoch'}
>>> zd = compute_zenith_distance(direction, epoch, 'VLA')
>>> print(f"{casa_tools.quanta.convert(zd, 'deg')['value']:.2f} degrees")