astrohack.utils.conversion

Functions

to_db(val)

Converts a float value to decibels

convert_unit(unitin, unitout, kind)

Convert between unit of the same kind

convert_5d_grid_to_stokes(grid, pol_axis)

Convert gridded 5D data or aperture data from polariza correlations to Stokes

convert_5d_grid_from_stokes(stokes_grid, ...)

convert_dict_from_numba(func)

hadec_to_elevation(hadec, lat)

Convert HA + DEC to elevation.

casa_time_to_mjd(times)

Module Contents

to_db(val: float)[source]

Converts a float value to decibels :param val: Value to be converted to decibels :type val: float

Returns:

Value in decibels

convert_unit(unitin, unitout, kind)[source]

Convert between unit of the same kind :param unitin: Origin unit :param unitout: Destination unit :param kind: ‘trigonometric’ or ‘length’

Returns:

Conversion factor to go from unitin to unitout

convert_5d_grid_to_stokes(grid, pol_axis)[source]

Convert gridded 5D data or aperture data from polariza correlations to Stokes :param grid: Gridded 5D data expected to be of shape [time, chan, pol, x, y] :param pol_axis: The polarization correlation axis

Returns:

the same data now converted to Stokes parameters

convert_5d_grid_from_stokes(stokes_grid, input_pol_axis, destiny_pol_axis)[source]
convert_dict_from_numba(func)[source]
hadec_to_elevation(hadec, lat)[source]

Convert HA + DEC to elevation.

(HA [rad], dec [rad])

Provided by D. Faes DSOC

casa_time_to_mjd(times)[source]