def compute_jones (Jones,sources,stations=None,inspectors=[],label='L',**kw): """Creates the dipole projection matrix."""; stations = stations or Context.array.stations; ns = Jones.Subscope(); insp = Jones.scope.inspector(label); for src in sources: for p in stations: Jones(src,p) << proj_matrix(src,Context.array.xyz(p)); insp << StdTrees.define_inspector(Jones,sources,stations,label=label); # add inspectors StdTrees.inspector(Jones.scope.inspector(label,'AzEl') ,[src.direction.azel() for src in sources],bookmark=False); inspectors += [ insp,Jones.scope.inspector(label,'AzEl') ]; return Jones;
def compute_jones (self,nodes,stations=None,tags=None,label='',inspectors=[],**kw): stations = stations or Context.array.stations(); rot_def = Meow.Parm(0); nr = Jones.rotation_matrix(nodes("R"),rot_def,tags=tags,series=stations); ne = Jones.ellipticity_matrix(nodes("E"),rot_def,tags=tags,series=stations); for p in stations: nodes(p) << Meq.MatrixMultiply(nr(p),ne(p)); # make parmgroups for phases and gains self.pg_rot = ParmGroup.ParmGroup(label+"_leakage", nodes.search(tags="solvable"), table_name="%s_leakage.mep"%label,bookmark=True); # make solvejobs ParmGroup.SolveJob("cal_"+label+"_leakage","Calibrate %s (leakage)"%label,self.pg_rot); # make inspector for parameters StdTrees.inspector(nodes('inspector'),self.pg_rot.nodes,bookmark=False); inspectors.append(nodes('inspector')); return nodes;
def compute_jones(self, nodes, stations=None, tags=None, label='', inspectors=[], **kw): stations = stations or Context.array.stations() rot_def = Meow.Parm(0) nr = Jones.rotation_matrix(nodes("R"), rot_def, tags=tags, series=stations) ne = Jones.ellipticity_matrix(nodes("E"), rot_def, tags=tags, series=stations) for p in stations: nodes(p) << Meq.MatrixMultiply(nr(p), ne(p)) # make parmgroups for phases and gains self.pg_rot = ParmGroup.ParmGroup(label + "_leakage", nodes.search(tags="solvable"), table_name="%s_leakage.mep" % label, bookmark=True) # make solvejobs ParmGroup.SolveJob("cal_" + label + "_leakage", "Calibrate %s (leakage)" % label, self.pg_rot) # make inspector for parameters StdTrees.inspector(nodes('inspector'), self.pg_rot.nodes, bookmark=False) inspectors.append(nodes('inspector')) return nodes