Menu

ComponentList

André Offringa

WSClean supports output of a component list since version 2.4. Note that version 2.3 supported a different format which is now deprecated. The benefit of a component list is that it allows representing the components of multi-scale cleaning without 'pixelizing' the larger kernels, thereby decreasing the number of required components in a sky model compared to representing all components with delta scales.

The option is enabled by adding -save-source-list on the command line

Current file format

This section describes the source file format as it is since version 2.4. The file format is compatible to the Blackboard Self-cal DPPP sky model formats, but be aware that only new versions (as of April 2017) of DPPP support the polynomial spectral function that is used.

When -save-source-list is added on the command line, a text file named <prefix>-sources.txt is saved. The file contains comma-separated values and looks as follows:

Format = Name, Type, Ra, Dec, I, SpectralIndex, LogarithmicSI, ReferenceFrequency='125584411.621094', MajorAxis, MinorAxis, Orientation
s0c0,POINT,08:28:05.152,39.35.08.511,0.000748810650400475,[-0.00695379313004673,-0.0849693907803257],false,125584411.621094,,,
s0c1,POINT,08:22:27.658,39.37.38.353,-0.000154968071120503,[-0.000898135869319762,0.0183710297781511],false,125584411.621094,,,
s0c2,POINT,08:18:44.309,39.38.37.773,0.000233552686127518,[-0.000869089801859608,0.0828587947079702],false,125584411.621094,,,
s0c3,POINT,08:03:07.538,39.37.02.717,0.000919058240247659,[0.001264109956439,0.0201438425344451],false,125584411.621094,,,
[..]
s1c0,GAUSSIAN,08:31:10.37,41.47.17.131,0.000723326710524984,[0.00344317919656096,-0.115990377833407],false,125584411.621094,83.6144111272856,83.6144111272856,0
s1c1,GAUSSIAN,07:51:09.24,42.32.46.177,0.000660490865128381,[0.00404869217508666,-0.011844732049232],false,125584411.621094,83.6144111272856,83.6144111272856,0
[..]

Each source (i.e., clean component) is one line in the file. The first line is a header starting with "Format = ..." that describes the columns. The header is allowed to specify a default value for this column, as is done above for the reference frequency. When a field is left empty, it should take the default value. See the BBS / DPPP documentation for more info on default values.

The columns

The Name contains a unique identifier for this component. In the current format, it consists of the letter 's' followed by the scale index of the component (0 meaning the smallest scale).

The Type column is either POINT or GAUSSIAN. For a point component, the axes and orientation fields are empty. A Gaussian is a standard Gaussian as often used in sky models. When asking WSClean to output a source list, it will automatically enable Gaussian shaped components, instead of the default tapered quadratic.

RA and dec are the central coordinates of the component, in notation of "hh:mm:ss.sss" and "dd.mm.ss.sss".

The I column represents the flux density in Jy at the reference frequency.

The SpectralIndex column is an array of numbers surround by square brackets, that represent the coefficients of the logarithmic or ordinary polynomial (see logarithmicSI), when normalized to the reference frequency. The logarithmic polynomial function is given by

flux(nu) = exp ( log stokesI + term0 log(nu/refnu) + term1 log(nu/refnu)^2 + ... )

Note that term0 represents the spectral index term in this case.

An ordinary polynomial function is given by

flux(nu) = stokesI + term0 (nu/refnu - 1) + term1 (nu/refnu - 1)^2 + ...

Note that -1 is subtracted in the base to let the stokesI value give the value at the reference frequency.

LogarithmicSI is true or false, denoting that the spectral index column uses logarithmic or ordinary polynomials, respectively. Note that in absense of this column, logarithmic polynomials are used.

ReferenceFrequency gives the frequency in Hz at which the polynomial or logarithmic polynomial is normalized.

The MajorAxis, MinorAxis and Orientation columns define the shape of the Gaussian. The axes are given in units of arcseconds, and orientation is in degrees. Note that currently the major and minor axis of scales are always the same, and thus the orientation has no effect (and is therefore always zero).

Deprecated file format

This describes the source component output as it was in version 2.3, which is now deprecated. For this format, the option -save-component-list was used, which well enable saving of a file named <prefix>-components.txt. This option is no longer recognized in version 2.4 and later. In the old file format, a component list is a comma-separated file with a header, and looks like this:

# (Name, Type, Ra, Dec, SpectralTerms, MajorAxis, MinorAxis, Orientation) = format
# ReferenceFrequency = 156795000
# SpectralFunction = Polynomial
s0c0,POINT,08:15:12.028,-51.18.35.311,[-1.67156418282934,1.96590849091735],,,
s0c1,POINT,08:12:32.072,-51.18.07.758,[-1.64858329785659,2.01351139840054],,,
[..]
s1c0,GAUSSIAN,09:05:26.127,-50.34.25.763,[0.993046008189193,-1.28129461341548],278.589850437432,278.589850437432,0
s1c1,GAUSSIAN,08:01:47.954,-50.54.00.538,[0.454109596477206,-0.169314554333533],278.589850437432,278.589850437432,0
[..]

The first line of the header defines the columns in the file. The second line defines the reference frequency which is used to evaluate the spectral function. The third line defines the spectral function used in the file, which currently is always Polynomial, indicating a polynomial function. Note that the component list therefore currently only works when using polynomial fitting in the cleaning (-fit-spectral-pol). More lines starting with a sharp-symbol (#) might be added in a later version.

Columns in the old file format

All columns in the old file format are similar to the ones already described, with the exception of the SpectralTerms column. This column is an array of numbers surround by square brackets, that represent the coefficients of the polynomial, when normalized to the reference frequency given at the top of the file. Note that the first term is now part of the array (whereas in the new format it has its own column), and is also not normalized to give the flux at the reference frequency, but rather at 0 Mhz. This is how this columns differs from the new format. The function is therefore given by

flux(nu) = term0 + term1 (nu/refnu) + term2 (nu/refnu)^2 + ...

Related

Wiki & Manual: Changelog-2.3
Wiki & Manual: Changelog-2.4