-
Notifications
You must be signed in to change notification settings - Fork 8
Transform class
pgabor edited this page Sep 14, 2017
·
1 revision
To provide a DFT (Discrete Fourier Transformation) and an IDFT (Inverse Discrete Fourier Transformation) method which can be used to create visbility values from intensity maps and in the other way around.
Importing it into your project is fairly easy:
from xrayvision.Transform import Transform
The class has only static functions which means there is no need to instantiate an object for use.
With this function an input image can be converted into visibility values at ceratin points. It can be used in the following way:
visibility_values = Transform.dft(image, uv, vis)
- image is an np.array and contains intensity values for each pixel
-
uv is a 2D np.array which contains the u, v coordinates where the visibility values have to be calculated. It has to have
[[u], [v]]
format. - vis is an 1D np.array with the length of the count of the given u,v coordinates, the data will be stored into this array
The return value is the calculated visibility values in a numpy array.
With this function an intensity map can be createt from provided visibilities:
visibility_values = Transform.idft(image_placeholder, uv, vis)
- image_placeholder is an np.array and it must have the expected size of the final image
-
uv is a 2D np.array which contains the u, v coordinates where the visibility values are known. It has to have
[[u], [v]]
format. - vis is an 1D np.array with the length of the count of the given u,v coordinates and it should contain the corresponding visibility values
The return value is the calculated intensity map with the same size what image has in a numpy array.