Commits
Ville Suoranta authored ab164c0632a Merge
46 46 | http://www.vla.nrao.edu/astro/archive/baselines/ |
47 47 | If the attempt to establish the internet connection fails, an error |
48 48 | code of 2 is returned. |
49 49 | |
50 50 | Uses the same algorithm that the AIPS task VLANT does. |
51 51 | |
52 52 | |
53 53 | BJB |
54 54 | NRAO |
55 55 | Spring 2020 (fixed version) |
56 + | |
57 + | Revised on 2023-01-25: CAS-14035 bug fix -TT |
56 58 | ''' |
57 59 | |
58 60 | MONTHS = [ 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', |
59 61 | 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC' ] |
60 62 | URL_BASE = 'http://www.vla.nrao.edu/cgi-bin/evlais_blines.cgi?Year=' |
61 63 | |
62 64 | # |
63 65 | # get start date+time of observation |
64 66 | # |
65 67 | observation = _tb.open(vis_name+'/OBSERVATION') |
172 174 | ant_num_stas[ant_ind][5] = 0.0 |
173 175 | if put_time > obs_time and not ant_num_stas[ant_ind][6] and pad == ant_num_stas[ant_ind][2]: |
174 176 | # it's the right antenna/pad; add the offsets to those already accumulated |
175 177 | ant_num_stas[ant_ind][3] += Bx |
176 178 | ant_num_stas[ant_ind][4] += By |
177 179 | ant_num_stas[ant_ind][5] += Bz |
178 180 | |
179 181 | ants = [] |
180 182 | parms = [] |
181 183 | for ant_num_sta in ant_num_stas: |
182 - | if ant_num_sta[3] != 0.0 or ant_num_sta[4] != 0.0 or ant_num_sta[3] != 0.0: |
184 + | if ant_num_sta[3] != 0.0 or ant_num_sta[4] != 0.0 or ant_num_sta[5] != 0.0: |
183 185 | if print_offsets: |
184 186 | print("Offsets for antenna %4s on pad %3s: %8.5f %8.5f %8.5f" % \ |
185 187 | (ant_num_sta[1], ant_num_sta[2], ant_num_sta[3], ant_num_sta[4], ant_num_sta[5])) |
186 188 | else: |
187 189 | casalog.post("offsets for antenna %4s : %8.5f %8.5f %8.5f" % \ |
188 190 | (ant_num_sta[1], ant_num_sta[3], ant_num_sta[4], ant_num_sta[5])) |
189 191 | ants.append(ant_num_sta[1]) |
190 192 | parms.append(ant_num_sta[3]) |
191 193 | parms.append(ant_num_sta[4]) |
192 194 | parms.append(ant_num_sta[5]) |