Skip to main content

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

structurefunction-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

structurefunction-0.1.0-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file structurefunction-0.1.0.tar.gz.

File metadata

  • Download URL: structurefunction-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for structurefunction-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b49a4c9cfa28d0d566a9a88a4d155b4631df5f3065c047250cb853d6cff25d7
MD5 15044be4d8ced72968bcedbf9e92fabf
BLAKE2b-256 71b3d7d2708bd5c4de583dfa33b2282a091bb1443958d6cfbeb3679a8d3373cb

See more details on using hashes here.

File details

Details for the file structurefunction-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: structurefunction-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/3.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for structurefunction-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0f7be23a22b07f11238d9f87171db32c896e8e552538019d026af442d2eff6c6
MD5 6e6301ad73cb9fa2922316134307c60b
BLAKE2b-256 8d14def8d09eb5c24f2b87c69df5e9b79d5f72161d2a6cb777eb9db59de6f682

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page