Skip to content
Gijs Molenaar edited this page Feb 13, 2014 · 6 revisions

MeqCompounder

The compounder implements an implicit function. The first child should give the grid points and the second child should give the higher dimensional function. Here is a diagram on what it does

Here is how you can use it:

  # create a 4D funklet
  x_node=create_4d_beam(....)
  ns.x<<x_node

  # use RA,Dec as the grid 
  ra = [[0.1,0.2],[0.01,0.02]]
  dec = [[0.1,-0.1],[0.1,0.1]]
  ns.ra0 << Meq.Parm(ra,node_groups='Parm')
  ns.dec0 << Meq.Parm(dec,node_groups='Parm')

  # then create a MeqComposer containing ra dec children
  ns.RADec <<Meq.Composer(ns.ra0, ns.dec0)

  # finally use the compounder to get a t,f result for the grid points on the RA,Dec values from the funklet
  ns.y<<Meq.Compounder(children=[ns.RADec.name,ns.x.name],common_axes=[hiid('a'),hiid('b')])

The arguments are:

  • children: the two children grid, and funklet in that order
  • common_axes: which axes will be provided by the grid child, for each axes, there should be one VellSet
  • mode: mode 1 (sequential): passes the original requser to child 0, recreates a requset for child 1 according to the result returned by child 0. mode 2 (parallel): passes the same requset to both children (not yet implemented), mode 3 (simple): only handle 2D results in Time,Freq
  • default_cell_size: when the first child returns just a scalar, it is impossible to create a grid wirh proper cell sizes to send to the second child. So use this value to create the grid. Note that you can solve for any child of the Compounder (i.e. the grid and/or the funklet).

A Compounder node can be used together with a MeqResampler node to extract e.g. values of a beamshape (E Jones) that have been read in and stored in a fixed grid via e.g. a FITSImage node (see the MeqImage page).

  • 1)The compounder gets the grid values (l,m) or Az,El etc from its grid child for given Time,Freq
  • 2)The compounder sorts the grid points and removes any duplicates for efficiency (for different Time,Freq pairs you might get the same grid point)
  • 3)The compounder forms a request in Time,Freq,l,m and sends it to the Funklet child.
  • 4)The Funklet child is the resampler. The resampler gets the data cube read in from the FITSImage with fixed grid.
  • 5)The resampler interpolates to match the request grid Time,Freq,l,m and returns the result.
  • 6)The compounder gets the result from the resampler and does any unsorting or duplicating and sends the new result to its parent. The compounder also handles perturbed values in a smart way to avoid duplication.

The resampler uses cubic Hermite interpolation in any number of dimensions (upto 6).

Clone this wiki locally