Skip to content

Commit 5782478

Browse files
committed
added create_aperture_mask to NgvlaPrototype.
1 parent d567006 commit 5782478

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

src/astrohack/antenna/telescope.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,28 @@ def create_aperture_mask(
428428
self,
429429
u_axis,
430430
v_axis,
431-
exclude_arms=True,
431+
_=True,
432432
return_polar_meshes=False,
433433
use_outer_limit=False,
434434
):
435-
return
435+
u_mesh, v_mesh, radius_mesh, polar_angle_mesh = create_coordinate_images(
436+
u_axis, v_axis, create_polar_coordinates=True
437+
)
438+
439+
if use_outer_limit:
440+
outer_radius = self.outer_radial_limit
441+
else:
442+
outer_radius = self.diameter / 2.0
443+
444+
mask = np.full_like(radius_mesh, True, dtype=bool)
445+
mask = np.where(radius_mesh > outer_radius, False, mask)
446+
# This line does not need to be included as there is no blockage in the ngvla!
447+
# mask = np.where(radius_mesh < self.inner_radial_limit, False, mask)
448+
449+
if return_polar_meshes:
450+
return mask, radius_mesh, polar_angle_mesh
451+
else:
452+
return mask
436453

437454
def phase_to_deviation(self, radius, phase, wavelength):
438455
return

0 commit comments

Comments
 (0)