processing_library/image/operations.py
def create_empty_image_like(im: Image) -> Image:
    """ Create an empty image like another in shape and wcs

    :param im:
    :return: Image
    
    """
    assert isinstance(im, Image), im
    fim = Image()
    fim.polarisation_frame = im.polarisation_frame
    fim.data = numpy.zeros_like(im.data)
    if im.wcs is None:
        fim.wcs = None
    else:
        fim.wcs = copy.deepcopy(im.wcs)
    if image_sizeof(im) >= 1.0:
        log.debug("create_empty_image_like: created %s image of shape %s, size %.3f (GB)" %
                  (fim.data.dtype, str(fim.shape), image_sizeof(fim)))
    assert isinstance(fim, Image), "Type is %s" % type(fim)
    return fim
 Create an empty image like another in shape and wcs

    :param im:
    :return: Image
    
    
Create an empty image like another in shape and wcs
Create an empty image like another in shape and wcs
def create_empty_image_like(im: Image) -> Image:
    assert isinstance(im, Image), im
    fim = Image()
    fim.polarisation_frame = im.polarisation_frame
    fim.data = numpy.zeros_like(im.data)
    if im.wcs is None:
        fim.wcs = None
    else:
        fim.wcs = copy.deepcopy(im.wcs)
    if image_sizeof(im) >= 1.0:
        log.debug("create_empty_image_like: created %s image of shape %s, size %.3f (GB)" %
                  (fim.data.dtype, str(fim.shape), image_sizeof(fim)))
    assert isinstance(fim, Image), "Type is %s" % type(fim)
    return fim
def create_empty_image_like ( im : Image ) -> Image : assert isinstance ( im , Image ) , im fim = Image ( ) fim . polarisation_frame = im . polarisation_frame fim . data = numpy . zeros_like ( im . data ) if im . wcs is None : fim . wcs = None else : fim . wcs = copy . deepcopy ( im . wcs ) if image_sizeof ( im ) >= 1.0 : log . debug ( "create_empty_image_like: created %s image of shape %s, size %.3f (GB)" % ( fim . data . dtype , str ( fim . shape ) , image_sizeof ( fim ) ) ) assert isinstance ( fim , Image ) , "Type is %s" % type ( fim ) return fim
Create an empty image like another in shape and wcs
Create an empty image like another in shape and wcs
""" Create an empty image like another in shape and wcs

    :param im:
    :return: Image
    
    """
None
im
Image
None