facet_to_subgrid_2d_method_2
- ska_sdp_exec_swiftly.fourier_transform_dask.facet_to_subgrid_2d_method_2(facet, distr_fft_class, base_arrays, use_dask=False)[source]
- Approach 2: First, do prepare_facet on the horizontal axis
(axis=0), then for loop for the horizontal subgrid direction, and do extract_subgrid within same loop do prepare_facet in the vertical case (axis=1), then go into the fila subgrid loop in the vertical dir and do extract_subgrid for that
However, remember that prepare_facet increases the amount of data involved, which in turn means that we need to shuffle more data through subsequent computations. Therefore it is actually more efficient to first do the subgrid-specific reduction, and then continue with the (constant) facet preparation along the other axis. We can tackle both axes in whatever order we like, it doesn’t make a difference for the result.
- Parameters:
facet – 2D numpy array of facets
distr_fft_class – StreamingDistributedFFT class object
base_arrays – BaseArrays class object
use_dask – use dask.delayed or not
- Returns:
approximate subgrid array (subgrids derived from facets)