processing_components/image/operations.py
def convert_stokes_to_polimage(im: Image, polarisation_frame: PolarisationFrame):
    """Convert a stokes image to polarisation_frame

    """
    
    assert isinstance(im, Image)
    assert isinstance(polarisation_frame, PolarisationFrame)
    
    if polarisation_frame == PolarisationFrame('linear'):
        cimarr = convert_stokes_to_linear(im.data)
        return create_image_from_array(cimarr, im.wcs, polarisation_frame)
    elif polarisation_frame == PolarisationFrame('circular'):
        cimarr = convert_stokes_to_circular(im.data)
        return create_image_from_array(cimarr, im.wcs, polarisation_frame)
    else:
        raise ValueError("Cannot convert stokes to %s" % (polarisation_frame.type))
Convert a stokes image to polarisation_frame

    
Convert a stokes image to polarisation_frame
Convert a stokes image to polarisation_frame
def convert_stokes_to_polimage(im: Image, polarisation_frame: PolarisationFrame):
    assert isinstance(im, Image)
    assert isinstance(polarisation_frame, PolarisationFrame)
    if polarisation_frame == PolarisationFrame('linear'):
        cimarr = convert_stokes_to_linear(im.data)
        return create_image_from_array(cimarr, im.wcs, polarisation_frame)
    elif polarisation_frame == PolarisationFrame('circular'):
        cimarr = convert_stokes_to_circular(im.data)
        return create_image_from_array(cimarr, im.wcs, polarisation_frame)
    else:
        raise ValueError("Cannot convert stokes to %s" % (polarisation_frame.type))
def convert_stokes_to_polimage ( im : Image , polarisation_frame : PolarisationFrame ) : assert isinstance ( im , Image ) assert isinstance ( polarisation_frame , PolarisationFrame ) if polarisation_frame == PolarisationFrame ( 'linear' ) : cimarr = convert_stokes_to_linear ( im . data ) return create_image_from_array ( cimarr , im . wcs , polarisation_frame ) elif polarisation_frame == PolarisationFrame ( 'circular' ) : cimarr = convert_stokes_to_circular ( im . data ) return create_image_from_array ( cimarr , im . wcs , polarisation_frame ) else : raise ValueError ( "Cannot convert stokes to %s" % ( polarisation_frame . type ) )
Convert a stokes image to polarisation_frame
Convert a stokes image to polarisation_frame
"""Convert a stokes image to polarisation_frame

    """
im
Image
polarisation_frame
PolarisationFrame