I want to plot elliptical apertures in different regions on a UV FITS file, for different values for major and minor axes and theta, the angle made by the major axis with positive x-direction. I have an array of values to define the required center for the aperture, the corresponding major and minor axes, and theta values. I'm attaching the code I wrote. However, when defining the aperture, it doesn't accept an array as an eligible value for the major axis, minor axis, or theta.
major1 = uvit['R100'] #R100 is the major axis
axrat1= uvit['axrat'] #axrat are the corresponding axis ratio values
angle1= uvit['ang'] # theta to define angle b/w major axis and +ve x-dir
major = [0]*1429
minor = [0]*1429
theta = [0]*1429
centx = [0]*1429
centy = [0]*1429
for i in range (0,len(xuv)):
pixx, pixy = w1.wcs_world2pix(xuv[i],yuv[i] , 1)
centx[i]=pixx
centy[i] = pixy
major[i] = major1[i]
minor[i] = major1[i]*axrat1[i]
theta[i] = math.radians(angle1[i])
pos = np.vstack((centx, centy)).T
apertcent3=EllipticalAperture(pos, major, minor, theta)
apertcent3.plot(color='#0547f9', lw=3)
norm = simple_norm(data, 'sqrt', percent=99.9)
plt.imshow(data, cmap='Greys_r', origin='lower', norm=norm)
plt.xlim(0, data.shape[1]-1)
plt.rcParams["figure.figsize"] = [50,50]
plt.show()