Keywords: imager

Next: The STOKES command Up: Polarization Handling Previous: Polarization Handling Contents Index

## Data Handling

Importing data
When importing data, the violet`fits_to_uvt` script assumes by default the data is unpolarized and produces the pseudo-polarisation state "None" from the UVFITS file, by a properly weighted combination of the two parallel hand states if more than one state is present. The weighting is based on the relative noise in both polarization states.

Full polarization information can be preserved by adding the `magenta /STOKES` option to the magenta`@ fits_to_uvt` command.

The magenta`READ UV` command will read data with any polarization state(s).

Processing data
On the contrary, practically all [rgb]1,0,0IMAGER commands cannot handle more than 1 polarization state. So far, only two commands fully support polarized data: magenta`UV_TIME` and magenta`STOKES`.

- magenta`STOKES` is the primary command that allows to derive or extract a UV data with only one Stokes parameter from a UV data set with several polarization states. [rgb]1,0,0IMAGER can then process the individual Stokes parameters separately.
- For convenience (because polarized data is obviously in general bigger), the magenta`UV_TIME` command can be used for time averaging prior to use of the magenta`STOKES` command.
- Most other commands will flatly refuse to handle data with more than 1 polarization state (e.g. magenta`UV_FILTER`, magenta`UV_RESAMPLE`, etc...).
- For debugging purpose, some commands like magenta`UV_PREVIEW`, magenta`UV_MAP` or magenta`UV_STAT` will operate with more than 1 polarization state, but will not produce meaningful results (only a subset of the data may be treated).

Some imaging strategies cannot be used directly on polarized data. Also, the automatic definition of supports (magenta`MASK /THRESHOLD`) only makes sense on Stokes I or parallel hand polarization states, not on Stokes Q,U,V or cross-hand states. The same applies to spectral line identifications.

PIPELINE processing The PIPELINE tools does not automatically handle polarization data. However, through judicious use of the magenta`PIPELINE SELECT` and magenta`PIPELINE FIND` commands with ad-hoc filters, imaging, including self-calibration, is possible through custom (though simple) scripts.

The script violet`self-polar.ima` just does that, and follows the naming conventions used by the magenta`MAP_POLAR` command. It contains the following commands

      CATALOG               ! No catalog, no Line emission
      ! "Split the X+Y (XX,YY,XY,YX) UVFITS file into I,Q,U,V Stokes UV tables"
      @ stokes-split &1
      ! Setup the pipeline
      IMAGER\PIPELINE ?
      IMAGER\PIPELINE organize        !  " Move UV tables to RAW/"
      sic mkdir UVFITS
      SIC\SYSTEM " mv *.uvfits UVFITS/"
      SIC\SYSTEM " mv RAW/&1.uvt .."  !   "Remove the X+Y UV table from RAW/"
      !
      ! Select the I image for self-calibration
      let all%filter *-I
      IMAGER\PIPELINE select
      IMAGER\PIPELINE compute
      !
      ! Apply self-calibration solution to I,Q,U,V data
      let all%filter *
      IMAGER\PIPELINE find
      IMAGER\PIPELINE select
      IMAGER\PIPELINE collect
      IMAGER\PIPELINE apply
      ! Image every thing consistently
      IMAGER\PIPELINE image
      PIPELINE SAVE

Analysing data
The magenta`MAP_POLAR` command allows to derive images of the Polarized intensity and/or fraction and Polarization angle, as well as display of the polarization vectors onto a background image. So far, the command only works for a single plane image.

The magenta`MAP_POLAR` command works through data files that follow conventional naming rules to identify them. The implicit rule is that Stokes S (where S is any of I,Q,U,V) is stored in a file of name 'NameBegin'"-N"'NameEnd', e.g. if 'NameBegin' is `My_Data`

        My_Data-I+C.uvt,  My_Data-U+C.lmv-clean, etc..

Next: The STOKES command Up: Polarization Handling Previous: Polarization Handling Contents Index