processing_components/image/operations.py
def convert_polimage_to_stokes(im: Image):
    """Convert a polarisation image to stokes (complex)
    
    """
    assert isinstance(im, Image)
    assert im.data.dtype == 'complex'
    
    if im.polarisation_frame == PolarisationFrame('linear'):
        cimarr = convert_linear_to_stokes(im.data)
        return create_image_from_array(cimarr, im.wcs, PolarisationFrame('stokesIQUV'))
    elif im.polarisation_frame == PolarisationFrame('circular'):
        cimarr = convert_circular_to_stokes(im.data)
        return create_image_from_array(cimarr, im.wcs, PolarisationFrame('stokesIQUV'))
    else:
        raise ValueError("Cannot convert %s to stokes" % (im.polarisation_frame.type))
Convert a polarisation image to stokes (complex)
    
    
Convert a polarisation image to stokes (complex)
Convert a polarisation image to stokes ( complex )
def convert_polimage_to_stokes(im: Image):
    assert isinstance(im, Image)
    assert im.data.dtype == 'complex'
    if im.polarisation_frame == PolarisationFrame('linear'):
        cimarr = convert_linear_to_stokes(im.data)
        return create_image_from_array(cimarr, im.wcs, PolarisationFrame('stokesIQUV'))
    elif im.polarisation_frame == PolarisationFrame('circular'):
        cimarr = convert_circular_to_stokes(im.data)
        return create_image_from_array(cimarr, im.wcs, PolarisationFrame('stokesIQUV'))
    else:
        raise ValueError("Cannot convert %s to stokes" % (im.polarisation_frame.type))
def convert_polimage_to_stokes ( im : Image ) : assert isinstance ( im , Image ) assert im . data . dtype == 'complex' if im . polarisation_frame == PolarisationFrame ( 'linear' ) : cimarr = convert_linear_to_stokes ( im . data ) return create_image_from_array ( cimarr , im . wcs , PolarisationFrame ( 'stokesIQUV' ) ) elif im . polarisation_frame == PolarisationFrame ( 'circular' ) : cimarr = convert_circular_to_stokes ( im . data ) return create_image_from_array ( cimarr , im . wcs , PolarisationFrame ( 'stokesIQUV' ) ) else : raise ValueError ( "Cannot convert %s to stokes" % ( im . polarisation_frame . type ) )
Convert a polarisation image to stokes (complex)
Convert a polarisation image to stokes ( complex )
"""Convert a polarisation image to stokes (complex)
    
    """
im
Image