|
14 | 14 | "NAME": [],
|
15 | 15 | "RA": [],
|
16 | 16 | "DEC": [],
|
| 17 | + "INT_FLX100": [], |
17 | 18 | "INT_FLX150": [],
|
| 19 | + "INT_FLX200": [], |
18 | 20 | "MAJOR_DC": [],
|
19 | 21 | "MINOR_DC": [],
|
20 | 22 | "PA_DC": [],
|
|
32 | 34 | "N2": [],
|
33 | 35 | "COEFF": [],
|
34 | 36 | }
|
| 37 | +arrays_lobes = { |
| 38 | + "UNQ_SOURCE_ID": [], |
| 39 | + "NAME": [], |
| 40 | + "RA": [], |
| 41 | + "DEC": [], |
| 42 | + "INT_FLX100": [], |
| 43 | + "INT_FLX150": [], |
| 44 | + "INT_FLX200": [], |
| 45 | + "MAJOR_DC": [], |
| 46 | + "MINOR_DC": [], |
| 47 | + "PA_DC": [], |
| 48 | + "MOD_TYPE": [], |
| 49 | + "COMP_TYPE": [], |
| 50 | + "NORM_COMP_PL": [], |
| 51 | + "ALPHA_PL": [], |
| 52 | + "NORM_COMP_CPL": [], |
| 53 | + "ALPHA_CPL": [], |
| 54 | + "CURVE_CPL": [], |
| 55 | +} |
35 | 56 | arrays_gleam = {
|
36 | 57 | "Name": [],
|
37 | 58 | "RAJ2000": [],
|
|
43 | 64 | "b": [],
|
44 | 65 | "pa": [],
|
45 | 66 | }
|
46 |
| -for (i,(name, cmp, ra, de, fd, maj, min, pa, mtyp, ctyp, alpha, q, )) in enumerate([ |
47 |
| - ["point-list", 0, 0., 1., 1., 0., 0., 0., "nan", "P", 0.0, 0.0 ], |
48 |
| - ["point-pl", 0, 1., 2., 2., 0., 0., 0., "pl", "P", -0.8, 0.0 ], |
49 |
| - ["point-cpl", 0, 3., 4., 3., 0., 0., 0., "cpl", "P", -0.9, 0.2 ], |
50 |
| - ["gauss-list", 0, 0., 1., 1., 20., 10., 75., "nan", "G", 0.0, 0.0 ], |
51 |
| - ["gauss-pl", 0, 1., 2., 2., 20., 10., 75., "pl", "G", -0.8, 0.0 ], |
52 |
| - ["gauss-cpl", 0, 3., 4., 3., 20., 10., 75., "cpl", "G", -0.9, 0.2 ], |
53 |
| - ["shape-pl", 0, 1., 2., 2., 20., 10., 75., "pl", "S", -0.8, 0.0 ], |
54 |
| - # todo: shapelets |
| 67 | +for (i,(name, cmp, ra, de, fd100, fd150, fd200, maj, min, pa, mtyp, ctyp, alpha, q, )) in enumerate([ |
| 68 | + ["point-list", 0, 0., 1., 3.0, 2.0, 1., 0., 0., 0., "nan", "P", 0.0, 0.0 ], |
| 69 | + ["point-pl", 0, 1., 2., 3.5, 2.5, 2., 0., 0., 0., "pl", "P", -0.8, 0.0 ], |
| 70 | + ["point-cpl", 0, 3., 4., 5.6, 3.8, 3., 0., 0., 0., "cpl", "P", -0.9, 0.2 ], |
| 71 | + ["gauss-list", 0, 0., 1., 3., 2., 1., 20., 10., 75., "nan", "G", 0.0, 0.0 ], |
| 72 | + ["gauss-pl", 0, 1., 2., 3.5, 2.5, 2., 20., 10., 75., "pl", "G", -0.8, 0.0 ], |
| 73 | + ["gauss-cpl", 0, 3., 4., 5.6, 3.8, 3., 20., 10., 75., "cpl", "G", -0.9, 0.2 ], |
| 74 | + ["shape-pl", 0, 1., 2., 3.5, 2.5, 2., 20., 10., 75., "pl", "S", -0.8, 0.0 ], |
| 75 | + ["shape-pl", 1, 1., 2., 3.5, 2.5, 2., 20., 10., 75., "pl", "S", -0.8, 0.0 ], |
55 | 76 | ]):
|
56 |
| - if mtyp == "nan": |
57 |
| - continue |
58 | 77 |
|
59 | 78 | # i_ = f"{i:04d}"
|
60 | 79 | arrays_jack["UNQ_SOURCE_ID"].append(f"{name}")
|
61 | 80 | arrays_jack["NAME"].append(f"{name}_C{cmp}")
|
62 | 81 | arrays_jack["RA"].append(ra)
|
63 | 82 | arrays_jack["DEC"].append(de)
|
64 |
| - arrays_jack["INT_FLX150"].append(fd) |
| 83 | + arrays_jack["INT_FLX100"].append(fd100) |
| 84 | + arrays_jack["INT_FLX150"].append(fd150) |
| 85 | + arrays_jack["INT_FLX200"].append(fd200) |
65 | 86 | arrays_jack["MAJOR_DC"].append(maj)
|
66 | 87 | arrays_jack["MINOR_DC"].append(min)
|
67 | 88 | arrays_jack["PA_DC"].append(pa)
|
|
71 | 92 | if mtyp == "cpl":
|
72 | 93 | arrays_jack["NORM_COMP_PL"].append(0.0)
|
73 | 94 | arrays_jack["ALPHA_PL"].append(0.0)
|
74 |
| - arrays_jack["NORM_COMP_CPL"].append(fd) |
| 95 | + arrays_jack["NORM_COMP_CPL"].append(fd200) |
75 | 96 | arrays_jack["ALPHA_CPL"].append(alpha)
|
76 | 97 | arrays_jack["CURVE_CPL"].append(q)
|
77 | 98 | else:
|
78 |
| - arrays_jack["NORM_COMP_PL"].append(fd) |
| 99 | + arrays_jack["NORM_COMP_PL"].append(fd200) |
79 | 100 | arrays_jack["ALPHA_PL"].append(alpha)
|
80 | 101 | arrays_jack["NORM_COMP_CPL"].append(0.0)
|
81 | 102 | arrays_jack["ALPHA_CPL"].append(0.0)
|
82 | 103 | arrays_jack["CURVE_CPL"].append(0.0)
|
83 | 104 |
|
| 105 | + if ctyp == "S": # no shapelet support in gleam or lobes |
| 106 | + continue |
| 107 | + |
| 108 | + arrays_lobes["UNQ_SOURCE_ID"].append(f"{name}") |
| 109 | + arrays_lobes["NAME"].append(f"{name}_GID{cmp}") |
| 110 | + arrays_lobes["RA"].append(ra) |
| 111 | + arrays_lobes["DEC"].append(de) |
| 112 | + arrays_lobes["INT_FLX100"].append(fd100) |
| 113 | + arrays_lobes["INT_FLX150"].append(fd150) |
| 114 | + arrays_lobes["INT_FLX200"].append(fd200) |
| 115 | + arrays_lobes["MAJOR_DC"].append(maj) |
| 116 | + arrays_lobes["MINOR_DC"].append(min) |
| 117 | + arrays_lobes["PA_DC"].append(pa) |
| 118 | + arrays_lobes["MOD_TYPE"].append(mtyp) |
| 119 | + arrays_lobes["COMP_TYPE"].append(ctyp) |
| 120 | + |
| 121 | + if mtyp == "cpl": |
| 122 | + arrays_lobes["NORM_COMP_PL"].append(0.0) |
| 123 | + arrays_lobes["ALPHA_PL"].append(0.0) |
| 124 | + arrays_lobes["NORM_COMP_CPL"].append(fd200) |
| 125 | + arrays_lobes["ALPHA_CPL"].append(alpha) |
| 126 | + arrays_lobes["CURVE_CPL"].append(q) |
| 127 | + else: |
| 128 | + arrays_lobes["NORM_COMP_PL"].append(fd200) |
| 129 | + arrays_lobes["ALPHA_PL"].append(alpha) |
| 130 | + arrays_lobes["NORM_COMP_CPL"].append(0.0) |
| 131 | + arrays_lobes["ALPHA_CPL"].append(0.0) |
| 132 | + arrays_lobes["CURVE_CPL"].append(0.0) |
| 133 | + |
84 | 134 | if mtyp == "cpl": # no cpl support in gleam
|
85 | 135 | continue
|
86 |
| - if ctyp == "S": # no shapelet support in gleam |
| 136 | + if mtyp == "nan": # no list support in gleam |
87 | 137 | continue
|
88 | 138 |
|
89 | 139 | arrays_gleam['Name'].append(f"{name}")
|
90 | 140 | arrays_gleam['RAJ2000'].append(ra)
|
91 | 141 | arrays_gleam['DEJ2000'].append(de)
|
92 |
| - arrays_gleam['S_200'].append(fd) |
| 142 | + arrays_gleam['S_200'].append(fd200) |
93 | 143 | arrays_gleam['alpha'].append(alpha)
|
94 | 144 | arrays_gleam['beta'].append(q)
|
95 | 145 | arrays_gleam['a'].append(maj * 3600)
|
96 | 146 | arrays_gleam['b'].append(min * 3600)
|
97 | 147 | arrays_gleam['pa'].append(pa)
|
98 | 148 |
|
99 |
| -for (i, (name, n1, n2, coeff)) in enumerate([ |
100 |
| - ["shape-pl", 0, 0, 0.9], |
101 |
| - ["shape-pl", 0, 1, 0.2], |
102 |
| - ["shape-pl", 1, 0, -0.2], |
| 149 | +for (i, (name, cmp, n1, n2, coeff)) in enumerate([ |
| 150 | + ["shape-pl", 0, 0, 0, 0.9], |
| 151 | + ["shape-pl", 0, 0, 1, 0.2], |
| 152 | + ["shape-pl", 0, 1, 0, -0.2], |
| 153 | + ["shape-pl", 1, 0, 0, 0.8], |
103 | 154 | ]):
|
104 |
| - arrays_jack_2["NAME"].append(f"{name}_C0") |
| 155 | + arrays_jack_2["NAME"].append(f"{name}_C{cmp}") |
105 | 156 | arrays_jack_2["N1"].append(n1)
|
106 | 157 | arrays_jack_2["N2"].append(n2)
|
107 | 158 | arrays_jack_2["COEFF"].append(coeff)
|
|
117 | 168 | df = table2.to_pandas()
|
118 | 169 | print("\njack2\n", df[[df.columns[0], *df.columns[1:]]].to_string(index=False))
|
119 | 170 |
|
| 171 | +table = Table(arrays_lobes) |
| 172 | +table.write('test_files/lobes.fits', overwrite=True) |
| 173 | +df = table.to_pandas() |
| 174 | +print("\nlobes\n", df.to_string(index=False)) |
| 175 | + |
120 | 176 | table = Table(arrays_gleam, )
|
121 | 177 | table.write('test_files/gleam.fits', overwrite=True)
|
122 | 178 | df = table.to_pandas()
|
|
0 commit comments