diff --git a/grasp2alm/beam_cut.py b/grasp2alm/beam_cut.py index ce5da4b..5f0992b 100644 --- a/grasp2alm/beam_cut.py +++ b/grasp2alm/beam_cut.py @@ -115,14 +115,14 @@ def to_polar(self, copol_axis="x"): assert copol_axis in ["x", "y"], "Error in BeamCut.to_polar: copol_axis must be 'x' or 'y'" nphi = int(2 * self.ncut) - ntheta = int(self.vnum // 2) + ntheta = int(self.vnum // 2)+1 theta_rad_min = 0.0 theta_rad_max = np.deg2rad(np.abs(self.vini)) beam_polar = BeamPolar(nphi, ntheta, theta_rad_min, theta_rad_max, self.filename) amp_tmp = np.zeros((2, nphi, ntheta), dtype=complex) for i in range(self.ncut): - amp_tmp[:, i, :] = self.amp[:, ntheta:self.vnum-1, i] + amp_tmp[:, i, :] = self.amp[:, ntheta-1:self.vnum+1, i] amp_tmp[:, self.ncut + i, :] = self.amp[:, ntheta-1::-1, i] if copol_axis == "x":