REQUIREMENT: Before proceeding, install or update your stenv distribution. stenv is the replacement for AstroConda, which is unsupported as of February 2023.

Using ACS Polarization Tools#

Introduction#


In December 2020, the ACS Team made available a Python module called polarization_tools in the acstools package to facilitate data analysis of ACS polarization data. This package contains both tables of calibration terms and class methods for polarization calculations.

Note that this example does not use imaging data (i.e., FITS files). Where necessary, we will indicate values that come from ACS FITS files.

This tutorial will show you how to…#

1. Retrieve Polarization Calibration Coefficients#

  • Get the latest calibration coefficients that are used in acstools

2. Calculate Polarization Properties#

  • Use the acstools.polarization_tools module to compute:

    • Stokes parameters

    • Fractional polarization

    • Electric field vector position angle

Imports#


Here we list the Python packages used in this notebook. Links to the documentation for each module is provided for convenience.

Package Name

module

docs

used for

acstools

polarization_tools

link

polarization information and methods

from acstools import polarization_tools

Retrieve Polarization Calibration Coefficients#


The polarization_tools module contains all of the necessary calibration terms from the tables in section 5.3 of the ACS Data Handbook (see tables 5.6 and 5.7). These coefficients are stored in YAML files in acstools and may be retrieved as astropy.Table tables:

polarizer_tables = polarization_tools.PolarizerTables.from_package_data()

# print the ACS/WFC polarizer efficiencies
polarizer_tables.wfc_efficiency
# print the average ACS/WFC cross-polarization leak corrections
polarizer_tables.wfc_transmission

In addition, the tables contain metadata that describe their derivation:

# print the ACS/WFC cross-polarization leak correction metadata
polarizer_tables.wfc_transmission.meta

Calculate Polarization Properties#


The acstools.polarization_tools.Polarizer class contains methods for calculating the polarization properties of a source given ACS photometry as input. The inputs may be either in electrons or electrons/second, as long as all three (for each POL0, POL60, and POL120) are consistently in the same units. In addition, the class can accept either a single float value for each photometric measurement or a numpy array. This has the advantage that the class can construct Stokes images from the ACS photometry.

For this example, we will use photometry measurements of the polarizated calibration star Vela 1-81 (an OB supergiant). The observations were taken using the ACS/WFC detector and by crossing the polarization filters with the F606W filter. The average PA_V3 value from the primary headers of the FITS files is 294.41272 degrees.

# Measured photometry from ACS/WFC data
pol0 = 60603.96
pol60 = 62382.70
pol120 = 67898.63

# PA_V3 angle
pa_v3 = 294.41272

pol_data = polarization_tools.Polarization(pol0, pol60, pol120, 'F606W', 'WFC', pa_v3)
pol_data.calc_stokes()
pol_data.calc_polarization()
print(f'Stokes I = {pol_data.stokes_i}, Stokes Q = {pol_data.stokes_q}, Stokes U = {pol_data.stokes_u}')
print(f'Fractional polarization = {pol_data.polarization:0.2%}, Position Angle = {pol_data.angle}')

Notice that we did not provide any of the calibration coefficients from the Data Handbook or from the Retrieve Polarization Calibration Coefficients section. This is because the Polarization class retrieves the values using the spectral filter and detector information. These calibration values may be overwritten manually by setting the appropriate attributes:

# print the efficiency coefficients cross-polarization leak term used
print(f'c0 = {pol_data.c0}, c60 = {pol_data.c60}, c120 = {pol_data.c120}, cross-leak = {pol_data.transmission_correction}')

For more help:#

More details may be found on the ACS website and in the ACS Instrument and Data Handbooks.

Please visit the HST Help Desk. Through the help desk portal, you can explore the HST Knowledge Base and request additional help from experts.


Top of Page Space Telescope Logo