tlpipe.timestream.ps_cal.PsCal

class tlpipe.timestream.ps_cal.PsCal(parameter_file_or_dict=None, feedback=2)[source]

Calibration using a strong point source.

The observed visibility of a strong point source with flux \(S_c\) is

\[\begin{split}V_{ij} &= g_i g_j^* A_i(\hat{\boldsymbol{n}}_0) A_j^*(\hat{\boldsymbol{n}}_0) S_c e^{2 \pi i \hat{\boldsymbol{n}}_0 \cdot (\vec{\boldsymbol{u}}_i - \vec{\boldsymbol{u}}_j)} \\ &= S_c \cdot g_i A_i(\hat{\boldsymbol{n}}_0) e^{2 \pi i \hat{\boldsymbol{n}}_0 \cdot \vec{\boldsymbol{u}}_i} \cdot (g_j A_j(\hat{\boldsymbol{n}}_0) e^{2 \pi i \hat{\boldsymbol{n}}_0 \cdot \vec{\boldsymbol{u}}_j})^* \\ &= S_c \cdot G_i G_j^*,\end{split}\]

where \(G_i = g_i A_i(\hat{\boldsymbol{n}}_0) e^{2 \pi i \hat{\boldsymbol{n}}_0 \cdot \vec{\boldsymbol{u}}_i}\).

In the presence of outliers and noise, we have

\[\frac{V_{ij}}{S_c} = G_i G_j^* + S_{ij} + n_{ij}.\]

Written in matrix form, it is

\[\frac{\boldsymbol{\mathbf{V}}}{S_c} = \boldsymbol{\mathbf{V}}_0 + \boldsymbol{\mathbf{S}} + \boldsymbol{\mathbf{N}},\]

where \(\boldsymbol{\mathbf{V}}_0 = \boldsymbol{\mathbf{G}} \boldsymbol{\mathbf{G}}^H\) is a rank 1 matrix represents the visibilities of the strong point source, \(\boldsymbol{\mathbf{S}}\) is a sparse matrix whose elements are outliers or misssing values, and \(\boldsymbol{\mathbf{N}}\) is a matrix with dense small elements represents the noise.

By solve the optimization problem

\[\min_{V_0, S} \frac{1}{2} \| V_0 + S - V \|_F^2 + \lambda \| S \|_0\]

we can get \(V_0\), \(S\) and \(N\) and solve the gain.

Attributes

cacheable Override to return True if caching results is implemented.
embarrassingly_parallelizable Override to return True if next() is trivially parallelizeable.
history History that will be added to the output file.
iteration Current iteration when iterable is True, None else.
params_init
prefix
__init__(parameter_file_or_dict=None, feedback=2)[source]

Methods

cast_input(input) Override to support accepting pipeline inputs of various types.
copy_input(tod) Return a copy of tod, so the original tod would not be changed.
data_select(tod) Data select.
finish() Final analysis stage of pipeline task.
next([input]) Should not need to override.
process(ts)
read_input() Method for reading time ordered data input.
read_output(filenames) Override to implement reading outputs from disk.
read_process_write(tod) Reads input, executes any processing and writes output.
restart_iteration() Re-start the iteration.
setup([requires]) First analysis stage of pipeline task.
show_params() Show all parameters that can be set and their default values of this task.
stop_iteration([force_stop]) Determine whether to stop the iteration.
subset_select(tod) Data subset select.
write_output(output) Method for writing time ordered data output.