Compute the second-order structure function
Project description
StructureFunction
Efficient computation of structure functions for astronomical data with errors.
Structure functions
I follow the definitions laid out by Haverkorn et al. 2004. Whilst structure functions can be computed for any value on a sparse grid, here I focus on rotation meaures (RM) from astronomical sources. As such, data points are distributed on a spherical surface.
The second-order structure function of RM is given by:
$$ SF_{\text{RM},\text{obs}}(\delta\theta) = \langle[\text{RM}{\theta} - \text{RM}(\theta+\delta\theta)]\rangle$$
That is, the ensemble average of the squared-difference in RM for sources with angular seperation $\delta\theta$. We also need to correct for the impact of errors by:
$$ SF_{\text{RM}}(\delta\theta) = SF_{\text{RM},\text{obs}}(\delta\theta) - SF_{\sigma_\text{RM}}(\delta\theta) $$
Computing the error on the structure is diffifcult. Here I use Monte-Carlo error propagation to compute the errors numerically.
Installation
To get the latest version from this repo
pip install githttps://github.com/AlecThomson/structurefunction
Or, install from PyPi
pip install structurefunction
Usage
See the notebook included in the examples. There I repoduce the results of Mao et al. 2010.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for structurefunction-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f7be23a22b07f11238d9f87171db32c896e8e552538019d026af442d2eff6c6 |
|
MD5 | 6e6301ad73cb9fa2922316134307c60b |
|
BLAKE2b-256 | 8d14def8d09eb5c24f2b87c69df5e9b79d5f72161d2a6cb777eb9db59de6f682 |