grasp2alm.grasp2alm_lsq

grasp2alm.grasp2alm_lsq(filepath, nside, lmax, mmax, outOftheta_val=-1.6375e+30, interp_method='linear', copol_axis='x', pol=True, tol=1e-10, maxiter=20)[source]

Convert a GRASP file to a spherical harmonic coefficients of beam map by using healpy.map2alm_lsq.

Parameters:
  • filepath (str) – Path to the GRASP file.

  • nside (int) – Resolution parameter for the output beam map.

  • lmax (int) – The desired lmax parameters for the analysis.

  • mmax (int) – The desired mmax parameters for the analysis.

  • outOftheta_val (float) – Value to assign to pixels outside the valid theta range.

  • interp_method (str) – Interpolation method to use. Default is ‘linear’. Supported are ‘linear’, ‘nearest’, ‘slinear’, ‘cubic’, ‘quintic’ and ‘pchip’.

  • copol_axis (str, optional) – Axis of the co-polarization component. Defaults to ‘x’.

  • pol – bool, optional If True, assumes input maps are TQU. Output will be TEB alm’s. (input must be 1 or 3 maps) If False, apply spin 0 harmonic transform to each map. (input can be any number of maps) If there is only one input map, it has no effect. Default: True.

  • tol – float The desired accuracy for the result. Once this is reached, the iteration stops.

  • maxiter – int maximum iteration count after which the minimization is stopped

Returns:

Spherical harmonic coefficients of the beam map.

Return type:

alm (numpy.ndarray)

Raises:

ValueError – If the file format is unknown.