ratt-ru / owlcat

miscellaneous utility scripts for manipulating radio interferometry data
4 stars 5 forks source link

make-plots in cab calibrator #28

Closed sensingcosmos closed 7 years ago

sensingcosmos commented 7 years ago

Hi, It seems that the make_plots = True is not working cab/calibrator in stimela. Is there a way out so that I can plot/save the gain solution? Thanks.

//////////////////////////////////////////

log-calibrator_Gjones_subtract_lsm0.txt

SpheMakh commented 7 years ago

This is the offending line

Traceback (most recent call last):
  File "/code/run.py", line 210, in <module>
    run_meqtrees(msname)
  File "/code/run.py", line 198, in run_meqtrees
    plotgains.make_gain_plots(gjones_gains, prefix=gjones_plotprefix, feed_type=feed_type)
  File "/usr/local/lib/python2.7/dist-packages/Owlcat/Gainplots.py", line 137, in make_gain_plots
    if not isinstance(G[ant][j], numpy.ndarray):
KeyError: 'C00'
sensingcosmos commented 7 years ago

Thanks Sphe. It seems that the stefcal works fine but only when I use make_plots = True then it complains.

If you/anyone want to try me something please let me know. I would like to really see self-cal phase solutions in time & frequency ( *** specially whether the self-cal phases in time are close to zero after few rounds of Phase only self-cal?)

Please let me know when can I plot the gain solutions with calibrator option in stimela ? Thanks.

Cheers, Abhik

-- Abhik

abhik@phy.iitkgp.ernet.in

On Mon, Apr 10, 2017 at 3:15 PM, Sphesihle Makhathini < notifications@github.com> wrote:

This is the offending line

Traceback (most recent call last): File "/code/run.py", line 210, in run_meqtrees(msname) File "/code/run.py", line 198, in run_meqtrees plotgains.make_gain_plots(gjones_gains, prefix=gjones_plotprefix, feed_type=feed_type) File "/usr/local/lib/python2.7/dist-packages/Owlcat/Gainplots.py", line 137, in make_gain_plots if not isinstance(G[ant][j], numpy.ndarray): KeyError: 'C00'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ska-sa/owlcat/issues/28#issuecomment-292945678, or mute the thread https://github.com/notifications/unsubscribe-auth/AX2q7xs_0I0o89R_7QZV9Z9q-T9THmT-ks5ruitkgaJpZM4M4Fz5 .

sensingcosmos commented 7 years ago

Hi Guys, Now I can plot the gain plots with meqtrees. Thanks. Interestingly, If I only solve for the Gain diagonal elements it also plot the off-diagonal term which I do not want. Can this be fixed so that when we are solving for diagonal terms only diagonal gain terms are plotted. Thanks.

PS. I use the following cab and it produces the attached plot.

pcorr_lsm0-gjones_plots-timeslot

recipe.add("cab/calibrator", "calibrator_Gjones_with_lsm0", { "skymodel" : "%s.lsm.html:output"%(lsm0), "label" : "pcorr_lsm0", "prefix" : "pcorr_lsm0", "msname" : MS, "threads" : 16, "column" : "DATA", "output-data" : "CORR_DATA", "Gjones" : True, "Gjones-solution-intervals" : [18,10], # Ad-hoc right now, subject to change (18 time slot ~ 5 min, 10 channel) "correlations" : '2x2, diagonal terms only', # Added
"Gjones-matrix-type" : "GainDiagPhase", # Support class to handle a set of subtiled gains in the form of diagonal G matrices with phase-only solutions "make-plots" : True,

"DDjones-smoothing-intervals" : 1,

           "Gjones-ampl-clipping"  :   True,
           "Gjones-ampl-clipping-low"  :   0.15,
           "Gjones-ampl-clipping-high"  :   3.5,
           "Gjones-thresh-sigma" :  5,
           "Gjones-chisq-clipping" : False,
           "tile-size"          : 512,
           "field-id"           : int(TARGET),
           "save-config"        : "selfcal_1st_round",
       },
       input=INPUT, output=OUTPUT,
       label="calibrator_Gjones_with_lsm0:: Calibrate with LSM0")

Cheers, Abhik

sensingcosmos commented 7 years ago

Note the Data has 4 correlation preset. I guess may be the heading of the right hand plots should be LL rather than RL. But, it will be nice if it can be corrected. Thanks.

26_019_12MAY2014.LTA_RRLL.txt

SpheMakh commented 7 years ago

You are right, 'LL' is being mislabelled as 'RL'.