Open Mulan-94 opened 3 years ago
It should be pretty easy to modify the predict worker to do this if you pass in an image cube with the relevant wsums in the header. Internally I assume a WCS with four axes in the order [stokes, freq, l, m] which is reversed in the fits file. So, if you can somehow combine your wsclean output into a fits file like that we can simply loop over the stokes axis and use the convert function in africanus to go from Stokes to correlations. Hopefully I will have full polarisation clean working soon so you don't have to stack fits files. But I think @o-smirnov is working on fitstools' stack functionality, maybe he can help you hack something together. Not sure what the best way to do this is. Maybe we can label the wsums in the header 'WSUM{I/Q/U/V}{B}' where B is the band number at low frequency resolution?
You can have a look at the fits headers produced by the init worker here
This defines the Stokes <-> index convention. I might just go ahead and put this in the predict myself so if you want to work on getting your wsclean outputs stacked correctly we could have this working pretty quickly
Just noting that this is what smops
https://pypi.org/project/smops/
is doing (in a somewhat roundabout way).
The universal model format we developed should allow doing this on the fly in QuartiCal. Full Pol not supported yet but getting there.
@landmanbester @o-smirnov As per the discussion, we are in need of a high resolution predict for Stokes' I, Q, U, V. So far, pfb-clean is able to do this for Stokes' I, and predicts directly into the MS. My contribution hopefully, would be to implement for Q, U and V.