astropy / astropy/astropy

Adding truncated normal distribution to `astropy.uncertainty` interface

Open
#12,886 3 comments 0 reactions 0 assignees View on GitHub
Feature Request uncertainty
Dominant language
Python
Stars
5.3k
Forks
2.2k
Avg merge
1d 19h
Merged PRs (30d)
75

Description

### Description

Hello,

It would be nice to be able to use a truncated normal distribution in the uncertainty interface, for quantities that cannot go above or beyond a specific limit (for example an orbit eccentricity). I took a quick look at the interface and adding a distribution does not seem too hard, so I could try to send a PR for this if there is interest. However, NumPy does not have a truncated normal generator, so the two available options would be to use SciPy or implement it from scratch. The SciPy options seems to be the simplest, so I was wondering if it would be OK to require SciPy for this specific distribution ?

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing astropy.uncertainty interface and how its current distributions are exposed. Decide whether this distribution should use SciPy or a from-scratch implementation, then verify that a truncated normal distribution is available through the interface with the intended limits.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.