HERA-Team / matvis

Fast matrix-based visibility simulator
MIT License
2 stars 3 forks source link

vis_gpu() arguments don't match how it is called #14

Closed hughbg closed 2 years ago

hughbg commented 3 years ago

When the GPU is used, it will be called from hera_sim using:

        vis = self._vis_cpu(
            antpos=self.antpos,
            freq=freq,
            eq2tops=eq2tops,
            crd_eq=crd_eq,
            I_sky=I_sky[i],
            beam_list=beam_list if not self.use_pixel_beams else None,
            bm_cube=beam_lm[:, i] if self.use_pixel_beams else None,
            precision=self._precision,
        )

and self._vis_cpu is set to vis_gpu().

However the vis_gpu() function in the vis_cpu repo has this interface:

def vis_gpu(
    antpos: np.ndarray,
    freq: float,
    eq2tops: np.ndarray,
    crd_eq: np.ndarray,
    sky_flux: np.ndarray,
    beams: np.ndarray,
    nthreads: int = NTHREADS,
    max_memory: int = MAX_MEMORY,
    precision: int = 1,
) -> np.ndarray:

When vis_gpu() is is called the keyword arguments don't match up and this error is produced:

TypeError: vis_gpu() got an unexpected keyword argument 'I_sky'