Skip to content
SeamusClarkePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magnetic angular dispersion Correction Factor (MCF) code

The MCF code is a python module designed to use well-parametrised polarisation angle maps to estimate a multi-scale correction factor to apply to angular dispersion measurements resulting from the unsharp-masking technique. This correction factor aims to correct for the scale-dependent reduction in measured angular dispersion resulting from beam convolution.

Dependencies

MCF requires 4 common libraries to be installed:

  • Numpy,
  • Astropy,
  • Matplotlib,
  • Scipy.

How to use the code

This repository contains an example script showing the typical use of the code:

  • The production of parametrised, synthetic polarisation angle maps using the function make_angle_map
  • The calculation of an angular residual map from inputted data using the unsharp-masking method for a given filter size using the function unsharp_masking
  • The calculation of a local angular dispersion map from inputted data using the unsharp-masking method for a given filter size using the function unsharp_masking_map
  • The calculation of angular dispersion across multiple filter sizes from inputted data so as to make a filter-size plot using the function filtersize_data
  • The calculation of filter-size plots for numerous random realisations of parametrised, synthetic polarisation maps with the aim to compare to the filter-size plot obtained from observational data using the function filtersize_param
  • The calculation of the magnetic angular dispersion correction factor at a given scale considering the output of the function filtersize_param by using the function Calc_correction_factor

The example code uses all of these function with comments documenting each input. Moreover, the example code provides example methods to make plots showing the results.

The first plot is that of a parametrised, polarisation angle map (left panel - segments visual the same information), the residual angle map after using the unsharp-masking technique with a filter size of 11x11 pixels (middle panel), the localisation angular dispersion from using the unsharp-masking technique with the same filter size (right panel).

Figure 1 alt text

The second plot shows the filter-size plot of the parametrised polarisation angle map, with the dashed, horizontal, black line showing the total angular dispersion map across the whole map.

Figure 2 alt text

The third plot is the result of the correction factor calculation. (Left panel) black showing the "observational" data's filter-size plot, the semi-transparent blue lines showing the filter-size plots of the 10 tested, parametrised polarisation angle maps, and the orange line and error bars show the mean and standard deviation respectively of the realisations of parametrised maps. (Right panel) The correction factor plotted as a function of filter size in units of beams, the semi-transparent blue lines show the results of individual realisations of tested, parametrised polarisation angle maps, and the orange line and error bars show the mean and standard deviation respectively across those realisations.

Figure 3 alt text

Contact

For up-to-date contact information see my personal website

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages