wsclean(1)
πΈ WSClean β from the wsclean(1) manual, General Commands Manual πΈ
okay bestie, sit down, hydrate, because this is THE tool. welcome to wsclean(1), the manual page for the icon itself. it's long so we're doing this in parts β part 1, right here, right now. let's go π
β¨ NAME β¨
WSClean β fast generic widefield interferometric imager. that's it, that's the vibe, she's fast, she's generic, she does widefield, she images. π
π¦ SYNOPSIS π¦
wsclean [options] <input-ms> [<2nd-ms> [..]]
you feed her options and one or more measurement sets. she does the rest. periodt.
π DESCRIPTION π
WSClean (short for w-stacking clean) is a fast generic widefield imager. it uses the w-stacking algorithm, and can also make use of the w-snapshot algorithm. as of Feb 2014, it is 2-12 times faster than CASA's w-projection, depending on the array configuration β yes, depending on the array config, so your mileage may vary, but still. slay.
it supports full-sky imaging and proper beam correction for homogeneous dipole arrays such as the MWA. π«
WSClean allows Hogbom and Cotton-Schwab cleaning, and can clean polarizations joinedly. all operations are performed on the CPU β so heads up, she is not specialized for GPUs. it's giving CPU main character energy, and honestly? we respect it. π«Ά
π OPTIONS π
π GENERAL OPTIONS π
-versionβ prints WSClean's version and then dips out (exits). bye! π-j<threads>β tell her how many computing threads to use, i.e. how many cpu cores get to come to the party. Default: use all cpu cores. go big or go home.-mem<percentage>β limit memory usage to the given fraction of the total system memory. this is an approximate value, so don't come for her if it's not pixel-perfect. Default:100.-absmem<memory limit>β like-mem, but this one specifies a fixed amount of memory in gigabytes. no fractions, just vibes and gigs.-reorder,-no-reorderβ force or disable reordering of the Measurement Set. reordering can be faster when the measurement set needs to be iterated several times, like with many major iterations or in channel imaging mode. Default: only reorder when in channel imaging mode.-tempdir<directory>β set the temporary directory used when reordering files. Default: same directory as the input measurement set.-no-dirtyβ do not save the dirty image. she simply will not.-saveweightsβ save the gridded weights into a fits file named<image-prefix>-weights.fits.-saveuvβ save the gridded uv plane, i.e. the FFT of the residual image. the UV plane is complex, hence two images will be output:<prefix>-uv-real.fitsand<prefix>-uv-imag.fits. two files, one iconic moment. β¨-apply-primary-beamβ calculate and apply the primary beam, and save images for the Jones components, with weighting identical to the weighting as used by the imager. Only available for LOFAR. sorry to everyone else, this one's LOFAR-exclusive.-reuse-primary-beamβ if a primary beam image exists on disk, reuse those images (not implemented yet). so likeβ¦ she's manifesting it. π-use-differential-lofar-beamβ assume the visibilities have already been beam-corrected for the reference direction.-update-model-required(default),-no-update-model-requiredβ these two options specify whether the model data column is required to contain valid model data after imaging. it can save time to not update the model data column.-verbose(or-v) β increase verbosity of output. she will simply tell you more. π£οΈ-log-timeβ add date and time to each line in the output. timestamps, because receipts matter.-quietβ do not output anything but errors. silent treatment, but make it useful.
βοΈ WEIGHTING OPTIONS βοΈ
-weight<weightmode>β weightmode can be:natural,uniform,briggs. Default:uniform. when using Briggs' weighting, add the robustness parameter, like:-weight briggs 0.5.-superweight<factor>β increase the weight gridding box size, similar to Casa's superuniform weighting scheme. Default:1.0. the factor can be rational and can even be less than one for subpixel weighting. flexible queen.-mfsweightingβ in spectral mode, calculate the weights as if the image was made using MFS. this makes sure that the sum of channel images equals the MFS weights. otherwise, the channel image will become a bit more naturally weighted. this is only relevant for weighting modes that require gridding (i.e.,Uniform,Briggs'). Default: off, unless-joinchannelsis specified.-nomfsweightingβ opposite of-mfsweighting; can be used to turn off MFS weighting in-joinchannelsmode.-weighting-rank-filter<level>β filter the weights and set high weights to the local mean. the level parameter specifies the filter level; any value larger thanlevel*localmeanwill be set tolevel*localmean.-weighting-rank-filter-size<size>β set size of the weighting rank filter. Default:16.-taper-gaussian<beamsize>β taper the weights with a Gaussian function. this will reduce the contribution of long baselines. the beamsize is by default in asec, but a unit can be specified ("2amin").-taper-tukey<lambda>β taper the outer weights with a Tukey transition. lambda specifies the size of the transition; use in combination with-maxuv-l.-taper-inner-tukey<lambda>β taper the weights with a Tukey transition. lambda specifies the size of the transition; use in combination with-minuv-l.-taper-edge<lambda>β taper the weights with a rectangle, to keep a space of lambda between the edge and the gridded visibilities.-taper-edge-tukey<lambda>β taper the edge weights with a Tukey window. lambda is the size of the Tukey transition. when-taper-edgeis also specified, the Tukey transition starts inside the inner rectangle. nested tapers, we love a layered look. π
π§ INVERSION OPTIONS π§
-name<image-prefix>β use image-prefix as the prefix for output files. Default is'wsclean'.-size<width><height>β Default:2048 x 2048.-trim<width><height>β after inversion, trim the image to the given size. βοΈ-scale<pixel-scale>β scale of a pixel. default unit is degrees, but it can be specified, e.g.-scale 20asec. Default:0.01deg.-nwlayers<nwlayers>β number of w-layers to use. Default: minimum suggested #w-layers for the first MS.-nwlayers-for-size<width><height>β use the minimum suggested w-layers for an image of the given size. can e.g. be used to increase accuracy when predicting a small part of the full image.-channelsout<count>β splits the bandwidth and makes count nr. of images. Default:1.-predictβ only perform a single prediction for an existing image. doesn't do any imaging or cleaning. the input images should have the same name as the model output images would have in normal imaging mode.-predict-channels<nchannels>β interpolate from a given number of images to the number of channels that are predicted as specified by-channelsout. will interpolate using the frequencies of the images. use one of the-fit-spectral-...options to specify the interpolation method / freedom. only used when-predictis specified.-subtract-modelβ subtract the model from the data column in the first iteration. this can be used to reimage an already cleaned image, e.g. at a different resolution.-nosmallinversion,-smallinversionβ perform inversion at the Nyquist resolution and upscale the image to the requested image size afterwards. this speeds up inversion considerably, but makes aliasing slightly worse. this effect is in most cases <1%. Default: on.-gridmode<"nn", "kb" or "rect">β kernel and mode used for gridding:kb= Kaiser-Bessel (default with 7 pixels),nn= nearest neighbour (no kernel),rect= rectangular window. Default:kb.-gkernelsize<size>β gridding antialiasing kernel size. Default:7.-oversampling<factor>β oversampling factor used during gridding. Default:63. she's thorough.-make-psfβ always make the psf, even when no cleaning is performed.-make-psf-onlyβ only make the psf, no images are made. psf-only era.-savegriddingβ save the gridding correction image. this shows the effect of the antialiasing filter. Default: not saved.-dft-predictionβ predict via a direct Fourier transform. this is slow, but it can account for direction-dependent effects. this only has effect when-mgainis set or-predictis given.-dft-with-beamβ apply the beam during DFT. currently only works for LOFAR.-visibility-weighting-mode[normal/squared/unit]β specify visibility weighting modi. affects how the weights (normally) stored inWEIGHT_SPECTRUMcolumn are applied. useful for estimating e.g. EoR power spectra errors. normally one would use this in combination with-no-normalize-for-weighting.-no-normalize-for-weightingβ disable the normalization for the weights, which makes the PSF's peak one. see-visibility-weighting-mode. only useful with natural weighting.
π DATA SELECTION OPTIONS π
-pol<list>β Default:'I'. possible values:XX,XY,YX,YY,I,Q,U,V,RR,RL,LRorLL(case insensitive). multiple values can be separated with commas, e.g.:'xx,xy,yx,yy'. two or four polarizations can be joinedly cleaned (see'-joinpolarizations'), but this is not the default.I,Q,UandVpolarizations will be directly calculated from the visibilities, which is not appropriate for telescopes with non-orthogonal feeds, such as MWA and LOFAR. the'xy'polarization will output both a real and an imaginary image, which allows calculating true Stokes polarizations for those telescopes. so many letters, so many choices, choose wisely bestie. π«-interval<start-index><end-index>β only image the given time interval. indices specify the timesteps, and the end index is exclusive. Default: image all time steps.-intervalsout<count>β number of intervals to image inside the selected global interval. Default:1.-channelrange<start-channel><end-channel>β only image the given channel range. indices specify channel indices, and the end index is exclusive. Default: image all channels.-field<fieldid>β image the given field id. Default: first field (id0).-datacolumn<columnname>β Default:CORRECTED_DATAif it exists, otherwiseDATAwill be used.-maxuvw-m<meters>,-minuvw-m<meters>β set the min/max baseline distance in meters.-maxuv-l<lambda>,-minuv-l<lambda>β set the min/max uv distance in lambda.-maxw<percentage>β do not grid visibilities with a w-value higher than the given percentage of the max w, to save speed. Default: grid everything.
π DECONVOLUTION OPTIONS π
-niter<niter>β maximum number of clean iterations to perform. Default:0.-threshold<threshold>β stopping clean thresholding in Jy. Default:0.0.-gain<gain>β cleaning gain: ratio of peak that will be subtracted in each iteration. Default:0.1.
okay that's it for part 1 bestie, the rest is coming, don't go anywhere π
-mgain<gain> β okay so this is the cleaning gain for major iterations: it's the ratio of the peak that gets subtracted in each major iteration. If you're gonna use major iterations,0.85is literally the good value. Default:1.0. π-joinpolarizationsβ this one does cleaning by searching for peaks in the sum of squares of the polarizations, but then it subtracts components from the individual images. Only possible when imaging two or four Stokes or linear parameters. Default: off. π«Ά-joinchannelsβ cleaning by searching for peaks in the MFS image, but subtract components from individual channels. This will turn onmfsweightingby default. Default: off. β¨-multiscaleβ clean on different scales. This is a new algorithm. Default: off. This parameter invokes the v1.9 multiscale algorithm, which is slower but more accurate compared to the older algorithm, and therefore the recommended one to use. The older algorithm is now invoked with-fast-multiscale. π-fast-multiscaleβ clean on different scales. This is a new fast experimental algorithm. Default: off. This method used to be invoked with-multiscalebefore v1.9, but the newer multiscale algorithm is somewhat more accurate and therefore recommended. β‘-multiscale-threshold-biasβ parameter to lower the threshold for larger scales. The used threshold for a scale isthreshold(scale)=pointsource_threshold x tbias^scale. A lower bias will clean larger scales deeper. Default:0.7. π-multiscale-scale-biasβ parameter to prevent cleaning small scales in the large-scale iterations. A higher bias will give more focus to larger scales. Default:0.6. π-multiscale-scales<comma-separated list of sizes in pixels> β sets a list of scales to use in multi-scale cleaning. If unset, WSClean will select the delta (zero) scale, scales starting at four times the synthesized PSF, and increase by a factor of two until the maximum scale is reached. Example:-multiscale-scales 0,5,12.5. π¦-iuwtβ use the IUWT deconvolution algorithm. π-moresane-ext<location> β use the MoreSane deconvolution algorithm, installed at the specified location. πΈ-moresane-arg<arguments> β pass the specified arguments to moresane. Note that multiple parameters have to be enclosed in quotes. π¬-moresane-sl<sl1,sl2,...> β MoreSane--sigmalevelsetting for each major loop iteration. Useful to start at high levels and go down with subsequent loops, e.g.20,10,5. π₯-cleanborder<percentage> β set the border size in which no cleaning is performed, in percentage of the width/height of the image. With an image size of1000and clean border of1%, each border is10pixels. Default:5(%). π-fitsmask<mask> β use the specified fits-file as mask during cleaning. π-casamask<mask> β use the specified CASA mask as mask during cleaning. π-smallpsfβ resize the psf to speed up minor clean iterations. Not the default. πββοΈ-nonegativeβ do not allow negative components during cleaning. Not the default. π«-negativeβ default on: opposite of-nonegative. β-stopnegativeβ stop on negative components. Not the default. β-fit-spectral-pol<nterms> β fit a polynomial over frequency to each clean component. This has only effect when the channels are joined with-joinchannels. π-fit-spectral-log-pol<nterms> β likefit-spectral-pol, but fits a logarithmic polynomial over frequency instead. π-deconvolution-channels<nchannels> β decrease the number of channels as specified by-channelsoutto the given number for deconvolution. Only possible in combination with one of the-fit-spectraloptions. Proper residuals/restored images will only be returned whenmgain < 1. β οΈ-squared-channel-joiningβ use with-joinchannelsto perform peak finding in the sum of squared values over channels, instead of the normal sum. This is useful for imaging QU polarizations with non-zero rotation measures, for which the normal sum is insensitive. π₯-force-dynamic-joinβ use alternative joined clean algorithm (feature for testing). π§ͺ
β¨ RESTORATION OPTIONS β¨
-beamsize<arcsec> β set the FWHM beam size in arcsec for restoring the clean components. Default: longest projected baseline defines restoring beam. π-beamshape<maj in arcsec> <min in arcsec> <position angle in deg> β set the FWHM beam shape for restoring the clean components. Defaults units for maj and min are arcsec, and degrees for PA. Can be overridden, e.g.'-beamshape 1amin 1amin 3deg'. π¨-fitbeamβ determine beam shape by fitting the PSF (default if PSF is made). π-nofitbeamβ do not determine beam shape from the PSF. π«-theoreticbeamβ write the beam in output fits files as calculated from the longest projected baseline. This method results in slightly less accurate integrated fluxes, but in simple imaging provide a beam size even without making the PSF. Default: off. π-circularbeamβ force the beam to be circular:bminwill be set tobmaj. β-ellipticalbeamβ allow the beam to be elliptical. Default. π₯
π AUTHOR π
AndrΓ© Offringa <offringa@gmail.com>
okay bestie, that's the whole wsclean(1) vibe β source/version wsclean, dated 2016-07-09. go forth and image, you absolute icon π
β¨π¦
π¦ where this page comes from
- debian bookworm: wsclean 3.1-3 Β· GPL-3.0-or-later
- debian trixie: wsclean 3.6-1 Β· GPL-3.0-or-later
- ubuntu jammy: wsclean 3.0-2build2 Β· GPL-3.0-or-later
- ubuntu noble: wsclean 3.4-1build3 Β· GPL-3.0-or-later
- ubuntu questing: wsclean 3.6-2
- ubuntu resolute: wsclean 3.7-1 Β· GPL-3.0-or-later
- ubuntu stonking: wsclean 3.7-2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms