ratt-ru / CubiCal

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

IFR gains don't solve for averaging case #310

Open bennahugo opened 5 years ago

bennahugo commented 5 years ago

Running into the following unmet assertion:

INFO       - 08:44:51 - main               [33.7/283.3 36.4/287.4 0.9Gb] Exiting with exception: AssertionError()
 Traceback (most recent call last):
  File "/data/bhugo/projects/projects/oms/CubiCal/cubical/main.py", line 534, in main
    stats_dict = workers.run_process_loop(ms, tile_list, load_model, single_chunk, solver_type, solver_opts, debug_opts, out_opts)
  File "/data/bhugo/projects/projects/oms/CubiCal/cubical/workers.py", line 216, in run_process_loop
    return _run_single_process_loop(ms, load_model, single_chunk, solver_type, solver_opts, debug_opts, out_opts)
  File "/data/bhugo/projects/projects/oms/CubiCal/cubical/workers.py", line 369, in _run_single_process_loop
    solver.ifrgain_machine.save()
  File "/data/bhugo/projects/projects/oms/CubiCal/cubical/machines/ifr_gain_machine.py", line 185, in save
    self.gmfactory.get_solution_db("BBC").add_chunk("BBC", ifrgain, self._ifrgains_grid)
  File "/data/bhugo/projects/projects/oms/CubiCal/cubical/database/pickled_db.py", line 102, in add_chunk
    parm._update_shape(array.shape, grid)
  File "/data/bhugo/projects/projects/oms/CubiCal/cubical/database/parameter.py", line 161, in _update_shape
    assert (len(grid[axis]) == shape[i])
AssertionError
o-smirnov commented 5 years ago

Got an MS/parset for me? What do you mean by "averaging case"?

bennahugo commented 5 years ago

bbc-per-chan = 0 # Compute BBCs per-channel (else across entire band). #type:bool

Its your first epoch dataset in com8 /data/bhugo/projects/projects/oms

I wanted to do plots of phases but the parameter db, but there is nothing in there:

In [1]: import pickle

In [3]: #d = pickle.load(file("bp-BBC-field_0-ddid_None.parmdb"))

In [4]: cd cubical.1557766852.j0408.cc-out.2/
/data/bhugo/projects/projects/oms/cubical.1557766852.j0408.cc-out.2

In [5]: d = pickle.load(file("bp-BBC-field_0-ddid_None.parmdb"))

In [6]: d
Out[6]: 
OrderedDict([('field', 0),
             ('mode', 'fragmented'),
             ('time', 1566832711.362714)])
bennahugo commented 5 years ago

there is some stuff in skel but I cannot get a grid

In [12]: d = pickle.load(file("bp-BBC-field_0-ddid_None.parmdb.skel"))
Level 18  |  - 09:09:50 - param_db           | logger initialized

In [13]: d["BBC"].shape
Out[13]: [4096, 60, 60, 2, 2]

In [14]: d["BBC"].get_cube()
Level 19  |  - 09:10:08 - param_db           | will lookup BBC solutions on 4096x60x60x2x2 grid
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-e68acd615c51> in <module>()
----> 1 d["BBC"].get_cube()

/data/bhugo/projects/projects/oms/CubiCal/cubical/database/parameter.pyc in get_cube(self)
    396         """
    397         return self.lookup(grid={self.axis_labels[iaxis]: self.grid[iaxis]
--> 398                                  for iaxis in self.interpolation_axes})
    399 
    400 

/data/bhugo/projects/projects/oms/CubiCal/cubical/database/parameter.pyc in lookup(self, **grid)
    644         for slicer, out_slicer in zip(itertools.product(*input_slicers), itertools.product(*output_slicers)):
    645             # arse is the current array slice we work with
--> 646             arse = self._array_slices[slicer]
    647             if arse.array is None:
    648                 print("  slice {} fully flagged".format(slicer), file=log(2))

AttributeError: 'Parameter' object has no attribute '_array_slices'
o-smirnov commented 5 years ago

arse lol. Never let it be said that I have poor taste in variable names.

bennahugo commented 5 years ago

lol... better than names for baby :) Any ideas on how to get to the gains to make a plot?

bennahugo commented 5 years ago

Nevermind I'm being stupid. There is a load function inf the param_db that returns the adaptor

bennahugo commented 5 years ago

We really need to fix up the CASA gain tables so this stuff is accessible from plotms

o-smirnov commented 5 years ago

Yeah that error suggests it fell over in the save, so there wouldn't be anything in the database...

Have you tried with bbc-per-chan = 1? Might be more informative anyway!

bennahugo commented 5 years ago

yes but there is still a small bit of RFI left over that could cause bimodality, I need to select a clean band and definitively show that this is a closure problem

o-smirnov commented 5 years ago

What are we looking at here?

ratt-priv-ci commented 5 years ago

sorry wrong issue see the issue on huge pages and page numbers

On Thu, Aug 29, 2019 at 11:57 AM Oleg Smirnov notifications@github.com wrote:

What are we looking at here?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ratt-ru/CubiCal/issues/310?email_source=notifications&email_token=AEIVPJV6TT5NEIWGZIOG33TQG6MRJA5CNFSM4IQAZUO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5N6FGI#issuecomment-526115481, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIVPJSC25R7ANFFOECQXB3QG6MRJANCNFSM4IQAZUOQ .

--


Benjamin Hugo

Junior Software Developer SARAO Black River Park, 2 Fir Street, Observatory, Cape Town, Western Cape, 7925 Contact: [+27] 0716293858 <+27%2071%20629%203858>

PhD. student, Radio Astronomy Techniques and Technologies, Department of Physics and Electronics, Rhodes University

Skype: benna.cn

o-smirnov commented 5 years ago

It's a pretty plot anyway!