#include <cufft.h>
#include <thrust/complex.h>
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <cmath>
#include <algorithm>
#include <vector>
Go to the source code of this file.
|
void | uniformImage (const std::vector< std::vector< std::complex< double > > > &visibilities_batch, const std::vector< std::vector< double > > &u_batch, const std::vector< std::vector< double > > &v_batch, int image_size, std::vector< std::vector< double > > &images, bool use_predefined_params) |
| Generate a uniform image from visibilities using FFT.
|
|
__global__ void | mapVisibilitiesMultiDir (cufftDoubleComplex *grid, const cufftDoubleComplex *visibilities, const double *u, const double *v, double uv_max, double grid_res, int image_size, int num_visibilities, int num_directions) |
| Map visibilities to a grid for multiple directions (batches).
|
|
void | fftshift (thrust::device_vector< cufftDoubleComplex > &data, int width, int height) |
| Perform a 2D FFT shift on a thrust::device_vector.
|
|
void | computeUVW (const std::vector< double > &x_m, const std::vector< double > &y_m, const std::vector< double > &z_m, const std::vector< double > &HAs, const std::vector< double > &Decs, std::vector< std::vector< double > > &u, std::vector< std::vector< double > > &v, std::vector< std::vector< double > > &w) |
| Compute UVW coordinates from XYZ coordinates for multiple directions.
|
|
◆ computeUVW()
void computeUVW |
( |
const std::vector< double > & | x_m, |
|
|
const std::vector< double > & | y_m, |
|
|
const std::vector< double > & | z_m, |
|
|
const std::vector< double > & | HAs, |
|
|
const std::vector< double > & | Decs, |
|
|
std::vector< std::vector< double > > & | u, |
|
|
std::vector< std::vector< double > > & | v, |
|
|
std::vector< std::vector< double > > & | w ) |
Compute UVW coordinates from XYZ coordinates for multiple directions.
- Parameters
-
x_m | X coordinates of the antennas. |
y_m | Y coordinates of the antennas. |
z_m | Z coordinates of the antennas. |
HAs | Hour angles for multiple directions. |
Decs | Declinations for multiple directions. |
u | Output U coordinates for multiple directions. |
v | Output V coordinates for multiple directions. |
w | Output W coordinates for multiple directions. |
use_predefined_params | Flag to determine if predefined parameters should be used. |
◆ fftshift()
void fftshift |
( |
thrust::device_vector< cufftDoubleComplex > & | data, |
|
|
int | width, |
|
|
int | height ) |
Perform a 2D FFT shift on a thrust::device_vector.
- Parameters
-
data | Data to be shifted. |
width | Width of the data array. |
height | Height of the data array. |
◆ mapVisibilitiesMultiDir()
__global__ void mapVisibilitiesMultiDir |
( |
cufftDoubleComplex * | grid, |
|
|
const cufftDoubleComplex * | visibilities, |
|
|
const double * | u, |
|
|
const double * | v, |
|
|
double | uv_max, |
|
|
double | grid_res, |
|
|
int | image_size, |
|
|
int | num_visibilities, |
|
|
int | num_directions ) |
Map visibilities to a grid for multiple directions (batches).
- Parameters
-
grid | Output grid to store the mapped visibilities. |
visibilities | Input visibilities to map. |
u | U coordinates of visibilities. |
v | V coordinates of visibilities. |
uv_max | Maximum UV coordinate value. |
grid_res | Resolution of the grid. |
image_size | Size of the output image. |
num_visibilities | Number of visibilities. |
num_directions | Number of directions. |
◆ uniformImage()
void uniformImage |
( |
const std::vector< std::vector< std::complex< double > > > & | visibilities_batch, |
|
|
const std::vector< std::vector< double > > & | u_batch, |
|
|
const std::vector< std::vector< double > > & | v_batch, |
|
|
int | image_size, |
|
|
std::vector< std::vector< double > > & | images, |
|
|
bool | use_predefined_params ) |
Generate a uniform image from visibilities using FFT.
- Parameters
-
visibilities_batch | Batch of visibilities for multiple directions. |
u_batch | U coordinates for multiple directions. |
v_batch | V coordinates for multiple directions. |
image_size | Size of the output image. |
images | Output images. |
use_predefined_params | Flag to determine if predefined parameters should be used. |