Example #1
0
def getCurrentImg():
    d=darc.Control("SH")
    fft=d.Get("corrFFTPattern")
    if fft==None:
        img=correlation.generateIdentityCorr(d.Get("npxlx"),d.Get("npxly"),d.Get("nsub"),d.Get("subapFlag"),d.Get("subapLocation"))
    else:
        try:
            npxlx=d.Get("corrNpxlx")
        except:
            npxlx=d.Get("npxlx")
        try:
            npxly=d.Get("corrNpxly")
        except:
            npxly=d.Get("npxly")
        try:
            npxlcum=d.Get("corrNpxlCum")
        except:
            npxlcum=numpy.insert(numpy.cumsum(npxlx*npxly),0,0)
        try:
            sl=d.Get("corrSubapLoc")
        except:
            sl=d.Get("subapLocation")
        nsub=d.Get("nsub")
        sf=d.Get("subapFlag")
        img=correlation.untransformPSF(fft,3,npxlx,npxly,nsub,sl,sf)
        sl2=d.Get("subapLocation")
        npxlx2=d.Get("npxlx")
        npxly2=d.Get("npxly")
        img=correlation.unpackImg(img,3,nsub,sf,npxlx,npxly,sl,npxlx2,npxly2,sl2)
    return img
Example #2
0
def makeIdent(npxlx=None,npxly=None,sl=None):
    d=darc.Control("SH")
    nsub=[98,98,49]
    sf=d.Get("subapFlag")
    if npxlx==None:
        npxlx=d.Get("npxlx")
    if npxly==None:
        npxly=d.Get("npxly")
    if sl==None:
        sl=d.Get("subapLocation")
    ident=correlation.generateIdentityCorr(npxlx,npxly,nsub,sf,sl)
    return ident
Example #3
0
def makeIdent(npxlx=None,npxly=None,sl=None):
    d=darc.Control("SH")
    npxly = numpy.zeros((ncam,), numpy.int32)#An array of length ncam, specifying the number of pixels in a vertical direction with an entry for each frame grabber.
    npxly[:] = 1080#An array of length ncam, specifying the number of pixels in a vertical direction with an entry for each frame grabber.
    npxlx = npxly.copy()#An array of length ncam, specifying the number of pixels in a horizontal direction with an entry for each frame grabber.
    npxlx[:] = 1920#An array of length ncam, specifying the number of pixels in a horizontal direction with an entry for each frame grabber.
    nsub = nsubx*nsuby #An array with ncam entries, specifying the number of sub-apertures for each frame grabber.
    sf=d.Get("subapFlag")
    if npxlx==None:
        npxlx=d.Get("npxlx")
    if npxly==None:
        npxly=d.Get("npxly")
    if sl==None:
        sl=d.Get("subapLocation")
    ident=correlation.generateIdentityCorr(npxlx,npxly,nsub,sf,sl)
    return ident