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

Problem with the region file? #93

Closed soumyajitmandal closed 8 years ago

soumyajitmandal commented 8 years ago

Hi all,

I am trying to run Factor including the whole bandwidth since yesterday but faced a problem when I was using a region file (s1.rgn - casa polygon region file). I have specified the region file in the factor_direction.txt:

facet_patch_534 14h25m54.7642s,37d46m47.2453s empty empty 0 0 0 LD empty /net/pa ra12/data2/mandal/A1914/ddecal/Factor/Factortestrun/FACTOR_fullBW_2/s1.rgn empty False 0.166617704046 7380.417

In the log, I found this as well:

2016-05-27 04:45:24 DEBUG node.para10.strw.leidenuniv.nl.python_plugin: arg dictionary = {'threshpix': '5', 'atrous_jmax': '3', 'adaptive_rmsbox': 'True', 'img_format': 'fits', 'rmsbox_bright': '(70,10)', 'threshisl': '3', 'vertices_file': '/net/para12/data2/mandal/A1914/ddecal/Factor/Factortestrun/FACTOR_fullBW_2/workingdir/state/facet_patch_534_save.pkl', 'region_file': '/net/para12/data2/mandal/A1914/ddecal/Factor/Factortestrun/FACTOR_fullBW_2/s1.rgn', 'rmsbox': '(300,100)', 'atrous_do': 'True'}

But the mask is not picked up. "02.mask" is different than what I put.

Also, it seems the self masking thing might not work always, so its better to put a region file from the beginning for this kind of object. this is the image (from a separate run without any rgn file, though both the runs essentially gave me similar result as the mask was not picked up as mentioned):

screen shot 2016-05-27 at 15 39 33
darafferty commented 8 years ago

The input mask is merged with the PyBDSM mask, so the image02 mask it won't always match the one you put in.

Did you try setting selfcal_adaptive_threshold = True (or if it was True, setting it to False)?

soumyajitmandal commented 8 years ago

hmm it was set as False (by default) . Let me try with "True" then.

These are my imaging parameters now:

[imaging] make_mosaic = True reimage_selfcaled = True wsclean_image_padding = 1.6 wsclean_model_padding = 1.4 max_peak_smearing = 0.05 facet_imager = wsclean wsclean_nchannels_factor = 4 selfcal_cellsize_arcsec = 1.5 selfcal_robust = -0.5 selfcal_robust_wsclean = -0.5 selfcal_min_uv_lambda = 80.0 facet_cellsize_arcsec = [1.5] facet_robust = [-0.5] facet_taper_arcsec = [0.0] facet_min_uv_lambda = [80.0] selfcal_clean_threshold = True selfcal_adaptive_threshold = True

soumyajitmandal commented 8 years ago

It did not work. Same result as posted earlier. the mask I put is not picked up and going wrong after image 12.

soumyajitmandal commented 8 years ago

I was running Factor with 10 subbands data (150 MHz) and this is the mask results:

screen shot 2016-05-30 at 14 17 53

the rgn file I put is different than these mask (but this time the masking is correct). Is there any way to check the clean parameters in the log? The only reference of this region file is the same as above I posted.

AHorneffer commented 8 years ago

The final mask is the result of the merge of the mask from pyBDSM and the provided region file. So there should be more sources in the mask than you specified, but the region(s) you specified should be all there.

P.S. This is quite useful if pyBDSM doesn't pick up everything of an extended structure, but you don't want to add all the tiny point sources by hand. P.P.S. AFAIK the way it is implemented right now, circles in the region file are pretty slow! Better use polygons.

soumyajitmandal commented 8 years ago

Yes I am using the casa polygon region but am afraid the masking is not getting picked up. See the first point in this issue, I provided a manual region to clean, but it was not picked up.

Here is the format of my region file: s1.rgn: #CRTFv0 CASA Region Text Format version 0 poly [[14:26:08.46123, +037.50.26.1966], [14:26:15.08201, +037.49.13.8016], [14:26:12.34861, +037.47.46.1010], [14:26:01.18127, +037.47.27.7010], [14:25:56.89724, +037.49.01.5937 ], [14:25:59.88609, +037.50.24.6987], [14:26:08.59108, +037.50.24.6566], [14:26:08.59100, +037.50.23.1176]] coord=J2000, corr=[I], linewidth=1, linestyle=-, symsize=1, symthick=1 , color=magenta, font="DejaVu Sans", fontsize=11, fontstyle=normal, usetex=false

Mask evolution (red one is the manual mask I provided)

Image 02.mask

screen shot 2016-05-30 at 14 53 16

Image12.mask

screen shot 2016-05-30 at 14 53 42
darafferty commented 8 years ago

Strange. I ran the make_clean_mask.py script by hand with a similar mask on a test image and it seems to work fine. Jit, can you try that as well to see if you can identify any problems? Meanwhile, I'm trying a full Factor run with the test region specified in the directions file.

soumyajitmandal commented 8 years ago

Really sorry! I have made a mistake. I gave the region file seeing the example in the factor.parset (I just gave the region file at the same position as the example showed) and did not read about the instruction. So essentially I gave the region file in the column "region_facet" instead of "region_selfcal". Running this again and closing this issue for now. Sorry for the trouble.