IRFM / IRFM/divHretention

User to define confidence interval rather than zscore

Open
#45 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Where currently a user would need to evaluate a relevant zscore according to a predetermined confidence interval like so:

```python
import matplotlib.pyplot as plt
import numpy as np
from divHretention import compute_inventory, plot_inv_with_uncertainty

x = np.linspace(0, 0.6, num=500) # arc length (m) along the divertor
T = 350 + 1000*np.exp(-50*x)
concentration = 7e21*(1 + np.exp(-50*x)) # surface concentration (H m-3)
zscore = 2

inv, stdev = compute_inventory(T, concentration, time=1e5)

plot_inv_with_uncertainty(x, inv, stdev, zscore, color="firebrick", linestyle="dashed")
plt.show()
```

However it would be better to have a user define a confidence interval, then evaluate the relevant zscore in the backend to be used in the 'plot_inv_with_uncertainty' function like so:

```python
import matplotlib.pyplot as plt
import numpy as np
from divHretention import compute_inventory, plot_inv_with_uncertainty

x = np.linspace(0, 0.6, num=500) # arc length (m) along the divertor
T = 350 + 1000*np.exp(-50*x)
concentration = 7e21*(1 + np.exp(-50*x)) # surface concentration (H m-3)
confidence_interval = 0.95

inv, stdev = compute_inventory(T, concentration, time=1e5)

plot_inv_with_uncertainty(x, inv, stdev, zscore, color="firebrick", linestyle="dashed")
plt.show()
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the plot_inv_with_uncertainty entry point and compare the current zscore usage with the proposed confidence_interval usage in the issue examples. Confirm the intended public API and verify that the example uses the confidence interval while the backend evaluates the corresponding z-score.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.