-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemo12.tar
103 lines (91 loc) · 10 KB
/
memo12.tar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
memo12.tex 0000644 0001750 0001750 00000017014 13706543565 011045 0 ustar njj njj \documentclass[12pt]{article}
\textwidth 160mm
\textheight 245mm
\oddsidemargin -3mm
\evensidemargin -3mm
\parskip 3mm
\parindent 0mm
\topmargin -20mm
\pagestyle{empty}
\usepackage{graphicx}
\graphicspath{{.}{./figures/}}
\usepackage{color}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{subcaption}
\usepackage{amssymb}
\usepackage{gensymb}
\newcommand{\memohead}[3]{\clearpage\begin{centering}\mbox{}\hrulefill \vskip 50mm \mbox{}{\Huge \bf LBWG memo #1}\\ \mbox{}\vskip 40mm {\Huge \bf #2}\mbox{}\vskip 40mm{\Large #3}\\\end{centering}\vfill\hrulefill\clearpage}
\usepackage{listings}
\usepackage{rotating}
\begin{document}
\memohead{12}{Finding the delay calibrator: faster and better}{Leah Morabito 21.8.2018}
{\noindent \bf Finding a delay calibrator faster }
The pipeline parses a file containing a list of possible in-field delay calibrators and then runs through them to find the best one. This is done by phase-shifting to each potential delay calibrator, averaging in time, and then calculating a closure phase statistic (see memo 3). The calibrator source with the best closure phase statistic is then selected as the delay calibrator.
This process was taking a very long time, and we determined the bottleneck to be the phase-shifting and concatenation steps run for each individual source. There are several different ways to parallelise this:
\begin{enumerate}
\item {\tt genericpipeline} loop over potential calibrators: parallel over subbands (up to max number of allowed cpus) to phase shift, average, and run station adder. Output subbands are then concatenated.
\item {\tt genericpipeline} loop over potential calibrators: phase shift, average, station add, and run concatenation all in one step.
\item {\tt python parallel}: rather than loop over calibrators, parallelisation the same as in the second case, but each CPU is given a calibrator source to work on, rather than looping over the calibrators. (code slightly modified from N. Jackson)
\end{enumerate}
{\bf Results} \\
I tested these three methods for 100 subbands of a 10-minute data set, using 12 CPUs for all methods. For one source, Method 1 takes about 3 minutes per source, Method 2 takes about 18.5 minutes, and Method 3 takes about 22 minutes. However, when scaling up to more sources, Method 1 increases time proportional to $N$ while Method 3 increases time proportional to $\sqrt{N}$. Therefore Method 1 is faster only if there are 7 or fewer potential calibrator sources, while Method 3 is faster if there are more than 7 sources.
{\noindent \bf The best way to pick a delay calibrator }
We rely on a closure phase statistic to determine what the best delay calibrator will be -- see Memo 3. Here we look at {\tt closure\_v3} and {\tt closure\_v4}, using the closure phase on the triangle ST001 -- DE601 -- DE605.
{\bf Results: v3 vs. v4} \\
The table above shows that {\tt v3} and {\tt v4} of the closure phase statistic calculations select a different `best' delay calibrator. The {\tt v3} calculation is a straightforward mean of the gradient of the unwrapped closure phase, i.e., it is the scatter in the local slope of the closure phases -- and thus a measure of how coherent the closure phases are. Whether or not this is a good measure of phase coherence depends on how much the data have been averaged in time, as averaging more than the atmospheric coherence time will not be a good measure of coherence. {\tt v4} is a bit more sophisticated, as it considers closure phases averaged with different smoothing lengths, and then performs a polynomial fit on the scatter as a function of the smoothing length. Negative values are possible, and good calibrators will have closure phase statistics very close to zero. In the table below are the closure phase statistics for the 16 potential delay calibrators in P205+55, calculated both ways.
\begin{table}
\begin{center}
\caption{Closure phase statistics for P205+55 potential delay calibrators, calculated via two different methods. In bold are the minimum values for each method.\vspace{12pt}}
\begin{tabular}{lcc}
\hline
Source & {\tt closure\_v3} & {\tt closure\_v4} \\ \hline
ILTJ132737.2+550406.2 & {\bf 0.1481850174} & 0.0242173162 \\
ILTJ133749.7+550102.7 & 0.4909443174 & 0.0061813394 \\
ILTJ134934.6+534117.9 & 0.5838284769 & {\bf -0.0267758018} \\
ILTJ134443.6+550300.5 & 0.5959868953 & 0.0851400639 \\
ILTJ134158.5+541524.9 & 0.8044136569 & 0.0505633186 \\
ILTJ135146.8+551818.7 & 1.0296986339 & 0.163153196 \\
ILTJ133915.6+563829.2 & 1.1220507325 & 0.1974670841 \\
ILTJ134255.2+541432.9 & 1.1250419677 & 0.5958891771 \\
ILTJ132635.7+551443.0 & 1.1998326879 & 0.3625401578 \\
ILTJ134455.0+534829.2 & 1.4271537355 & 0.5947044845 \\
ILTJ133534.9+563115.8 & 1.4487124083 & 0.5410218828 \\
ILTJ135044.0+544752.8 & 1.4705579728 & 0.9209013257 \\
ILTJ135209.6+545835.6 & 1.6199067816 & 1.6133934126 \\
ILTJ134442.1+555312.3 & 1.6445005777 & 1.5422775854 \\
ILTJ133437.2+563147.5 & 1.6869923679 & 1.4906760002 \\
ILTJ133932.8+525748.1 & 1.6936455001 & 1.5678865126 \\
\end{tabular}
\end{center}
\end{table}
For {\tt closure\_v3}, anything with a closure phase statistic of 1.64 or above is random noise, i.e., the source is not coherent on this closure triangle. However, there is not a large difference between `random noise' and `noisy' when using this statistic, a problem which is alleviated with {\tt closure\_v4}, where more closure phase statistic values are closer to zero. That makes it easier to set a threshold when trying to determine if baselines contain coherent signal. However, {\tt closure\_v4} selects ILTJ1349+5341 as the best delay calibrator. We saw in Memo 4 that ILTJ1349+5341 has less than half of the integrated flux of ILTJ1327+5504, and much lower signal to noise ratios for individual stations. For this reason, I think we should continue to use {\tt closure\_v3} to determine the {\em best} delay calibrator, and {\tt closure\_v4} for other purposes, e.g., testing whether there is coherent signal.
{\bf Results: linear vs. circular}
We can also speed up the selection of an appropriate delay calibrator if we can avoid converting to circular polarisation. I therefore calculated the {\tt closure\_v3} closure phase statistic for the calibrators in the previous table, both for linear and circular polarisation. The same `best' delay calibrator is selected regardless of polarisation; therefore in the interests of time we don't have to convert to circular during the delay calibrator search step.
\begin{table}
\begin{center}
\caption{Closure phase statistics for P205+55 potential delay calibrators, calculated for circularly vs. linearly polarised data. \vspace{12pt}}
\begin{tabular}{lcc}
\hline
Source & circular (RR,LL) & linear (XX,YY) \\
ILTJ132737.2+550406.2 & 0.1481850174 & 0.1134971515 \\
ILTJ133749.7+550102.7 & 0.4909443174 & 0.409029844 \\
ILTJ134934.6+534117.9 & 0.5838284769 & 0.609395487 \\
ILTJ134443.6+550300.5 & 0.5959868953 & 0.522753873 \\
ILTJ134158.5+541524.9 & 0.8044136569 & 0.8278203847 \\
ILTJ135146.8+551818.7 & 1.0296986339 & 1.0339262676 \\
ILTJ133915.6+563829.2 & 1.1220507325 & 1.1677521711 \\
ILTJ134255.2+541432.9 & 1.1250419677 & 1.2341848988 \\
ILTJ132635.7+551443.0 & 1.1998326879 & 1.1292844786 \\
ILTJ134455.0+534829.2 & 1.4271537355 & 1.3302176983 \\
ILTJ133534.9+563115.8 & 1.4487124083 & 1.5158661467 \\
ILTJ135044.0+544752.8 & 1.4705579728 & 1.4622615633 \\
ILTJ135209.6+545835.6 & 1.6199067816 & 1.7218373238 \\
ILTJ134442.1+555312.3 & 1.6445005777 & 1.6675516255 \\
ILTJ133437.2+563147.5 & 1.6869923679 & 1.6430704236 \\
ILTJ133932.8+525748.1 & 1.6936455001 & 1.6456200025 \\
\end{tabular}
\end{center}
\end{table}
\end{document}