sievers / corrcal2 Goto Github PK
View Code? Open in Web Editor NEWPython/C code for calibration of quasi-redundant arrays. Different (fixed) algorithm from original corrcal
Python/C code for calibration of quasi-redundant arrays. Different (fixed) algorithm from original corrcal
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.