RadioImagerGPU 1.0
|
RadioImagerGPU is a project developed as part of the CS 179 course at Caltech. It focuses on developing a GPU-accelerated imager for radio telescope arrays, optimizing the imaging process in arrays with dense UVW sampling. By leveraging the parallel processing capabilities of GPUs, this project aims to enhance the efficiency and performance of radio imaging, potentially simplifying the imaging pipeline and reducing the reliance on complex deconvolution algorithms.
Radio telescopes capture data known as visibilities, which are the Fourier transform of the sky's brightness distribution. Processing this data involves complex calculations that can be computationally intensive, especially for large datasets. Traditional CPU-based methods often struggle with the high computational load, leading to slower processing times.
GPUs, with their ability to perform parallel processing, are well-suited for handling these intensive computations. They can efficiently manage the gridding of visibilities, apply complex weighting schemes, and perform fast Fourier transforms (FFTs). This makes GPUs ideal for enhancing the speed and efficiency of radio imaging processes, allowing for real-time imaging and handling larger datasets with higher precision.
Additionally, the project involves calculating UVW coordinates from XYZ positions of the antennas. The visibility function is calculated using an integral that accounts for the brightness distribution of the sky as a function of celestial coordinates and spatial frequency coordinates.
By optimizing these computations using GPU acceleration, RadioImagerGPU aims to provide a more efficient and scalable solution for radio telescope imaging.
To fully utilize the GPU acceleration capabilities, ensure you have a compatible NVIDIA GPU. Below is the hardware and software setup used for developing and testing this project:
requirements.txt
.Clone the repository and navigate to the project directory:
Use CMake to configure and build the project:
The config.json
file is used to configure key parameters for the RadioImager
program. This file should be located in the root directory of the repository. The configuration parameters include:
IMAGE_SIZE
: The size of the output image in pixels.PREDEFINE_MAX_UV
: The predefined maximum UV distance parameter essentially makes the resolution of the final images predefined and not dependent on the calculated UV coordinates when the corresponding option is enabled.One can run the GPU-accelerated imager from the root of the repository with:
For detailed GPU implementation instructions, please refer to GPU Implementation.
To run the CPU version from the root of the repository, use:
For detailed CPU implementation instructions, please refer to CPU Implementation.
To run the tests and compare images generated by CUDA and Python implementations, execute the following script from the root of the project:
For detailed information about the tests, refer to Tests for RadioImagerGPU.
The GPU-accelerated RadioImager shows improvements compared to the CPU implementation. Below is an example of a performance comparison with different numbers of arrays (elements) in the case of 10 directions. The plots on the left show a log scale, and on the right, a linear scale. The GPU outperforms the optimized CPU version, which uses vectorized NumPy operations, for different parts of the calculation (UVW, Imaging, and Total times). For a more detailed description of the results, please refer to the Analysis.
Apart from the aforementioned READMEs, additional documentation is available in the docs
directory as HTML files, which were generated with Doxygen and the Doxyfile. These can be examined in the docs
directory.
This is a toy imager that needs to be updated to be used in practical real-world scenarios. Some features that can be added for that include:
For questions, please contact nakosogorov@gmail.com or open an issue on GitHub.