Read MS file error?
Closed this issue · 8 comments
Hi Tim,
I want to open MS file by function create_batchvisitility_from _ms. The MS file was gotten from EoR Blind challenge which is about 474MB. My computer has 32GB memory. However, the ARL reports out of memory:
*** mach_vm_map(size=18446744066256998400) failed (error code=3)
python(57221,0x11d8545c0) malloc: *** set a breakpoint in malloc_error_break to debug
Terminated: 15
I tracked the codes and error would occur at Line 835 of memory_data_models.py.
desc = [('index', '>i8'),
('uvw', '>f8', (nants, nants, 3)),
('time', '>f8'),
('integration_time', '>f8'),
('vis', '>c16', (nants, nants, nchan, npol)),
('weight', '>f8', (nants, nants, nchan, npol)),
('imaging_weight', '>f8', (nants, nants, nchan, npol))]
data = numpy.zeros(shape=[ntimes], dtype=desc)
nants =4704, nchan =1 , npol = 4, ntimes = 8
Or it's not a bug which means I should find a big memory server to run it.
Feng Wang
Hi Feng, Tim,
Thanks for sharing the link to the MS file. I had a look since I was curious, and I noticed that it's actually a concatenation of 21 single-channel OSKAR simulations, each with 224 stations. Unfortunately the CASA concat task that was used to generate it also duplicates rows in the ANTENNA table to make it very much longer, so it makes it look like there are (224 * 21 =) 4704 antennas, which is not the intention here. I guess it's not possible to assume that the number of rows in the ANTENNA table is the same as the actual number of antennas. Would it be possible to find the number of unique antenna positions to get this instead, or maybe if it's easier, use the total number of rows in the ANTENNA table divided by the total number of rows in the DATA_DESCRIPTION table? Someone with a better knowledge of what's allowed in the Measurement Set could say whether that's a good idea or not - I'm sure Tim would know.
(Incidentally, this also explains why you ran out of memory, as the ARL data structure would need almost 50 GB if it really was with 4704 antennas!)
Cheers,
Fred
Hi all,
I have further tracked the codes and I agreed with Fred that the wrong values of ANTENNA number would the reason for the error.
Feng
I suppose to close this issue because I think there are some obvious mistakes in that specified MS file. It is not worth to modify ARL codes to read the data from a wrong MS file.
- Two fields, i.e., anntena1 and anntenna2, written in the main data, are greater than the number of antennas.
- Wrong data concatenation.