ratt-ru / meqtrees

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

calico-stefcal error with completely unpolarized LSM #873

Closed o-smirnov closed 7 years ago

o-smirnov commented 7 years ago

As reported by @SpheMakh:

1983.24 gainopts(StefCal.py:829:get_result): dE:A17x ('5', '8') data type of dgmodel is complex64
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/Cattery/Calico/OMS/StefCal/StefCal.py", line 830, in get_result
    corr = dgopt.solver.apply(dgmodel[idg],pq);
  File "/usr/lib/python2.7/dist-packages/Cattery/Calico/OMS/StefCal/Gain2x2.py", line 390, in apply
    lhs = self._get_matrix(p,q,lhs);
  File "/usr/lib/python2.7/dist-packages/Cattery/Calico/OMS/StefCal/Gain2x2.py", line 106, in _get_matrix
    return map(self._tile_complex_data,data[p,q]);
  File "/usr/lib/python2.7/dist-packages/Cattery/Calico/OMS/StefCal/Gain2x2.py", line 102, in _tile_complex_data
    return self.tile_data(x, dtype=self._dtype)
  File "/usr/lib/python2.7/dist-packages/Cattery/Calico/OMS/StefCal/DataTiler.py", line 50, in <lambda>
    self.tile_data = lambda x, dtype=None: x.astype(dtype) if ( dtype and dtype != x.dtype ) else x
AttributeError: 'int' object has no attribute 'dtype'
o-smirnov commented 7 years ago

Fixed by https://github.com/ska-sa/meqtrees-cattery/commit/7aea811850ff4cfae7b3b917ee4c373f96069da5

Also, rather use the GainDiag implementation if everything is completely unpolarized.