[AstroPy] drizzle on astropy

Gabriele Brambilla gb.gabrielebrambilla at gmail.com
Thu Sep 22 18:30:38 EDT 2016


Hi,

I would like to see how an image get deformed if I know how its coordinates
are deformed. A friend suggested me to look into drizzle in astropy...

for example: here I draw a circle

import numpy as npimport matplotlib.pyplot as pltfrom math import *

plane_side = 500.0 #arcsec

y_l, x_l, = np.mgrid[-plane_side:plane_side:1000j, -plane_side:plane_side:1000j]

r = np.sqrt(y_l**2 + x_l**2)

indexes1 = np.where(r<150.0)
indexes2 = np.where(r>160.0)

image = r.copy()
image[:,:] = 1.0
image[indexes1] = 0.0
image[indexes2] = 0.0

imgplot = plt.imshow(image,cmap="rainbow")
plt.colorbar()
plt.show()

If I want to deform the coordinates like this:

y_c = y_lense**3
x_c = x_lense**2

and plot the image distorted.

Do you have any hint?

Thanks

GB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20160922/aeeca682/attachment.html>


More information about the AstroPy mailing list