hera-team / aipy Goto Github PK
View Code? Open in Web Editor NEWAstronomical Interferometry in PYthon (AIPY)
Home Page: http://pypi.python.org/pypi/aipy
License: Other
Astronomical Interferometry in PYthon (AIPY)
Home Page: http://pypi.python.org/pypi/aipy
License: Other
I've been trying to install Aipy with the https://github.com/AaronParsons/aipy instructions. I obtained this error:
root@juan:/home/juan/Downloads/aipy-master# python setup.py install
Generating src/version.py: 2.1.0
fatal: Not a git repository (or any of the parent directories): .git
Generating src/branch.py
fatal: Not a git repository (or any of the parent directories): .git
Generating src/gitlog.py.
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/aipy
copying src/dsp.py -> build/lib.linux-x86_64-2.7/aipy
copying src/interp.py -> build/lib.linux-x86_64-2.7/aipy
copying src/fit.py -> build/lib.linux-x86_64-2.7/aipy
copying src/src.py -> build/lib.linux-x86_64-2.7/aipy
copying src/scripting.py -> build/lib.linux-x86_64-2.7/aipy
copying src/twodgauss.py -> build/lib.linux-x86_64-2.7/aipy
copying src/phs.py -> build/lib.linux-x86_64-2.7/aipy
copying src/healpix.py -> build/lib.linux-x86_64-2.7/aipy
copying src/miriad.py -> build/lib.linux-x86_64-2.7/aipy
copying src/rfi.py -> build/lib.linux-x86_64-2.7/aipy
copying src/deconv.py -> build/lib.linux-x86_64-2.7/aipy
copying src/version.py -> build/lib.linux-x86_64-2.7/aipy
copying src/map.py -> build/lib.linux-x86_64-2.7/aipy
copying src/branch.py -> build/lib.linux-x86_64-2.7/aipy
copying src/coord.py -> build/lib.linux-x86_64-2.7/aipy
copying src/pol.py -> build/lib.linux-x86_64-2.7/aipy
copying src/init.py -> build/lib.linux-x86_64-2.7/aipy
copying src/cal.py -> build/lib.linux-x86_64-2.7/aipy
copying src/amp.py -> build/lib.linux-x86_64-2.7/aipy
copying src/const.py -> build/lib.linux-x86_64-2.7/aipy
copying src/img.py -> build/lib.linux-x86_64-2.7/aipy
copying src/gitlog.py -> build/lib.linux-x86_64-2.7/aipy
creating build/lib.linux-x86_64-2.7/aipy/optimize
copying src/optimize/nonlin.py -> build/lib.linux-x86_64-2.7/aipy/optimize
copying src/optimize/optimize.py -> build/lib.linux-x86_64-2.7/aipy/optimize
copying src/optimize/info.py -> build/lib.linux-x86_64-2.7/aipy/optimize
copying src/optimize/anneal.py -> build/lib.linux-x86_64-2.7/aipy/optimize
copying src/optimize/init.py -> build/lib.linux-x86_64-2.7/aipy/optimize
creating build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/three_cr.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/three_c.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/nvss.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/culgoora.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/mrt.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/gbsix.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/txs.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/misc.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/six_c.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/wenss.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/parkes.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/init.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/vlss.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/helm.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/seven_c.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/four_c.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/paper.py -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/helm_fit.txt -> build/lib.linux-x86_64-2.7/aipy/_src
copying src/_src/helm_pos.txt -> build/lib.linux-x86_64-2.7/aipy/_src
running build_ext
building 'aipy._healpix' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/_healpix
creating build/temp.linux-x86_64-2.7/src/_healpix/cxx
creating build/temp.linux-x86_64-2.7/src/_healpix/cxx/Healpix_cxx
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -Isrc/_healpix/cxx/cxxsupport -Isrc/_healpix/cxx/Healpix_cxx -I/usr/include/python2.7 -c src/_healpix/healpix_wrap.cpp -o build/temp.linux-x86_64-2.7/src/_healpix/healpix_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1777:0,
from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/arrayobject.h:4,
from src/_healpix/healpix_wrap.cpp:16:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^
In file included from src/_healpix/healpix_wrap.cpp:18:0:
src/_healpix/cxx/Healpix_cxx/healpix_map.h:102:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel
^
src/_healpix/cxx/Healpix_cxx/healpix_map.h:105:0: warning: ignoring #pragma omp for [-Wunknown-pragmas]
#pragma omp for schedule (dynamic,5000)
^
src/_healpix/cxx/Healpix_cxx/healpix_map.h:125:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
#pragma omp parallel
^
src/_healpix/cxx/Healpix_cxx/healpix_map.h:128:0: warning: ignoring #pragma omp for [-Wunknown-pragmas]
#pragma omp for schedule (dynamic,5000)
^
src/_healpix/healpix_wrap.cpp: In function ‘int HPBObject_init(HPBObject*, PyObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:90:53: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char kwlist[] = {"nside", "scheme", NULL};
^
src/_healpix/healpix_wrap.cpp:90:53: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
src/_healpix/healpix_wrap.cpp:105:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/healpix_wrap.cpp: In function ‘PyObject* HPBObject_npix2nside(HPBObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:125:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/healpix_wrap.cpp: In function ‘PyObject* HPBObject_nest_ring_conv(HPBObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:154:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/healpix_wrap.cpp: In function ‘PyObject* HPBObject_crd2px(HPBObject*, PyObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char kwlist[] = {"crd1", "crd2", "crd3", "interpolate", NULL};
^
src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
src/_healpix/healpix_wrap.cpp:189:73: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
src/_healpix/healpix_wrap.cpp: In function ‘PyObject* HPBObject_px2crd(HPBObject*, PyObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:263:48: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
static char kwlist[] = {"px", "ncrd", NULL};
^
src/_healpix/healpix_wrap.cpp:263:48: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings]
cc1plus: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Stable V1 was released in March, 2017: http://rhodesmill.org/skyfield/
THis is not necessarily a problem with aipy
per se, but should be figured out. I just had a head-scratcher where I was running apply_cal.py
via makeflow and it was telling me that a particular option wasn't available. I realized that the apply_cal.py
in my env had been over-written by aipy
's version.
We could
aipy
(and/or hera_cal) to a subcommand style script system, so eg. $ aipy apply-cal [infile] [outfile]
instead of $ apply_cal.py [infile] [outfile]
When compiling alm_wrap.cpp, healpix_wrap.cpp, and miriad_wrap.cpp, the compiler throws the following error:
error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
This occurs in several places (full errors copied below), and is easily fixed by specifying the type of e in all locations:
PyErr_Format(PyExc_RuntimeError, "%s", e.get_message());
Full errors:
healpix_wrap.cpp:
src/_healpix/healpix_wrap.cpp:105:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/healpix_wrap.cpp: In function ‘PyObject* HPBObject_npix2nside(HPBObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:125:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/healpix_wrap.cpp: In function ‘PyObject* HPBObject_nest_ring_conv(HPBObject*, PyObject*)’:
src/_healpix/healpix_wrap.cpp:154:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
alm_wrap.cpp:
src/_healpix/alm_wrap.cpp: In function ‘void option_err(char**)’:
src/_healpix/alm_wrap.cpp:70:42: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_ValueError, errstr);
^
src/_healpix/alm_wrap.cpp: In function ‘int AlmObject_init(AlmObject*, PyObject*, PyObject*)’:
src/_healpix/alm_wrap.cpp:127:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/alm_wrap.cpp: In function ‘PyObject* AlmObject_get(AlmObject*, PyObject*)’:
src/_healpix/alm_wrap.cpp:153:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/alm_wrap.cpp: In function ‘int AlmObject_set(AlmObject*, PyObject*, PyObject*)’:
src/_healpix/alm_wrap.cpp:181:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/alm_wrap.cpp: In function ‘PyObject* AlmObject_to_map(AlmObject*, PyObject*)’:
src/_healpix/alm_wrap.cpp:227:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
^
src/_healpix/alm_wrap.cpp: In function ‘PyObject* AlmObject_from_map(AlmObject*, PyObject*)’:
src/_healpix/alm_wrap.cpp:279:50: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.what());
miriad_wrap.cpp:
src/_miriad/miriad_wrap.cpp: In function ‘int UVObject_init(UVObject*, PyObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:64:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_read(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:108:61: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_write(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:175:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_copyvr(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:189:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_trackvr(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:203:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_rdvr(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:265:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_wrvr(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:329:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_select(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:347:61: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* UVObject_haccess(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:365:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* WRAP_hdaccess(UVObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:379:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* WRAP_hwrite_init(PyObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:410:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* WRAP_hread_init(PyObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:452:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* WRAP_hwrite(PyObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:525:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
^
src/_miriad/miriad_wrap.cpp: In function ‘PyObject* WRAP_hread(PyObject*, PyObject*)’:
src/_miriad/miriad_wrap.cpp:577:57: error: format not a string literal and no format arguments [-Werror=format-security]
PyErr_Format(PyExc_RuntimeError, e.get_message());
Lines 30 to 37 in 3a38449
Calling get_description()
outputs ' '
Changing lines 35 & 36 to :
elif d_start is not None and L.startswith('##') is True:
return ' '.join(lines[d_start:cnt])
Changes the output to:
' This package collects together tools for radio astronomical interferometry. In addition to pure-python phasing, calibration, imaging, and deconvolution code, this package includes interfaces to MIRIAD (a Fortran interferometry package) and HEALPix (a package for representing spherical data sets). Instructions, documentation, and a FAQ may be found at [the aipy GitHub page](http://github.com/HERA-Team/aipy). '
There exist people who need it.
When trying to run 21cmSense I was getting errors of the form;
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/aipy/_src/helm_pos.txt'
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/aipy/_src/helm_fit.txt’
-These can be solved by manually downloading the files into the desired location;
and
''Traceback (most recent call last):
File "mk_array_file.py", line 98, in
uvsum,quadsum = n.zeros((dim,dim)), n.zeros((dim,dim)) #quadsum adds all non-instantaneously-redundant baselines incoherently
TypeError: only integer scalar arrays can be converted to a scalar index’'
which can be solved within "mk_array_file.py" by adding dim = int(dim) to the line before line 98. Also a similar thing needs to be done on line 32 i.e. changing: round(ycen) -- to --> int(round(ycen)) etc.
It then works as expected.
As python2 support for things like numpy and astropy is going to be killed in the next couple of years, I think it makes sense for everyone to "jump ship". Personally, aipy is the only python package that ties me to python2. Are there any plans on updating the code?
From memory, attempting to install aipy with python3 raises an issue with a print statement, as it's still using the old syntax, but is easily fixed. However, I have no idea how much else needs to be changed. If it helps, I could have a go at changing print statements and other typical differences between 2 and 3.
crash occurs when reading large miriad uv files. The manifestation of the problem from within python is as follows:
import aipy
uv=aipy.miriad.UV('NGC315.mir')
Segmentation fault (core dumped)
the data set can be obtained via:
"scp -r [email protected]:/ftp/pub/export/astron/adebahr/aipy/NGC315.mir . "
tests on smaller files extracted from this data using uvcat indicate that this error does not occur for file sizes under 16GB (i.e. data sets under 9h extracted from this 12h observation do not give this error).
we are using aipy version 2.1.9
For example: the function at line 162 in deconv.cpp
So install failed.
Trying to hunt down why hera_qm is suddenly failing on master:
https://travis-ci.org/HERA-Team/hera_qm/jobs/556686251
Notably, this shows up at the end of the output after the command to install uvtools:
ERROR: pyuvdata 1.4.0 has requirement astropy>=2.0, but you'll have astropy 1.3.3 which is incompatible.
Installing collected packages: uvtools, pyephem, astropy
Found existing installation: astropy 3.2.1
Uninstalling astropy-3.2.1:
Successfully uninstalled astropy-3.2.1
Successfully installed astropy-1.3.3 pyephem-3.7.6.0 uvtools-0.1.0
Ok, so something's going on with uvtools causing astropy to get downgraded.
The only requirements for uvtools are numpy, six, scipy, and aipy>=3.0rc2.
The best we can figure is that aipy's astropy requirement is somehow getting mixed up. The environment already meets the aipy requirement, but @steven-murray suggests pip will still check its requirements.
Notably this may have only started to appear because of the recent changes to uvtool's setup.py
(HERA-Team/uvtools#40)
The help message for the ant
option in scripting.py says it would include 1_2 for "(-0,1)_(2,-3)":
Select ant_pol/baselines to include. Examples: all (all baselines) auto (of active baselines, only i=j) cross (only i!=j) 0,1,2 (any baseline involving listed ants) 0_2,0_3 (only listed baselines) "(0,1)(2,3)" (same as 0_2,0_3,1_2,2_3. Quotes help bash deal with parentheses) "(-0,1)(2,-3)" (exclude 0_2,0_3,1_3 include 1_2). Default is "cross". Select pol by adding appropriate x or y eg 5x_6y.
But function parse_ant
gives the wrong result (515, 0, -1):
>>> import aipy as ap
>>> ap.scripting.parse_ants("(-0,1)_(2,-3)", 4)
[(259, 0, -1), (260, 0, -1), (515, 0, -1), (516, 0, -1)]
>>> ap.miriad.bl2ij(259)
(0, 2)
>>> ap.miriad.bl2ij(260)
(0, 3)
>>> ap.miriad.bl2ij(515)
(1, 2)
>>> ap.miriad.bl2ij(516)
(1, 3)
I find the following sentence in the function`gen_phs` of `aipy.phs` module, in the case of only a single frequency channel, will get an error.
if not srcshape is None: phs *= self.resolve_src(u, v, srcshape=srcshape)
It calls the function `resolve_src`, which returns
return n.where(x == 0, 1, 2 * _cephes.j1(x)/x).squeeze()
When there is only one frequency channel, phs
and x
will be an numpy array of shape (N,1), where N
is an integer number, then the array returned by resolve_src
has a shape (N,) for N>1 and () for N=1.
In the former case, the shape of the array phs
and the returned array won't match, so an error occurs.
While it is OK in all cases for
return n.where(x == 0, 1, 2 * _cephes.j1(x)/x)
so maybe it's better to drop the squeeze
operation.
In addition, in the function sim
of aipy.amp
module, there is a sentence
u,v,w = self.gen_uvw(i, j, src=s_eqs)
here (u,v,w)
has computed, but used nowhere else. It is not a bug, but it takes time whenever sim
is called.
I ran across a bug awhile ago when running the following code:
img2d = aipy.img.Img(size=300,res=.5) #creates a 2D image
crd = img2d.get_eq(ra=numpy.pi,dec = [some negative value]) #gets equatorial coordinates of the image centered on a specific RA/dec
x,y,z = crd
x,y,z = x.flatten(), y.flatten(), z.flatten()
img3d = aipy.map.Map(fromfits = ' ') #reads in Haslam map path
fluxes = img3d[x,y,z] #gets values of Haslam map at specified coordinates
The last line generates an error, only when I used RA = exactly pi and DEC = some negative value in the 'get_eq' function. (Dec = 0 works fine).
The error message is always something like this: "index 3312128 is out of bounds for size 3145728."
The Healpix map has a size of 3145728 pixels.
The latest PyPI package seems to be v2.1.12, compared to conda being 3.0.0rc2.
This is creating a few problems with dependencies, particularly astropy
, which has a fairly old restriction in the 2.x version.
It would be great to update the PyPI version!
This issue occurs for me if I'm trying to read a file more than 9 directories deep. I have yet to do systematic testing for a definitive string length.
This one has been around a long time. For some reason, the version of healpix that is embedded in aipy's _healpix c extension has a bug about interpolating pixels along the x/y axes:
The bug is evident on the panel on the left. On the right is the same interpolation done with healpy, which wraps a more modern version of healpix.
I propose that the solution to this bug in aipy is to port aipy.healpix to use healpy under the hood.
I'm using sphinx v2.2.0 and get a lot of errors with "make html", e.g.
WARNING: html_static_path entry '_static' does not exist
and lots of
WARNING: autodoc: failed to import module 'amp' from module 'aipy'; the following exception was raised:
No module named 'aipy'
In the end some html is built, but it looks incomplete.
The help message for the ant option in scripting.py says it would include 1_2 for "(-0,1)_(2,-3)":
Select ant_pol/baselines to include. Examples: all (all baselines) auto (of active baselines, only i=j) cross (only i!=j) 0,1,2 (any baseline involving listed ants) 0_2,0_3 (only listed baselines) "(0,1)(2,3)" (same as 0_2,0_3,1_2,2_3. Quotes help bash deal with parentheses) "(-0,1)(2,-3)" (exclude 0_2,0_3,1_3 include 1_2). Default is "cross". Select pol by adding appropriate x or y eg 5x_6y.
But function parse_ant gives the wrong result (515, 0, -1):
import aipy as ap
ap.scripting.parse_ants("(-0,1)_(2,-3)", 4)
[(259, 0, -1), (260, 0, -1), (515, 0, -1), (516, 0, -1)]
ap.miriad.bl2ij(259)
(0, 2)
ap.miriad.bl2ij(260)
(0, 3)
ap.miriad.bl2ij(515)
(1, 2)
ap.miriad.bl2ij(516)
(1, 3)
recreate by running a pull_antpols with ~50 or so antennas
import aipy as a
uvi = a.miriad.UV('zen.2457471.18781.xx.uvc')
a.scripting.uv_selector(uvi, ants='(1,3,4,13,15,16,23,26,37,38,41,42,46,47,49,50,56,57,58,59,61,63,66,67,70,71,73,74,82,83,87,90,98,99,103,106,114,115,116,117,118,119,120,121,122,123,124,125,126,127)_(1,3,4,13,15,16,23,26,37,38,41,42,46,47,49,50,56,57,58,59,61,63,66,67,70,71,73,74,82,83,87,90,98,99,103,106,114,115,116,117,118,119,120,121,122,123,124,125,126,127)')
zen.2457471.18781.xx.uvc is 3.7GB
running this uv_selector uses about 20GB of ram.
The origin seems to be that each miriad.select does a malloc for each baseline that is order MAXANT^2. MAXANT was recently increased to 2048, making this issue more significant.
We are bypassing this issue for now in pull_antpols.py by selecting baselines in the uv.pipe with an mfunc
The choice depends on how reliably healpy installs and builds.
the test file test.uv.tar.bz2
in the tutorial is not available anymore, where can I find this file or search for an alternative
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.