Giter Site home page Giter Site logo

corrcal2's People

Contributors

sievers avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

corrcal2's Issues

Reordering source model

Looking at this code, it seems that you do a more than just reorder the visibility data. So we should not be doing the same to the source model?
Also the ii used to reorder the visibilities is not the same one that is returned; its modified in ii=numpy.argsort(myind).

PS: The data is at hippo:/home/sphe/Sources

def grid_data(vis,u,v,noise,ant1,ant2,tol=0.1,do_fof=True):
    """Re-order the data into redundant groups.  Inputs are (vis,u,v,noise,ant1,ant2,tol=0.1)
    where tol is the UV-space distance for points to be considered redundant.  Data will be
    reflected to have positive u, or positive v for u within tol of zero.  If pyfof is
    available, use that for group finding."""

    ii=(v<0)|((v<tol)&(u<0))
    tmp=ant1[ii]
    ant1[ii]=ant2[ii]
    ant2[ii]=tmp
    vis[ii]=numpy.conj(vis[ii])

    if (have_fof & do_fof):
        uv=numpy.vstack([u,v]).transpose()
        groups=pyfof.friends_of_friends(uv,tol)
        myind=numpy.zeros(len(u))
        #for i in numpy.arange(len(groups)):
        for jj,group in enumerate(groups):
            for i in range(len(group)):
                myind[group[i]]=jj
        ii=numpy.argsort(myind)
        u=u[ii]
        v=v[ii]
        ant1=ant1[ii]
        ant2=ant2[ii]
        noise=noise[ii]
        myind=myind[ii]
        edges=numpy.where(numpy.diff(myind)!=0)[0]+1
        edges=numpy.append(0,edges)
        edges=numpy.append(edges,len(ant1))
        return vis,u,v,noise,ant1,ant2,edges,ii

Seg. fault when testing on simulated data

at this line of the test_corrcal2_fof.py file:

asdf=fmin_cg(corrcal2.get_chisq,gvec*fac,corrcal2.get_gradient,(big_vis+500*src,mycov,ant1,ant2,fac))

This is the output from the debuger.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2df8429 in apply_gains_to_mat () from libcorrcal2_funs.so

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.