Пример #1
0
def PModelImage(inOTF, outOTF, image, desc, err):
    """ Replace OTF data with the model in a 2D ObitFArray

    inOTF   = input Python Obit OTF
    outOTF  = output Python Obit OTF, must be previously defined
    image   = Python Obit Image model to use, as FArray
    desc    = Python Obit ImageDesc for image
    err     = Python Obit Error/message stack
    """
    ################################################################
    # Checks
    if not OTF.PIsA(inOTF):
        raise TypeError, "inOTF MUST be a Python Obit OTF"
    if not OTF.PIsA(outOTF):
        raise TypeError, "outOTF MUST be a Python Obit OTF"
    if not FArray.PIsA(image):
        raise TypeError, "image MUST be a Python Obit FArray"
    if not ImageDesc.PIsA(desc):
        raise TypeError, "desc MUST be a Python Obit ImageDesc"
    if not OErr.OErrIsA(err):
        raise TypeError, "err MUST be a Python ObitErr"
    if err.isErr:  # existing error?
        return
    #
    Obit.OTFUtilModelImage(inOTF.me, outOTF.me, image.me, desc.me, err.me)
Пример #2
0
def PSubImage(inOTF, outOTF, image, desc, err):
    """ Subtract a 2D ObitFArray from an OTF

    inOTF   = input Python Obit OTF
    outOTF  = output Python Obit OTF, must be previously defined
    image   = Python Obit Image data to subtract, as FArray
    desc    = Python Obit ImageDesc for image
    err     = Python Obit Error/message stack
    """
    ################################################################
    # Checks
    if not OTF.PIsA(inOTF):
        raise TypeError, "inOTF MUST be a Python Obit OTF"
    if not OTF.PIsA(outOTF):
        raise TypeError, "outOTF MUST be a Python Obit OTF"
    if not FArray.PIsA(image):
        raise TypeError, "image MUST be a Python Obit FArray"
    if not ImageDesc.PIsA(desc):
        raise TypeError, "desc MUST be a Python Obit ImageDesc"
    if not OErr.OErrIsA(err):
        raise TypeError, "err MUST be a Python ObitErr"
    if err.isErr:  # existing error?
        return
    #
    Obit.OTFUtilSubImage(inOTF.me, outOTF.me, image.me, desc.me, err.me)
Пример #3
0
def PSetDesc(inFI, desc):
    """
    Replace Image descriptor

    * inFI    = Python Obit input FInterpolate
    * desc    = Python Obit ImageDesc to use
    """
    ################################################################
    # Checks
    if not PIsA(inFI):
        raise TypeError("inFI MUST be a Python Obit FInterpolate")
    if not ImageDesc.PIsA(desc):
        raise TypeError("desc MUST be a Python Obit ImageDesc")
    #
    Obit.FInterpolateSetDesc(inFI.me, desc.me)