processing_components/skycomponent/operations.py
def image_voronoi_iter(im: Image, components: Skycomponent) -> collections.Iterable:
    """Iterate through Voronoi decomposition, returning a generator yielding fullsize images

    :param im: Image
    :param components: Components to define Voronoi decomposition
    """
    if len(components) == 1:
        mask = numpy.ones(im.data.shape)
        yield create_image_from_array(mask, wcs=im.wcs,
                                      polarisation_frame=im.polarisation_frame)
    else:
        vor, vertex_array = voronoi_decomposition(im, components)
        
        nregions = numpy.max(vertex_array) + 1
        for region in range(nregions):
            mask = numpy.zeros(im.data.shape)
            mask[(vertex_array == region)[numpy.newaxis, numpy.newaxis,...]] = 1.0
            yield create_image_from_array(mask, wcs=im.wcs,
                                          polarisation_frame=im.polarisation_frame)
Iterate through Voronoi decomposition, returning a generator yielding fullsize images

    :param im: Image
    :param components: Components to define Voronoi decomposition
    
Iterate through Voronoi decomposition, returning a generator yielding fullsize images
Iterate through Voronoi decomposition returning a generator yielding fullsize images
def image_voronoi_iter(im: Image, components: Skycomponent) -> collections.Iterable:
    if len(components) == 1:
        mask = numpy.ones(im.data.shape)
        yield create_image_from_array(mask, wcs=im.wcs,
                                      polarisation_frame=im.polarisation_frame)
    else:
        vor, vertex_array = voronoi_decomposition(im, components)
        nregions = numpy.max(vertex_array) + 1
        for region in range(nregions):
            mask = numpy.zeros(im.data.shape)
            mask[(vertex_array == region)[numpy.newaxis, numpy.newaxis,...]] = 1.0
            yield create_image_from_array(mask, wcs=im.wcs,
                                          polarisation_frame=im.polarisation_frame)
def image_voronoi_iter ( im : Image , components : Skycomponent ) -> collections . Iterable : if len ( components ) == 1 : mask = numpy . ones ( im . data . shape ) yield create_image_from_array ( mask , wcs = im . wcs , polarisation_frame = im . polarisation_frame ) else : vor , vertex_array = voronoi_decomposition ( im , components ) nregions = numpy . max ( vertex_array ) + 1 for region in range ( nregions ) : mask = numpy . zeros ( im . data . shape ) mask [ ( vertex_array == region ) [ numpy . newaxis , numpy . newaxis , ... ] ] = 1.0 yield create_image_from_array ( mask , wcs = im . wcs , polarisation_frame = im . polarisation_frame )
Iterate through Voronoi decomposition, returning a generator yielding fullsize images
Iterate through Voronoi decomposition returning a generator yielding fullsize images
"""Iterate through Voronoi decomposition, returning a generator yielding fullsize images

    :param im: Image
    :param components: Components to define Voronoi decomposition
    """
im
Image
None
components
Skycomponent
Components to define Voronoi decomposition
Components to define Voronoi decomposition