From 43a645bddf9ee0108c5272dc4b0c0a567d997364 Mon Sep 17 00:00:00 2001 From: Tyler Cox Date: Fri, 9 Aug 2024 16:01:13 -0700 Subject: [PATCH] outline needed functions --- fftvis/gpu.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 fftvis/gpu.py diff --git a/fftvis/gpu.py b/fftvis/gpu.py new file mode 100644 index 0000000..26a5ca4 --- /dev/null +++ b/fftvis/gpu.py @@ -0,0 +1,50 @@ +import numpy as np +import cupy as cp +import cufinufft +from pyuvdata import UVBeam + +def simulate_gpu( + ants: dict, + freqs: np.ndarray, + fluxes: np.ndarray, + beam, + crd_eq: np.ndarray, + eq2tops: np.ndarray, + baselines: list[tuple[int, int]] | None = None, + precision: int = 2, + polarized: bool = False, + eps: float | None = None, + beam_spline_opts: dict = None, + max_progress_reports: int = 100, + live_progress: bool = True, + flat_array_tol: float = 0.0, +): + """ + GPU accelerated version of simulate_vis + """ + pass + +def do_beam_interpolation( + beam: UVBeam, + az: np.ndarray, + za: np.ndarray, + freq: float, + polarized: bool, + spline_opts: dict = None, +): + """ + Perform beam interpolation, choosing between CPU and GPU implementations + """ + pass + +def _evaluate_beam_gpu( + A_s: np.ndarray, + beam: UVBeam, + az: np.ndarray, + za: np.ndarray, + polarized: bool, + freq: float, + check: bool = False, + spline_opts: dict = None, +): + pass \ No newline at end of file