Skip to content

Instantly share code, notes, and snippets.

@Joshuaalbert
Created December 20, 2016 02:30
Show Gist options
  • Save Joshuaalbert/00420860ddc55f71116d5bf227f53c1b to your computer and use it in GitHub Desktop.
Save Joshuaalbert/00420860ddc55f71116d5bf227f53c1b to your computer and use it in GitHub Desktop.
Factor parset used that causes fail at first selfcal and no logs/facetselfcal/<data> is made
# This is an example parset for Factor
[global]
# Full path to working dir where Factor will run (required). All output will be
# placed in this directory
dir_working = /net/para34/data1/albert/products/goods-n-factor
# Full path to directory containing input bands. It will be scanned for all
# .MS and .ms files (required). Note that if the input files are longer than
# chunk_size_sec in time, then FACTOR works on a (chunked) copy of these files
# and does not modify the originals in any way. If the data is alerady in small
# enough chunks, then it will not make a copy but modify the input files.
dir_ms = /net/para34/data1/albert/products/goods-n-prefactor-results/linked_ms
# Exit if a band is has too little useable data (default = False)
# exit_on_bad_band = False
# Parmdb name for dir-indep. selfcal solutions (stored inside the input band
# measurement sets, so path should be relative to those; default =
# instrument_directionindependent)
# parmdb_name = instrument_directionindependent
# Extension that when concatenated with the 'extension-stripped' MS path gives a
# path that is checked if it contains a sky model. The default finds the sky
# model files from the standard prefactor Initial-Subtract.parset (default =
# .wsclean_low2-model.merge ; notice the leading ".")
# skymodel_extension = .wsclean_low2-model.merge
# Size of time chunks in seconds (default = 2400; minimum allowed value is
# 1200). Ideally, the number of chunks should be evenly divisible by the total
# number of CPUs available to each direction (controlled by the options under
# [cluster]). To prevent Factor from chunking the data, set this value to be
# larger than the length of the longest dataset (in this case, Factor will not
# make copies of the files but will make symbolic links to them instead, so
# please make backup copies yourself)
# chunk_size_sec = 2400
# Use Dysco compression for chunked files (default = False). Enabling this
# option will result in less storage usage and signifcanctly faster
# processing. To use this option, you must have the Dysco library in your
# LD_LIBRARY_PATH. Note: if enabled, Factor will not make symbolic links to the
# input data, even if they are shorter than chunk_size_sec, but will copy them
# instead
# use_compression = False
# Use interactive mode (default = False). Factor will ask for confirmation of
# internally derived DDE calibrators and facets
# interactive = False
# Keep calibrated data for each facet (default = True for averaged data and
# False for unaveraged data). If a target is specified (see below), the averaged
# data for the target is always kept, regardless of this setting. If the
# averaged data are kept, reimaging will be dramatically faster if multiple
# images per facet are made (e.g., at different scales)
# keep_avg_facet_data = True
#keep_unavg_facet_data = True
# Flagging ranges (default = no flagging). A range of times, baselines, and
# frequencies to flag can be specified (see the DPPP documentation for details
# of the syntax). Note that the ranges are AND-ed to produce the final flags
# flag_abstime = [12-Mar-2010/11:31:00.0..12-Mar-2010/11:50:00.0]
# flag_baseline = [CS013HBA*]
# flag_freqrange = [125.2..126.4MHz]
[calibration]
# Exit if selfcal fails for any direction (default = True). If False, processing
# will continue and the failed direction will receive the selfcal solutions of
# the nearest successful direction unless skip_selfcal_check is True, in which
# case processing continues as if the selfcal succeeded
exit_on_selfcal_failure = False
skip_selfcal_check = True
# Maximum number of cycles of the last step of selfcal to perform (default =
# 10). The last step is looped until the number of cycles reaches this value or
# until the improvement in dynamic range over the previous image is less than
# 1.25%. A separate setting can also be used for the target facet only (allowing
# one to reduce the number for non-target facets)
# max_selfcal_loops = 10
# target_max_selfcal_loops = 10
# Preapply the direction-dependent phase solutions for the first calibrator to
# all subsequent ones (default = False). If True, residual clock errors are
# removed before calibration and a single TEC+CommonScalarPhase fit is used
# across the whole bandwidth
preapply_first_cal_phases = True
preapply_solve_TEC_only = False
# Use baseline-dependent preaveraging to increase the signal-to-noise of the
# phase-only solve for sources below this flux density (default = 0.0; i.e.,
# disabled). When activated, averaging in time is done to exploit the time
# coherence in the TEC solutions
# preaverage_flux_Jy = 0.0
# Use multi-resolution selfcal that starts at 20 arcsec resolution and increases
# the resolution in stages to the full resolution (default = False). This method
# may improve convergence, especially when the starting model is poor
#multires_selfcal = True
# Size of frequency block in MHz over which a single TEC solution is fit
# (default = 10.0)
# TEC_block_MHz = 10.0
# Peel the calibrator for sources above this flux density (default = 25.0).
# When activated, the calibrator is peeled using a supplied sky model and
# the facet is then imaged as normal. Note: for each source that should be
# peeled, a sky model must be specified in the directions file in the
# peel_skymodel column or be one of those included in Factor; if not, the
# calibrator will go through self calibration as if it were a normal calibrator
# peel_flux_Jy = 25.0
# Minimum uv distance in lambda for calibration (default = 80.0)
# solve_min_uv_lambda = 80.0
# Smooth amplitudes with spline fit + 2-D median (default = True). If False,
# smoothing is done with a 1-D median.
# spline_smooth2D = True
# Include XY and YX correlations during the slow gain solve for sources above
# this flux density (default = 1000.0 i.e. effectively off). Below this value,
# only the XX and YY correlations are included. Note that spline_smooth2D must
# be True to solve for all correlations. If you want to use it, then an useful
# value would be e.g.: 5.0
# solve_all_correlations_flux_Jy = 1000.0
[imaging]
# Make final mosaic (default = True)
# make_mosaic = True
skip_facet_imaging = True
# Padding factor for WSClean images (default = 1.6)
# wsclean_image_padding = 1.6
# Max desired peak flux density reduction at center of the facet edges due to
# bandwidth smearing (at the mean frequency) and time smearing (default = 0.15 =
# 15% reduction in peak flux). Higher values result in shorter run times but
# more smearing away from the facet centers. This value only applies to the
# facet imaging (selfcal always uses a value of 0.15)
# max_peak_smearing = 0.15
# Max factor used to set the number of WSClean channel images when wide-band
# clean is used (default = 4). The number of channel images is determined by
# dividing the number of bands by the nearest divisor to this factor. Smaller
# values produce better results but require longer run times. Wide-band clean is
# activated when there are more than 5 bands
# wsclean_nchannels_factor = 4
# Number of bands to use for facet imaging during selfcal (default = 6). Facet
# imaing during selfcal is used to improve the subtraction of non-calibrator
# sources in the facet. More bands will result in a better subtraction but also
# longer runtimes. When fewer than the total number are used, the bands are
# selected so that they are evenly spread over the full available bandwidth
# nbands_selfcal_facet_image = 6
# Use baseline-dependent averaging in WSClean (default = False). If enabled,
# this option can dramatically speed up imaging with WSClean.
# NOTE: this option requires the latest development version of WSClean
wsclean_bl_averaging = True
# Selfcal imaging parameters: pixel size in arcsec (default = 1.5), Briggs
# robust parameter (default = -0.5) and minimum uv distance in lambda (default =
# 80). These settings apply both to selfcal images and to the full facet image
# used to make the improved facet model that is subtracted from the data
# selfcal_cellsize_arcsec = 1.5
# selfcal_robust = -0.5
# selfcal_min_uv_lambda = 80.0
# Facet imaging parameters: pixel size in arcsec, Briggs robust parameter, uv
# taper in arcsec, and minimum uv distance in lambda. These parameters are used
# only for making full facet images (and not for making improved models). One
# set of images and one mosaic image will be made for each set of parameters. By
# default, facets will be imaged using the selfcal imaging parameters above
# facet_cellsize_arcsec = [1.5, 15.0]
# facet_robust = [-0.25, 0.0]
# facet_taper_arcsec = [0.0, 45.0]
# facet_min_uv_lambda = [80.0, 160.0]
# Image only the target facet (default = False). If True and a target is
# specified in the [directions] section, then only the facet containing the
# target source is imaged
# image_target_only = False
# Use a clean threshold during selfcal imaging (default = False). If False,
# clean will always stop at 1000 iterations. If True, clean will go to 1 sigma
# noise level
selfcal_clean_threshold = True
# Use an adaptive masking threshold during selfcal imaging (default = False). If
# True, the masking threshold will be estimated using the negative peaks in the
# image, which can help selfcal convergence in the presence of strong artifacts
# selfcal_adaptive_threshold = False
# Fit a polynomial over frequency during clean (default = False). If True,
# WSClean will use the "-fit-spectral-pol" option to fit an nterms = 3
# polynomial over the channel images
# fit_spectral_pol = True
[directions]
# Full path to file containing calibrator directions. If not given, directions
# are selected internally using the flux density and size cuts below
# directions_file = /data/directions.txt
# Full path to sky model (in makesourcedb format) to be used for calibrator
# selection and facet-boundary source avoidance (default is to use re-grouped
# direction-independent sky model of the highest-frequency band). The sky
# model must be grouped into patches by source, it is not re-grouped like the
# direction-independent sky model would be. (In PyBDSM, this grouping can be
# done by setting bbs_patches = 'source' in the write_catalog task.)
#faceting_skymodel = /net/para34/data1/albert/products/goods-n-prefactor-results/FullBand-Combined.skymodel
# Radius from phase center within which to consider sources as potential
# calibrators (default = 2 * FWHM of primary beam of highest-frequency band)
# max_radius_deg = 5.0
# If no directions_file is given, the selection criteria for calibrator sources
# that follow must be given. For merging of multiple sources into one calibrator
# group, merge_flux_min_Jy (default = 0.1 Jy) and size_max_arcmin set the min
# flux density and max size of individual sources to be considered for grouping,
# and separation_max_arcmin sets the max separation between sources below which
# they are grouped into one calibrator. After grouping, flux_min_Jy sets the
# min total flux density of a source (or group) to be considered as a DDE
# calibrator
# flux_min_for_merging_Jy = 0.1
size_max_arcmin = 2.0
separation_max_arcmin = 7.0
flux_min_Jy = 0.3
# When identifying calibrators with the above selection criteria, search for the
# set of calibrators that minimizes non-uniformity (default = False). Generally,
# enabling this option will result in facets that are more uniform in size
# minimize_nonuniformity = False
# Number of internally derived directions can be limited to a maximum number
# of directions if desired with max_num (default = all).
ndir_max = 30
# Total number of directions to process (default = all). If this number is
# greater than ndir_selfcal, then the remaining directions will not be selfcal-
# ed but will instead be imaged with the selfcal solutions from the nearest
# direction for which selfcal succeeded (if a target is specified and
# target_has_own_facet = True, it will be imaged in this way after ndir_total
# number of directions are processed)
# ndir_process = 10
# Total number of directions to selfcal (default = all)
# ndir_selfcal = 5
# Radius within which facets will be used (default = 1.25 * FWHM / 2 of primary
# beam of highest-frequency band); outside of this radius, small patches are
# used that do not appear in the final mosaic.
faceting_radius_deg = 2.0
# Check whether any sources from the initial subtract sky model fall on facet
# edges. If any are found, the facet regions are adjusted to avoid them (default
# is True)
# check_edges = True
# Grouping of directions into groups that are selfcal-ed in parallel, defined as
# grouping:n_total_per_grouping. For example, groupings = 1:5, 4:0 means two
# groupings are used, with the first 5 directions put into groups of one (i.e.,
# each direction processed in series) and the rest of the directions divided
# into groups of 4 (i.e., 4 directions processed in parallel). Default is one at
# a time (i.e., groupings = 1:0)
#groupings = 1:3,2:4,3:0
#1:5, 4:0
groupings = 1:0
# If groups are used to process more than one direction in parallel, reordering
# of the directions in the groups can be done to maximize the flux-weighted
# separation between directions in each group (default = True)
# allow_reordering = True
# A target can be specified to ensure that it falls entirely within a single
# facet. The values should be those of a circular region that encloses the
# source and not those of the target itself. Note that check_edges must be True
# for the facet boundaries to be adjusted. Lastly, the target can be placed in
# a facet of its own. In this case, it will not go through selfcal but will
# instead use the selfcal solutions of the nearest facet for which selfcal was
# done
# target_ra = 14h41m01.884
# target_dec = +35d30m31.52
# target_radius_arcmin = 10.2
# target_has_own_facet = False
[cluster]
# Full path to cluster description file. Use clusterdesc_file = PBS to use
# PBS / torque reserved nodes, clusterdesc_file = SLURM to use SLURM reserved
# ones, or use clusterdesc_file = JUROPA_slurm to use multiple nodes in a slurm
# reservation on JUROPA. If not given, the clusterdesc file for a single (i.e.,
# local) node is used
clusterdesc_file = /net/para34/data1/albert/pipeline/local.clusterdesc
# Full path to a local disk on the nodes for I/O-intensive processing. The path
# must be the same for all nodes. A selfcal-only path can also be specified to
# allow certain selfcal data to be cached in memory by setting it to a ram
# drive (e.g., /dev/shm). By default, dir_local_selfcal is set to dir_local
dir_local = /net/para34/data1/albert/products/goods-n-factor/io_tmp
dir_local_selfcal = /net/para34/data1/albert/products/goods-n-factor/io_selfcal_tmp
# Maximum number of CPUs per node to use (default = all). Note that this number
# will be divided among the directions to be run in parallel on each node
# (controlled by the ndir_per_node option). Ideally, the number of time chunks
# (controlled by the chunk_size_sec option) should be evenly divisible by the
# number of CPUs per direction.
ncpu = 24
# Maximum number of IO-intensive threads to run per node (default = sqrt(ncpu)).
# Note that this number will be divided among the directions to be run in
# parallel on each node (controlled by the ndir_per_node option). Ideally, the
# number of time chunks (controlled by the chunk_size_sec option) should be
# evenly divisible by the number of IO-intensive threads per direction.
nthread_io = 3
# Maximum fraction of the total memory per node that WSClean may use (default =
# 0.9)
wsclean_fmem = 0.2
# Maximum number of directions to process in parallel on each node (default =
# 1). Note that the number of CPUs (set with the ncpu parameter) and the amount
# of memory available to WSClean (set with the wsclean_fmem parameter) will be
# divided among the directions on each node
#ndir_per_node = 4
#[ms1.ms]
# MS-specific parameters (optional). Currently, only the initial sky model can
# be specified here. For multi-epoch (interleaved or multi-night) observations
# the skymodel has to be specified only for one MS of each frequency group, it
# will then be used for all MSs in this frequency group.
# init_skymodel = /data/ms1.sky
#[ms2.ms]
# init_skymodel = /data/ms2.sky
[checkfactor]
# Use casa or ds9 for facet images (default = casa)
# facet_viewer = ds9
# Load facet regions (ds9 only; default = False)
# ds9_load_regions = True
# Scale limits (min max) in Jy/beam (ds9 only; default = full range)
# ds9_limits = 0 0.1
# Use display or eog to display PNG images (default = display)
# image_display = eog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment