MWATelescope / mwa_pb

MWA Primary Beam model code
MIT License
2 stars 8 forks source link

2to3 #3

Closed cjordan closed 4 years ago

NickSwainston commented 5 years ago

I was testing the full_ee in python 3 and it currently doesn't work. I fixed a few bugs in the previous commits but there are more that have me stumped and may require someone with a greater understanding of the code.

The current error is: za = [[0., 0., 0.]]; az = [[0., 0.001, 0.002]]; freq = 150000000; delays = [[6, 6, 6, 6, 4, 4, 4, 4, 2, 2, 2, 2, 0, 0, 0, 0], [6, 6, 6, 6, 4, 4, 4, 4, 2, 2, 2, 2, 0, 0, 0, 0]]; from mwa_pb import primary_beam as pb gx, gy = pb.MWA_Tile_full_EE(za, az, freq=int(freq*1e6), delays=delays, power=True, zenithnorm=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/group/mwa/software/mwa_pb/python3/mwa_pb/primary_beam.py", line 52, in MWA_Tile_full_EE j = mybeam.get_interp_response(az, za, pixels_per_deg) File "/group/mwa/software/mwa_pb/python3/mwa_pb/beam_full_EE.py", line 434, in get_interp_response gridded_Jones = self.get_FF(mygrid['phi_1D'], mygrid['theta_1D'], grid=True) File "/group/mwa/software/mwa_pb/python3/mwa_pb/beam_full_EE.py", line 551, in get_FF emn_T = (1.0j) ** N * (P_sin * (M_u * Q2 - M * Q1) + Q2 * P1) * phi_const ValueError: operands could not be broadcast together with shapes (451,3) (451,2046)

andreww5au commented 4 years ago

I've just merged 2to3 (and skyfield_port) into the master branch.