Skip to main content

Population Profile Estimator.

Project description

GitHub PyPI PyPI - Python Version ascl:2007.006

Introduction

The spatial distribution and internal structure of astronomical systems contain vast amount of information about the underlying physics that governs the formation, evolution, and fate of these systems. While astronomical data collected by large-, medium-, and small-size surveys are becoming more abundant, precise and accurate modeling is becoming more challenging. The scale and complexity of these multi-wavelength surveys are exceeding the capabilities of traditional data analysis models, hence the need for novel inference models.

One of the key challenges of modeling the empirical data is how to account for the measurement errors of varying magnitudes. The low signal-to-noise ratio (SNR) regime hinders the ability to infer the spatial structure of a population from abundant but noisy measurements, diluting the spatial signals. Typical measurements with SNR below the detection limit are often discarded or stacked to boost the signal above the detection limit. Binning and stacking can introduce selection bias, information loss, and smearing out the signal component. While stacking amplifies the SNR of the population average properties, it suppresses intrinsic scatter of the population under study. In practice, performing a statistical inference on large astronomical datasets has become a bottleneck of traditional population- and likelihood-based approaches.

To address some of the above challenges, we developed Population Profile Estimator (PoPE), a population-based, Bayesian inference model to analyze a class of problems that are concerned with the spatial distribution or internal spatial structure of a sample of astronomical systems. Our method uses the conditional statistics of spatial profile of multiple observables assuming the individual observations are measured with errors of varying magnitude. Assuming the conditional statistics of our observables can be described with a multivariate normal distribution, the model reduces to the conditional average profile and conditional covariance between all observables. The method consists of two steps: (1) reconstructing the average profile using non-parametric regression with Gaussian Processes and (2) estimating the the property profiles covariance given a set of independent variable. Our population-based method is computationally efficient and capable of inferring average profiles of a population from noisy measurements, without stacking and binning nor parameterizing the shape of the average profile. This code is an implementation of Population Profile Estimator (PoPE) method that performs a regression analysis described in Farahi, Nagai & Cheng (2020).

If you use PoPE or derivates based on it, please cite the following paper (Farahi et al. 2020) which introduced the tool.

Dependencies

numpy, scipy, matplotlib, pandas, sklearn, pymc3, KLLR.

References

[1]. A. Farahi, D. Nagai, Y. Cheng, "PoPE: A population-based approach to model spatial structure of astronomical systems", AJ 161 30 (2021). arXiv link. Journal link.

Installation

Run the following to install:

pip install pope

Quickstart

To start using PoPE, simply use from PoPE import estimate_mean_property_profile to access the primary functions and class. The exact requirements for the inputs are listed in the docstring of the estimate_mean_property_profile() class further below. An example for using PoPE looks like this:

    from PoPE import estimate_mean_property_profile                                       

    # load data and add measurement noise
    # Xs, Ys1, Ys2, Ys1err, Ys2err = load_data()

    # compute the average profile
    mp, gp, model = estimate_mean_property_profile(Xs, Ys1, Ys2, Ys1err, Ys2err,
                                                   Xu_shapes=[15, 7], kernel_scales=[2.0, 2.0])                                 

See examples "./examples/simulated_example.py" and "./examples/TNG_example.py" for more information. To replicate plots presented in the paper, you can run python3 TNG_profile_example.py and python3 fake_simulated_example.py

Contact

If you have any questions or want to modify the code for your own purpose, please do not hesitate to email arya.farahi@austin.utexas.edu for help.

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

PoPE-1.0.3.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

PoPE-1.0.3-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file PoPE-1.0.3.tar.gz.

File metadata

  • Download URL: PoPE-1.0.3.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for PoPE-1.0.3.tar.gz
Algorithm Hash digest
SHA256 58b1b470ecd4e938a695d051e0460521db617cdad63a98765ddbc2cc1d3b1c3b
MD5 465ed3541da1469ccf468c41f34ab8a8
BLAKE2b-256 4c7c0aab6d87aface6dc9c9f67e046e9db65896bfd02cc08a15cf4bf92ced1a4

See more details on using hashes here.

File details

Details for the file PoPE-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: PoPE-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for PoPE-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e9d47f5e071edaeb9774d6624aaca44969e106bd4f69df583f99ba89226791be
MD5 ea8fdd457db9943fb48a494e17ab9e61
BLAKE2b-256 cad0679e015bfd339a977f2875bce3881802d3f67eac58d7b2233d8b3b9310a6

See more details on using hashes here.

Supported by

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