1
2
3
4 from Timba.TDL import *
5 from Timba.Meq import meq
6 from Timba.Meq import meqds
7
8
9 Settings.forest_state = record(bookmarks=[
10 record(name='LST',page=[
11 record(udi="/node/LST",viewer="Result Plotter",pos=(0,0)),
12 record(udi="/node/LST1",viewer="Result Plotter",pos=(1,0))]
13 )]);
14
15
16
17 Settings.forest_state.cache_policy = 100;
18
19 def _define_forest (ns):
20 """define_forest() is a standard TDL name. When a forest script is
21 loaded by, e.g., the browser, this method is automatically called to
22 define the forest. The 'ns' argument is a NodeScope object in which
23 the forest is to be defined, usually this is simply the global scope.
24 """;
25
26
27 X_pos = -1597262.96
28 Y_pos = -5043205.54
29 Z_pos = 3554901.34
30 ns.x_pos << Meq.Parm(X_pos,node_groups='Parm')
31 ns.y_pos << Meq.Parm(Y_pos,node_groups='Parm')
32 ns.z_pos << Meq.Parm(Z_pos,node_groups='Parm')
33
34
35 ns.XYZ <<Meq.Composer(ns.x_pos, ns.y_pos, ns.z_pos)
36
37
38 ns.LST << Meq.LST(xyz=ns.XYZ)
39
40
41 ns.LST1 << Meq.LST(observatory='VLA')
42
43
44 ns.reqseq <<Meq.ReqSeq(ns.LST,ns.LST1)
45
46 def _test_forest (mqs,parent):
47 """test_forest() is a standard TDL name. When a forest script is
48 loaded by, e.g., the browser, and the "test" option is set to true,
49 this method is automatically called after define_forest() to run a
50 test on the forest. The 'mqs' argument is a meqserver proxy object.
51 """;
52
53
54
55
56 t0 = 0.01;
57 t1 = 86400.01;
58
59
60 f1 = 299792458.0;
61 f0 = 0.9*f1;
62
63
64
65
66
67 cells = meq.cells(meq.domain(f0,f1,t0,t1),num_freq=1,num_time=120);
68
69
70 request = meq.request(cells,rqtype='e1')
71
72
73 a = mqs.meq('Node.Execute',record(name='reqseq',request=request),wait=True);
74
75
76
77 if __name__ == '__main__':
78 Timba.TDL._dbg.set_verbose(5);
79 ns = NodeScope();
80 _define_forest(ns);
81
82 ns.Resolve();