Skip to content

Commit e62aa76

Browse files
committed
Update docs
1 parent 3e993ff commit e62aa76

File tree

3 files changed

+78
-41
lines changed

3 files changed

+78
-41
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,15 @@ Session.vim
6666
.idea/*
6767
*.iml
6868

69+
70+
doc/factor.aux
71+
72+
doc/factor.fdb_latexmk
73+
74+
doc/factor.fls
75+
76+
doc/factor.out
77+
78+
doc/factor.pdf
79+
80+
doc/factor.synctex.gz

bin/runfactor

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ from factor.operations.facet_ops import *
3131

3232
if __name__=='__main__':
3333
import optparse
34-
opt = optparse.OptionParser(usage='%prog [-v|-q] parset [default: factor.parset] \n',
34+
opt = optparse.OptionParser(usage='%prog [-v|-q] parset [default: factor.parset]',
3535
version='%%prog %s' % (factor._version.__version__))
36-
opt.add_option('-q', help='Quiet', action='store_true', default=False)
37-
opt.add_option('-v', help='Verbose', action='store_true', default=False)
36+
opt.add_option('-q', help='enable quiet mode', action='store_true', default=False)
37+
opt.add_option('-v', help='enable verbose mode', action='store_true', default=False)
3838
(options, args) = opt.parse_args()
3939

4040
if len(args) not in [0, 1]:

doc/factor.tex

Lines changed: 63 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@
3434
Factor is a Python package that allows for the production of wide-field HBA
3535
LOFAR images using the facet calibration scheme described in van Weeren et al.\
3636
(2015). Note that Factor is still beta software. Please report bugs to
37-
38-
39-
To initialize your environment for Factor, users on CEP2 and CEP3 should run the
40-
following commands:
37+
{\tt [email protected]}. To initialize your environment for Factor,
38+
users on CEP2 and CEP3 should run the following commands:
4139
\begin{verbatim}
42-
use LofIm
40+
use Lofar
4341
source ~rafferty/init_factor
4442
use Pythonlibs
4543
\end{verbatim}
@@ -51,11 +49,13 @@ \subsection{Usage}
5149
Factor is run from the command-line with the {\tt runfactor} executable as
5250
follows:
5351
\begin{verbatim}
54-
Usage: runfactor <parset>
52+
Usage: runfactor [-v|-q] parset [default: factor.parset]
53+
5554
Options:
5655
--version show program's version number and exit
5756
-h, --help show this help message and exit
58-
-v Verbose
57+
-q enable quiet mode
58+
-v enable verbose mode
5959
\end{verbatim}
6060
The parset specifies the parameters of the run. These are described in the next
6161
sections.
@@ -161,12 +161,25 @@ \subsection{Parset}
161161
param2 = 123
162162
\end{verbatim}
163163

164+
165+
%-----------------------------------------------------------
166+
\subsection{Data Preparation}
167+
\label{factor:data}
168+
169+
The input data must be have the average amplitude scale set and average clock
170+
offsets removed. Futhermore, the LOFAR beam towards the phase center should be
171+
removed. The data should then undergo direction-independent, phase-only self
172+
calibration, and the resulting solutions must be provided to Factor. If desired,
173+
all sources can be subtracted before Factor is run, thereby allowing one to skip
174+
the initial subtraction operation. These steps can be automated using the facet
175+
calibration preparation pipeline.
176+
164177
%-----------------------------------------------------------
165178
\subsection{Directions}
166-
\label{factor:directions
179+
\label{factor:directions}
167180

168181
The directions for which DDE calibration is performed can be selected
169-
automatically by factor or specified in a file. The format of the file is as
182+
automatically in Factor or specified in a file. The format of the file is as
170183
follows:
171184

172185
\begin{verbatim}
@@ -176,15 +189,13 @@ \subsection{Directions}
176189
#
177190
# Columns are defined as follows (in [] are optional parameters with their default values):
178191
# Name (str), RA (float), DEC (float), [regionfile (str, default='')],
179-
# [multiscale (bool, default=True)], [solint_amp (int, default=600)],
192+
# [multiscale (bool, default=False)], [solint_amp (int, default=600)],
180193
# [solint_ph (int, default=5)], [make_final_image (bool, default=True)],
181194
# [cal_radius (float arcmin, default=3.0)]
182-
183195
calibrator_1, 111.11, 22.22, , , , , ,
184196
calibrator_2, 222.22, 33.33, reg/cal2.reg, True, 600, 5, False, 4.5
185197
calibrator_3, 333.33, 44.44, , True, 600, 5, ,
186198
\end{verbatim}
187-
188199
This file should be specified in the parset file as the {\tt directions\_file}
189200
parameter.
190201

@@ -197,7 +208,9 @@ \subsection{Directions}
197208
the specified flux and size limits ({\tt flux\_min\_Jy} and {\tt
198209
size\_max\_arcmin}, respectively) and nearby patches are merged (specified by
199210
{\tt separation\_max\_arcmin}). The resulting patches are then sorted by
200-
apparent flux at the lowest available frequency (from bright to faint).
211+
apparent flux at the lowest available frequency (from bright to faint), and the
212+
final {\tt directions\_file} is written to the file {\tt
213+
factor\_directions.txt} in the working directory.
201214

202215
%Additionally, the direction centers used for tessellation can be automatically
203216
%adjusted to avoid cases in which known sources (from the initial CC skymodels)
@@ -211,39 +224,46 @@ \subsection{Directions}
211224
with the groupings parameter. Note that more than one node is required to
212225
process directions in parallel (as little benefit will result from running
213226
multiple directions in parallel on a single node). The groupings parameter
214-
specifies the the grouping level (the number of directions to process
227+
specifies the grouping level (the number of directions to process
215228
simultaneously) and the total number of directions at each grouping level. For
216229
example, {\tt groupings = 1:5, 4:0} means two groupings are used, with the first
217-
5 directions put into groups of one (i.e., each direction is processed in
230+
5 directions put into groups of one (i.e., the directions are processed in
218231
series) and the rest of the directions divided into groups of 4 (i.e., 4
219232
directions processed in parallel). Shuffling is done between neighboring groups
220233
to achieve the largest minimum separation between directions in the groups. This
221-
sorting attempts to minimize the effects that any artifacts from the
222-
simultaneously processed directions have on one another.
234+
sorting attempts to minimize the effects that any artifacts from one direction
235+
might have on the other simultaneously processed directions.
223236

224237

225238
%-----------------------------------------------------------
226239
\subsection{Parallelization}
227240
\label{factor:parallel}
228241

229242
Factor has been designed to run as much as possible in a parallel manner. To
230-
this end, support is present for distributing the reduction over nodes of a
231-
compute cluster and over the processors of a single computer.
243+
this end, support is present for distributing the reduction over the processors
244+
and nodes of a compute cluster. To use Factor on a single computer, no setup is
245+
necessary beyond specifying the maximum number of CPUs to use. To use Factor on
246+
multiple nodes of a compute cluster, the required setup depends on the cluster
247+
layout (distributed vs. shared file system) and scheduling system (if any), as
248+
described in the following sections.
249+
250+
\subsubsection{Cluster without a scheduler}
251+
For use on a cluster that does not use a scheduler to assign nodes to the user, such as CEP2 and CEP3,
252+
you must provide a LOFAR pipeline cluster description file that tells Factor which nodes are
253+
available. An example of such a file is shown below.
232254

233-
To use Factor on a single computer, no setup is necessary beyond specifying the
234-
maximum number of CPUs to use.
235-
236-
To use factor on multiple nodes of a compute cluster, the required setup depends
237-
on the cluster layout (distributed vs. shared file system) and scheduling system
238-
(if any).
255+
\begin{verbatim}
256+
ClusterName = MyCEP3
257+
Compute.Nodes = [lof021, lof022]
258+
\end{verbatim}
239259

240-
\subsubsection{Torque / PBS scheduler}
241-
For use on a compute cluster that uses torque and PBS, set {\tt clusterdesc =
260+
\subsubsection{Cluster with Torque / PBS }
261+
For use on a cluster that uses torque and PBS, you can set {\tt clusterdesc =
242262
PBS}. Factor will then automatically determine the nodes for which you have a
243263
PBS reservation and use them. Note that you must ask for all the nodes you need
244-
in a single PBS script (e.g., with {\tt #PBS -l nodes=6:ppn=6}), so that all
245-
nodes are available for the full Factor run. An example PBS script is shown
246-
below.
264+
in a single PBS script (e.g., to use 6 nodes, with {\tt \#PBS -l
265+
nodes=6:ppn=6}), so that all nodes are available for the full Factor run. An
266+
example PBS script is shown below.
247267

248268
\begin{verbatim}
249269
#!/bin/bash
@@ -252,16 +272,15 @@ \subsubsection{Torque / PBS scheduler}
252272
#PBS -l nodes=6:ppn=6
253273
#PBS -j oe
254274
#PBS -o output-$PBS_JOBNAME-$PBS_JOBID
255-
256275
cd $PBS_O_WORKDIR
257276
source /home/sttf201/init-lofar.sh
258277
runfactor factor.parset
259278
\end{verbatim}
260279

261-
\subsubsection{Shared file system}
280+
\subsubsection{Cluster with a shared file system}
262281
Factor works by default on a compute cluster with a shared file system.
263282

264-
\subsubsection{Distributed file system}
283+
\subsubsection{Cluster with a distributed file system}
265284
For use on a cluster with a distributed file system (such as CEP2 and CEP3), set
266285
{\tt distribute = True}. Factor will then synchronize files between the
267286
available nodes. Note that all data will be mirrored on each node, so one must
@@ -317,14 +336,20 @@ \subsection{Structure}
317336
\item[FacetImage] The direction-dependent calibration is applied, and the
318337
bands are concatenated and averaged. The entire facet is then imaged, producing
319338
a final model of the facet sources.
320-
\item[FacetSubAll] The final model is subtracted, producing improved ``source-
321-
free'' datasets.
339+
\item[FacetSubAll] The final model is subtracted, producing improved
340+
``source-free'' datasets.
322341
\end{description}
323342

324343
The facet operations are repeated for each direction. Some operations, such as
325-
the FacetSelfcal operation, can run on multiple directions simultaneously.
326-
327-
After each action finishes, the saved state is updated, allowing for resumption
344+
the FacetSelfcal operation, can run on multiple directions simultaneously. After
345+
each action finishes, the saved state is updated, allowing for resumption
328346
of steps at the granularity of the actions in a given operation.
329347

348+
The results of the processing are stored in subdirectories in the working
349+
directory by type (e.g. {\tt images} and {\tt logs}). Inside these
350+
subdirectories, results are organized by operation, action, band, and/or
351+
direction. For example, for a direction named ``dir1'', the images produced
352+
during self calibration are stored in {{\tt images/FacetSelfcal/MakeImage/dir1/}.
353+
354+
330355
\end{document}

0 commit comments

Comments
 (0)