lofar-astron / factor

Facet calibration for LOFAR
http://www.astron.nl/citt/facet-doc
GNU General Public License v2.0
19 stars 12 forks source link

facetselfcal fits files look good but facetimage files look poor #189

Closed mooneyse closed 7 years ago

mooneyse commented 7 years ago

Hi,

As the title states, the fits files in the facetselfcal directory look as expected but the fits files in the facetimage directory (and the fieldmosaic) look poor.

For example, the below image shows facetselfcal/facet_patch_360/*MFS-image.fits on the left and facetimage/facet_patch_360/*MFS-image.fits on the right.

comparison.png

The only thing I did that was out of the ordinary was to provide a sky model for one of the facets in the directions file as the facetselfcal stage failed, but all facets - such as the one above - turned out badly.

Thanks, Sean

eretana commented 7 years ago

Hi. What is the resolution of your data? Have you try using less bands just to test imaging on this facet? How far is it from the phase center?

AHorneffer commented 7 years ago

What is the color-scale or noise level in these two images? With my Factor run I can make similar looking plots, because the noise level in the facetselfcal image is a factor of 2.4 higher than in the faceimage image and thus hides the artifacts.

In you image I'm more concerned about the double source to the upper-right of the facet calibrator, which seems to be negative in the faceimage image. Is that source aliased from another facet (or aliased into another facet)? Is it within the calibrator image? How does it look like in the facetselfcal -> wsclean_image_full_low image?

twshimwell commented 7 years ago

I think the colour scale is at the bottom of the images (both max out at 0.01Jy). I think the artefacts are an issue and yeh the double source is certainly odd too.

With regards to the artefacts it looks almost like solutions have not been correctly applied (could it be something like the 60subbands that were imaged in the facetselfcal have solutions applied but the others don't for some reason? Or just nothing is applied?). Do you see similar behaviour for other facets too?

rvweeren commented 7 years ago

Also looks like no solutions were applied to me

mooneyse commented 7 years ago

Hi all,

Thanks for all the responses, it's very helpful.

@eretana - The resolution of the data is 4 seconds and 40 channels per subband. One pixel is 1.5 arcseconds. I am currently running Factor with less bands to test the imaging. I'll let you know how it turns out. This facet is close to the phase centre but they all look similarly distorted.

@AHorneffer - The scale is the same in both images, from -0.01 to +0.01. The noise is a factor of 1.2 greater in the facetselfcal image. The double source that looks negative in the facetimage is near the centre of the facet but it is within the calibrator image. I haven't got any *low*.fits files in facetselfcal, just *wsclean_low2-model.* files.

@twshimwell The other facets show similar behaviour. Below is another example of a facet near the centre.

screenshot

I feel as though it messed up when I supplied a sky model for one of the facets in the directions file in order to get it to skip the facetselfcal for that particular facet. I would like to re-run Factor from the facetselfcal stage using the default parset settings to apply the solutions. Is this possible, if I remove the facetimage directory, or re-run Factor and reset the facetimage operation for all directions?

Thanks again for all the assistance, much appreciated.

AHorneffer commented 7 years ago

The *wsclean_low2-model.make_facet_skymodel* files contain the part of the prefactor skymodel that was selected for this facet (full facet or calibrator region). But with the current version of Factor on a "normal" facet you should get the wsclean_image_full_low images. If you supplied a skymodel for a facet that contained sources outside that facet, then this could be a problem. (I don't know what Factor does in this case.)

Anyhow when I re-run Factor then I usually start from scratch (with an empty work directory). The exception is when I have a good idea what went wrong in a facet, then I reset and re-run that facet. Deleting directories in the Factor work directory is dangerous: if you delete files that Factor still uses, then you might get into a situation where you cannot go further but also cannot reset a previous operation.

eretana commented 7 years ago

Hi. Your skymodel for the facetselfcal should contain the facet calibrator. Why do you want to skip the facetselfcal for that facet that includes a skymodel? Actually, the idea I would think is to include the skymodel to improve the facetselfcal step. Otherwise, if you want to skip it, you can change the order in the directions file. Can you show us the wsclean_image02 image? Because as pointed out in the previous posts, it looks like no solutions were applied.

AHorneffer commented 7 years ago

Your skymodel for the facetselfcal should contain the facet calibrator.

Do you mean "only the facet calibrator", or "the full facet including the facet calibrator", or "it doesn't matter as long as the facet calibrator is in there"?

eretana commented 7 years ago

I meant the facet calibrator. If it contains more sources, it could be problematic as you mentioned. Sorry for not being totally clear.

AHorneffer commented 7 years ago

@eretana: Thanks.

@mooneyse: Were the two sources that show up as holes in the facetimage image contained in the skymodel you provided?

mooneyse commented 7 years ago

@AHorneffer - I supplied a sky model for facet number 28 of 29. The sky model I gave it was *wsclean_low2-model.make_facet_skymodels_cal* file which only has the sources for that facet in it (but more than just the calibrator).

Interestingly, the only facet that produced *wsclean_image_full_low* images was the facet that came after the facet that I had provided a sky model to. It is a different facet to the ones I showed above. Here is the *wsclean_image_full_low*.

wsclean_image_full_low

And here is a comparison of the facetimage (left) and facetselfcal (right) for that facet. It seems to have gone according to plan here! The noise is a factor of 1.9 better in the facetimage (scale: -0.01 to 0.01).

facet_patch_653

I have restarted Factor with a clean directory using only 10 MHz of bandwidth and 20 facets to see how that goes (so far all is going to plan). I didn't remove any directories from my previous run but I'm running it from the beginning because (i) Factor said it finished successfully so I'm unsure of how many operations I would have to reset, and (ii) I made a few changes to the parset/directions file when it ran into trouble so I would be better off with a clean slate.

@eretana - Originally, I just wanted to skip the facetselfcal for that facet because it didn't contain my source of interest and it was preventing Factor from completing. I would be happy with the final mosaic without that facet. Here is the wsclean_image02 for the facet I described in my original post (scale: -0.01 to 0.01):

wsclean_image02

The skymodel I supplied contained all sources for the facet, more than just the calibrator. So this is where it all went wrong, I'd say!

mooneyse commented 7 years ago

Hey guys,

I just want to let you know that I restarted factor with 10 MHz of bandwidth and 20 facets. It finished successfully and without issue without intervention on my part. The above problem was definitely a result of my interference when I provided it with the model. Thanks for all your help.

darafferty commented 7 years ago

I guess this is solved. Reopen if not.