ratt-ru / CubiCal

A fast radio interferometric calibration suite.
GNU General Public License v2.0
18 stars 13 forks source link

phase-only solver crashes in apply-only mode because of missing model #391

Open o-smirnov opened 4 years ago

o-smirnov commented 4 years ago

In apply-only mode, precompute_attributes is called here: https://github.com/ratt-ru/CubiCal/blob/master/cubical/solver.py#L615

(This was added to enable gain flagging in apply mode, IIRC.)

Unfortunately, the phase-only (and slope?) solver wants to have a model in precompute_attributes, so that it can precompute the constant parts of the Hessian. This causes it to crash in apply-only mode. SOP has been to use complex-2x2 in apply-only mode (since the gain tables are compatible), so we never noticed the problem.

The solution is to fix the phase-only solver to skip the Hessian precomputation if a model is not supplied.