POL-2 – James Clerk Maxwell Telescope https://www.eaobservatory.org/jcmt Operated by East Asian Observatory Wed, 21 Jul 2021 09:05:08 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.2 KAPPA/POL2MAP bug causes incorrect variances and error values https://www.eaobservatory.org/jcmt/2021/07/kappa-pol2map-bug-causes-incorrect-variances-and-error-values/ Wed, 21 Jul 2021 09:05:08 +0000 http://www.eaobservatory.org/jcmt/?p=12171 Continue reading]]> A bug was introduced into the cmult and cdiv commands in the Starlink KAPPA package on 21st May 2021. This bug caused incorrect Variance values to be stored in the output and was fixed on 12th July 2021. Consequently, anyone who uses these commands and who last rsynced the nightly Starlink build from EAO between these dates should consider rsyncing the current nightly build, which includes the bug fix.

POL2 users should be aware that the cmult command is used within the pol2map script when converting values from pW to mJy/beam. This means that vector catalogues produced by pol2map will contain incorrect DI/DQ/DU values if starlink was rsynced between the two dates mentioned above.  Again, the solution is to rsync the current nightly build, which includes the bug fix.

]]>
Bug in POL2MAP https://www.eaobservatory.org/jcmt/2021/05/bug-in-pol2map/ Wed, 19 May 2021 10:24:33 +0000 http://www.eaobservatory.org/jcmt/?p=12069 Continue reading]]> A  recent change in the Starlink KAPPA package causes the SMURF pol2map command to crash . The main symptom is a message at the end of the pol2map logfile that looks something like this:

+ -50
. could not convert string to float: '+ -50'

The change that causes this problem occurred on 30th April 2021 so will affect Starlink installations copied from EAO on or after that date. The problem has been fixed today (19th May) so anyone affected by this problem should copy starlink again after completion of the next nightly build.

Thanks to Jeremy Yang for reporting this problem.

]]>
Re-modelling the error estimates in a POL2 vector catalogue https://www.eaobservatory.org/jcmt/2020/06/re-modelling-the-error-estimates-in-a-pol2-vector-catalogue/ Mon, 01 Jun 2020 15:46:39 +0000 http://www.eaobservatory.org/jcmt/?p=11250 Continue reading]]> If the MAPVAR=YES option is used when running the SMURF pol2map  script, the I, Q and U error estimates in the resulting vector catalogue will be based on the spread of pixel values at each point on the sky in the I, Q and U maps made from individual observations. Thus if 20 observations are processed by pol2map to create a vector catalogue, then each I, Q or U error estimate in the vector catalogue will be based on the spread of 20 independent measurements of I, Q or U.  Even though 20 observations is a lot of POL2 data, 20 is still a fairly small number from which to produce an accurate estimate of the error. Consequently, it is usual to see a large level of random “noise” on the error estimates, as in the following example which shows the total intensity (I) error estimates taken from a 12″ vector catalogue near Ophiuchus L 1688 (the noise level increases towards the edge of the map due to there being fewer bolometer samples per pixel near the edge):

The uncertainty on the error estimate can cause some vectors that are clearly wrong (e.g. because they are very different to nearby vectors) to have anomalously low error estimates and so to be included in the set of “good” vectors (i.e. vectors that pass some suitable selection criterion based on the noise estimates).

One simple solution to this could be to apply some spatial smoothing to the error estimates. This would be a reasonable thing to do if there were no compact sources in the map. The errors close to a compact source are generally higher than those in a background region because of things like pointing errors, calibration errors, etc. These things cause a compact source to look slightly different in each observation and so cause higher error estimates in the vector catalogue. The above error estimates map shows this effect in the higher values at the very centre. Simply smoothing this map would spread that central feature out, artificially decreasing the peak error and increasing the errors in the neighbouring background pixels.

An alternative to smoothing is to split the total noise up into several different components, create a model of each component , and then add the models together. The pol2noise script in SMURF has been modified to include  a facility to re-model the noise estimates in a vector catalogue using such an approach. This facility is used by setting MODE=REMODEL on the pol2noise command line:

% pol2noise mycat.FIT mode=remodel out=newcat.FIT exptime=iext debiastype=mas

This  creates an output catalogue (newcat.FIT) holding a copy of the input catalogue (mycat.FIT), and then calculates new values for all the error columns in the output catalogue. The new I, Q and U error values are first derived from a three component model of the noise in each quantity, and then errors for the derived quantities (PI, P and ANG) are found. New values of PI and P are also found using the specified de-biasing algorithm. The file iext.sdf holds the total intensity coadd map created by pol2map and is used to define the total exposure time in each pixel. The re-modelled total intensity error estimates look like this :

Most of the noise has gone without reducing the resolution. The script displays the original and re-modelled error estimates for each Stokes parameter (I, Q and U), the residuals between the two and a scatter plot. The best fitting straight line through the scatter plot is also displayed:

The three components used to model the error on each Stokes parameter (I, Q or U) are described below:

  • The background component: This is derived from an exposure time map  (obtained from iext.sdf in the above example). The background component is equal to A.tB , where “t” is the exposure time at each pixel and A and B are constants determined by doing a linear fit between the log of the noise estimate in the catalogue (DQ, DU or DI) and the log of the exposure time (in practice, B is usually close to -0.5). The fit excludes bright source areas, but also excludes a thin rim around the edge of the map where the original noise estimates are subject to large inaccuracies. Since the exposure time map is usually very much smoother than the original noise estimates, the background component is also much smoother.
  • The source component: This represents the extra noise found in and around compact sources caused by pointing errors, calibration errors, etc. The background component is first subtracted from the catalogue noise estimates and the residual noise values are then modelled using a collection of Gaussians. This modeling is done using the GaussClumps algorithm provided by the findclumps command in the Starlink CUPID package. The noise residuals are first divided into a number of “islands”, each island being a collection of contiguous pixels with  noise residual significantly higher than zero (this is done using the FellWalker algorithm in CUPID). The GaussClumps algorithm is then used to model the noise residuals in each island. The resulting model is smoothed lightly using a Gaussian kernel of FWHM 1.2 pixels.
  • The residual component: This represents any noise not accounted for by the other two models. The noise residuals are first found by subtracting the other two components from the original catalogue noise estimates. Any strong outlier values are removed and the results are smoothed more heavily using a Gaussian kernel of FWHM 4 pixels.

The final model is the sum of the above three components. The new DI, DQ and DU values are found independently using the above method. The errors for the derived quantities (DPI, DP and DANG) are then found from DQ, DU and DI using the usual error popagation formulae. Finally new P and PI values are found using a specified form of de-biasing (see parameter DEBIASTYPE).

]]>
pol2map now adds an AST column to the output catalogue https://www.eaobservatory.org/jcmt/2020/04/pol2map-now-adds-an-ast-column-to-the-output-catalogue/ Mon, 20 Apr 2020 10:00:53 +0000 http://www.eaobservatory.org/jcmt/?p=11097 Continue reading]]> The pol2map command used to create I, Q, U maps and vector catalogues from POL2 data now  adds a column called “AST” to the output catalogue. This new column holds an integer for each row, indicating if the row is inside (1) or outside (0) the AST mask. It uses the poledit command in the Starlink POLPACK package, as described in an earlier post.

A possible use of this new column would be to select the vectors corresponding to the inside of the AST mask when viewing the vector map in GAIA. To do this, the selection criterion “$ast == 1” should be used within the GAIA polarimetry toolbox.

]]>
Changing the de-biasing in a POL2 vector catalogue https://www.eaobservatory.org/jcmt/2020/04/changing-the-de-biasing-in-a-pol2-vector-catalogue/ Wed, 15 Apr 2020 09:33:08 +0000 http://www.eaobservatory.org/jcmt/?p=11085 Continue reading]]> The new poledit command in the Starlink POLPACK package (see a previous blog post) has an option to recalculate the PI (polarised intensity) and P (percentage polarisation) values using a specified form of de-biasing. If the existing catalogue is in file “mycat.FIT“, you can do:

% polpack
% poledit mycat newcat mode=debias debiastype=mas

This will create a new file “newcat.FIT” containing a copy of “mycat.FIT“, but with new P and PI columns re-calculated from the existing Q, U, I and DPI values using the “Modified Asymptotic” (MAS) bias estimator (any de-biasing used to create the original catalogue is ignored). The options for the DEBIASTYPE parameter are:

  • “MAS”: De-bias using the modified asymptotic estimator
  • “AS”: De-bias using the asymptotic estimator
  • “None”: Do not include any de-biasing

See a previous blog post for more on these types of de-biasing.

The following plot shows the results of using the above command. The horizontal axis is PI/DPI (polarised intensity signal to noise ratio) with no de-biasing. The vertical axis is the new PI/DPI value created with each of the DEBIASTYPE options listed above (red is “AS”, blue is “MAS” and green is “None”)

]]>
Adding an AST mask column to a POL2 vector catalogue https://www.eaobservatory.org/jcmt/2020/04/adding-an-ast-mask-column-to-a-pol2-vector-catalogue/ Wed, 15 Apr 2020 09:01:40 +0000 http://www.eaobservatory.org/jcmt/?p=11081 Continue reading]]> A new command called poledit has been added to the Starlink POLPACK package and will be available in Starlink builds made after 10:00 UTC on 15th April 2020. It allows a vector catalogue to be changed in several different ways, as specified by the MODE parameter (new forms of edit will no doubt be added in the future). One of the available options is to add a new column to the output catalogue containing values read from an NDF. This option is divided into two sub-options – one that stores the values from the NDF directly in the new column, and another that stores a boolean flag in each row of the new column indicating whether the corresponding NDF pixel had a good value or not (i.e. was not set to the “bad” value – the Starlink equivalent of NaN).

This second sub-option (selected using the poledit MASKCOL parameter) can be used to create a column in a POL2 catalogue that indicates which vectors are inside the AST mask. If your catalogue is “mycat.FIT”, then do:

% polpack
% poledit mycat newcat mode=AddColumn col=AST ndf=astmask maskcol=yes

where “astmask.sdf” is an existing NDF that was created by pol2map at step 2 or 3 using the  MASKOUT1 parameter. The above command will create a new catalogue in file “newcat.FIT” containing a copy of “mycat.FIT” with an additional column called “AST”. This new column will contain the value zero for each row that has a bad value in “astmask.sdf” (i.e. is outside the AST mask) and the value one for all other rows.

By default, the catalogue and NDF are aligned in (RA,Dec) – that is, the (RA,Dec) values for each row in the catalogue are used to determine the NDF pixel that corresponds to the row. There is an option to align in pixel coordinates instead using the (X,Y) columns in the catalogue.

]]>
Change to the default IP model used by pol2map https://www.eaobservatory.org/jcmt/2020/04/change-to-the-default-ip-model-used-by-pol2map/ Fri, 03 Apr 2020 15:28:19 +0000 http://www.eaobservatory.org/jcmt/?p=11057 Continue reading]]> As of SMURF version 1.7.0, the default Instrumental Polarisation (IP) model used by the pol2map command   has changed from “JAN2018” to “AUG2019”. Thus, if you do not assign a value to the “ipmodel” configuration parameter when running pol2map, the AUG2019 model will now be used rather than the JAN2018 model. If you wish to continue using the JAN2018 model, you must add “ipmodel=JAN2018” to the configuration used when pol2map is run. For instance:

% pol2map config='ipmodel=JAN2018'

See the blog post “New IP models for POL2 data” for more information about these IP models. Compared to the JAN2018 model, the AUG2019 model significantly improves the consistency between 450 um maps taken at different elevations. At 850 um, the differences between the two models are generally lower than the noise.

]]>
New de-biasing method for POL2 data https://www.eaobservatory.org/jcmt/2020/04/new-de-biasing-method-for-pol2-data/ Fri, 03 Apr 2020 14:20:32 +0000 http://www.eaobservatory.org/jcmt/?p=11051 Continue reading]]> Calculation of the polarised intensity (PI) and percentage polarisation (P) values from measurements of I, Q and U usually need to be corrected to take account of the bias towards larger values caused by the presence of noise (particularly noticeable  in areas of low signal-to-noise). This bias occurs because of the squaring of Q and U involved in calculating PI:

PI = √( Q2 + U2 )

Thus both positive and negative Q and U values give a positive PI value, pushing the mean PI value upwards. A correction for this effect is applied if the parameter setting “debias=yes” is specified when running the SMURF pol2map command (note, the default is “debias=no“). To date, this correction has used the so-called “asymptotic estimator” (AS):

PIAS = √( Q2 + U2 – σ2 )

where σ2 is the weighted mean of the variances on Q and U:

σ2 = ( Q2*σQ2 + U2*σU2 ) / ( Q2 + U2 )

However, this estimator has the problem that it becomes undefined when

Q2 + U2 < σ2 

The usual practice is to use an exact value of zero for the PI at such points. However, this can upset the PI noise statistics in very low SNR regions.

However, there are other forms of de-biasing that avoid this problem, such as the “modified asymptotic estimator” (MAS) described by Plaszczynski et al  (MNRAS 2014).   The de-biased MAS estimate of PI is defined by

PIMAS = PI – 0.5*σ2*( 1 – e-(PI/σ)2)/PI

where PI is √( Q2 + U2 ). The PIMAS value is defined for all non-zero PI. The following figure shows PIAS  (blue) and PIMAS (green) plotted against uncorrected PI, assuming σ2 = 1:

The MAS estimator may now be used in pol2map by adding “debiastype=mas” to the pol2map command line. Note, the default de-biasing method is still the asymptotic estimator. Using the MAS estimator may facilitate investigation of PI noise statistics in low SNR areas.

 

]]>
Checking errors in POL2 vector catalogues https://www.eaobservatory.org/jcmt/2020/04/checking-errors-in-pol2-vector-catalogues/ Fri, 03 Apr 2020 12:37:34 +0000 http://www.eaobservatory.org/jcmt/?p=11040 Continue reading]]> A new command called pol2noise has been added to the Starlink SMURF package. It allows the error values stored in a POL2 vector catalogue to be checked for consistency. For instance, to check the errors on the Q column, do:

% smurf
% pol2noise mycat.FIT Q

replacing myfit.FIT with the name of your vector catalogue (“Q” can be replaced by U, I or PI). It will display three pictures on the current KAPPA graphics device.  So for instance, to use an xwindow graphics device, you can either use KAPPA:gdset to set xwindows as the default graphics device prior to running the above commands:

% kappa
% gdset xw

or you can specify the device directly on the pol2noise command line:

% pol2noise mycat.FIT Q device=xw

This will produce an X window showing something like this:

The left hand picture shows the noise level in the background regions determined from the local variation between the Q values in the catalogue. The middle picture shows the noise level recorded in the DQ column of the catalogue. The right hand picture is a scatter plot of the values in the other two pictures. The best fit line is shown in red (the slope and intercept of this line,together with the RMS residual, is displayed on the terminal screen when pol2noise ends). The upper limit of the data included in the scatter plot is shown as a red contour in the two images.

For more information on the available options and how pol2noise determines the background regions and the displayed noise levels, do:


% pol2noise --help

 

]]>
POL2 vector catalogues now contain more rows https://www.eaobservatory.org/jcmt/2020/04/pol2-vector-catalogues-now-contain-more-rows/ Fri, 03 Apr 2020 09:14:59 +0000 http://www.eaobservatory.org/jcmt/?p=11036 Continue reading]]> A change has been made recently to the contents of vector catalogues created using the pol2map command in the Starlink SMURF package. Previously, sky positions that have a negative total intensity (I) value were excluded completely from the catalogue (such positions occur frequently in background regions because of noise). Now, these positions are included in the catalogue, albeit with a null value for the percentage polarisation (P) column and associate error column (DP).  This change simplifies the interpretation of column statistics in the background regions, since it removes the bias introduced by the exclusion of position with negative I values.

]]>