ratt-ru / meqtrees

A library for implementing radio astronomical Measurement Equations
http://meqtrees.net
10 stars 2 forks source link

MS I/O layer not happy when dealing with an MS that is not sorted by TIME #858

Open o-smirnov opened 9 years ago

o-smirnov commented 9 years ago

See e.g. the MS elwood:/home/kassaye/KAT_sources/PKS1939-6342.MS (reported by @Ermiasabebe). This has multiple observation IDs stuck together, so when it is processed in a single gulp, MSSeqOutputChannel starts throwing exceptions when it gets to a chunk where time has stepped backwards:

meq_err_mss1 meq_err_mss2

The right solution is to either (a) sort by TIME on the input (which may be a performance hit, especially when 99.9% of MSs are sorted by time anyway), or (b) throw an error on the input. After all, a user can pre-sort an MS once and for all to avoid this problem.