Ejemplo n.º 1
0
 def grid_wt(vis, model, g):
     if vis is not None:
         if model is not None:
             griddata = create_griddata_from_image(model)
             griddata = grid_weight_to_griddata(vis, griddata, g[0][1])
             return griddata
         else:
             return None
     else:
         return None
Ejemplo n.º 2
0
 def re_weight(vis, model, gd, g):
     if gd is not None:
         if vis is not None:
             # Ensure that the griddata has the right axes so that the convolution
             # function mapping works
             agd = create_griddata_from_image(model)
             agd.data = gd[0].data
             vis = griddata_reweight(vis, agd, g[0][1])
             return vis
         else:
             return None
     else:
         return vis