mc3 3.3.0__tar.gz → 3.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mc3-3.3.0/mc3.egg-info → mc3-3.3.1}/PKG-INFO +2 -2
- {mc3-3.3.0 → mc3-3.3.1}/mc3/plots/posterior.py +34 -13
- {mc3-3.3.0 → mc3-3.3.1}/mc3/version.py +1 -1
- {mc3-3.3.0 → mc3-3.3.1/mc3.egg-info}/PKG-INFO +2 -2
- {mc3-3.3.0 → mc3-3.3.1}/mc3.egg-info/requires.txt +1 -1
- {mc3-3.3.0 → mc3-3.3.1}/pyproject.toml +1 -1
- {mc3-3.3.0 → mc3-3.3.1}/requirements.txt +1 -1
- {mc3-3.3.0 → mc3-3.3.1}/.github/workflows/python-package.yml +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/.readthedocs.yml +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/CONTRIBUTING.md +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/LICENSE +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/MANIFEST.in +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/README.md +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/Makefile +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/api.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/conf.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/contributing.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/docs_requirements.txt +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/fit_tutorial.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/get_started.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/index.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/license.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/make.bat +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/mcmc_tutorial.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/references.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/docs/time_averaging.rst +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/examples/get_started.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/examples/timeavg.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/examples/tutorial.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/__init__.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/__main__.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/chain.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/fit_driver.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/mcmc_driver.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/plots/__init__.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/plots/colors.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/plots/plot_functions.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/sampler_driver.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/stats/__init__.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/stats/dwt.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/stats/gelman.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/stats/prayer.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/stats/stats.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/stats/time_averaging.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/utils/__init__.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/utils/log.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3/utils/utils.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3.egg-info/SOURCES.txt +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3.egg-info/dependency_links.txt +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3.egg-info/entry_points.txt +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/mc3.egg-info/top_level.txt +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/pytest.ini +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/setup.cfg +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/tests/test_fit.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/tests/test_logging.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/tests/test_mcmc.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/tests/test_plots.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/tests/test_stats.py +0 -0
- {mc3-3.3.0 → mc3-3.3.1}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mc3
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: Multi-core Markov-chain Monte Carlo package
|
|
5
5
|
Author-email: Patricio Cubillos <patricio.cubillos@oeaw.ac.at>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -10,7 +10,7 @@ Description-Content-Type: text/markdown
|
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: numpy>=2.0.0
|
|
12
12
|
Requires-Dist: scipy>=1.5.4
|
|
13
|
-
Requires-Dist: matplotlib>=3.
|
|
13
|
+
Requires-Dist: matplotlib>=3.8.0
|
|
14
14
|
Provides-Extra: test
|
|
15
15
|
Requires-Dist: pytest>=6.0; extra == "test"
|
|
16
16
|
Dynamic: license-file
|
|
@@ -114,9 +114,9 @@ def hist_2D(posterior, ranges, nbins):
|
|
|
114
114
|
def _histogram(
|
|
115
115
|
posterior, estimates, ranges, axes,
|
|
116
116
|
nbins, pdf, xpdf, hpd_min, low_bounds, high_bounds,
|
|
117
|
-
linewidth, theme, orientation,
|
|
118
|
-
|
|
119
|
-
clear=True,
|
|
117
|
+
linewidth, theme, orientation,
|
|
118
|
+
normalization='density',
|
|
119
|
+
alpha=0.6, top_pad=1.05, clear=True,
|
|
120
120
|
):
|
|
121
121
|
"""
|
|
122
122
|
Lowest-lever routine to plot marginal posterior distributions.
|
|
@@ -128,13 +128,10 @@ def _histogram(
|
|
|
128
128
|
)
|
|
129
129
|
|
|
130
130
|
hist_kw = {
|
|
131
|
-
'bins': nbins,
|
|
132
131
|
'linewidth': linewidth,
|
|
133
132
|
'orientation': orientation,
|
|
134
133
|
'facecolor': to_rgba(theme.light_color, alpha=alpha),
|
|
135
134
|
'edgecolor': theme.color,
|
|
136
|
-
'histtype': 'stepfilled',
|
|
137
|
-
'density': True,
|
|
138
135
|
}
|
|
139
136
|
if has_credible_interval:
|
|
140
137
|
hist_kw['facecolor'] = 'none'
|
|
@@ -154,7 +151,13 @@ def _histogram(
|
|
|
154
151
|
fill_between = ax.fill_betweenx
|
|
155
152
|
axline = ax.axhline
|
|
156
153
|
|
|
157
|
-
vals, bins
|
|
154
|
+
vals, bins = np.histogram(
|
|
155
|
+
posterior[:,i], bins=nbins, density=True, range=ranges[i],
|
|
156
|
+
)
|
|
157
|
+
if normalization == 'top':
|
|
158
|
+
vals /= np.amax(vals)
|
|
159
|
+
ax.stairs(vals, bins, fill=True, **hist_kw)
|
|
160
|
+
|
|
158
161
|
# Plot the credible intervals as shaded areas:
|
|
159
162
|
if has_credible_interval:
|
|
160
163
|
vals = np.r_[0, vals, 0]
|
|
@@ -535,6 +538,7 @@ class Marginal():
|
|
|
535
538
|
bins=25, fontsize=11, linewidth=1.5,
|
|
536
539
|
axes=None,
|
|
537
540
|
show_texts=True, show_estimates=True,
|
|
541
|
+
normalization=None,
|
|
538
542
|
alpha=0.6,
|
|
539
543
|
):
|
|
540
544
|
self.source = source
|
|
@@ -546,6 +550,9 @@ class Marginal():
|
|
|
546
550
|
self.pnames = pnames
|
|
547
551
|
self.bestp = bestp
|
|
548
552
|
self.ranges = ranges
|
|
553
|
+
if normalization is None:
|
|
554
|
+
normalization = 'density'
|
|
555
|
+
self.normalization = normalization
|
|
549
556
|
self.theme = theme
|
|
550
557
|
self.alpha = alpha
|
|
551
558
|
|
|
@@ -633,7 +640,7 @@ class Marginal():
|
|
|
633
640
|
self.source.pdf, self.source.xpdf,
|
|
634
641
|
hpd_min, self.source.low_bounds, self.source.high_bounds,
|
|
635
642
|
self.linewidth, self.theme,
|
|
636
|
-
self.orientation,
|
|
643
|
+
self.orientation, self.normalization,
|
|
637
644
|
alpha=self.alpha,
|
|
638
645
|
top_pad=1.25,
|
|
639
646
|
)
|
|
@@ -655,7 +662,7 @@ class Marginal():
|
|
|
655
662
|
|
|
656
663
|
Parameters
|
|
657
664
|
----------
|
|
658
|
-
posts: 1D iterable of Posterior objects
|
|
665
|
+
posts: Posterior or 1D iterable of Posterior objects
|
|
659
666
|
Currently there are no checks that these new posteriors
|
|
660
667
|
have the same parameters (nor same statistics) as self.
|
|
661
668
|
The user needs to make sure they are all compartible.
|
|
@@ -664,6 +671,8 @@ class Marginal():
|
|
|
664
671
|
length of labels has to be one more than posts, because
|
|
665
672
|
it also contains the label for self.
|
|
666
673
|
"""
|
|
674
|
+
if isinstance(posts, Posterior):
|
|
675
|
+
posts = [posts]
|
|
667
676
|
all_posts = [self.source] + list(posts)
|
|
668
677
|
for i,post in enumerate(posts):
|
|
669
678
|
estimates = post.estimates
|
|
@@ -679,7 +688,7 @@ class Marginal():
|
|
|
679
688
|
post.pdf, post.xpdf,
|
|
680
689
|
hpd_min, post.low_bounds, post.high_bounds,
|
|
681
690
|
self.linewidth, post.theme,
|
|
682
|
-
post.orientation, alpha=alpha,
|
|
691
|
+
post.orientation, self.normalization, alpha=alpha,
|
|
683
692
|
clear=False,
|
|
684
693
|
)
|
|
685
694
|
if not self.show_texts:
|
|
@@ -713,6 +722,7 @@ class Figure(Marginal):
|
|
|
713
722
|
bins=25, nlevels=6, fontsize=None, linewidth=None,
|
|
714
723
|
show_texts=True, show_estimates=True,
|
|
715
724
|
show_colorbar=True,
|
|
725
|
+
normalization=None,
|
|
716
726
|
figure=None,
|
|
717
727
|
fignum=None,
|
|
718
728
|
):
|
|
@@ -763,6 +773,9 @@ class Figure(Marginal):
|
|
|
763
773
|
self.fontsize = fontsize
|
|
764
774
|
self.linewidth = linewidth
|
|
765
775
|
self.orientation = 'vertical'
|
|
776
|
+
if normalization is None:
|
|
777
|
+
normalization = 'density'
|
|
778
|
+
self.normalization = normalization
|
|
766
779
|
self.show_texts = show_texts
|
|
767
780
|
self.show_estimates = show_estimates
|
|
768
781
|
self.show_colorbar = show_colorbar
|
|
@@ -869,7 +882,7 @@ class Figure(Marginal):
|
|
|
869
882
|
hpd_min,
|
|
870
883
|
self.source.low_bounds, self.source.high_bounds,
|
|
871
884
|
self.linewidth, self.theme,
|
|
872
|
-
self.orientation,
|
|
885
|
+
self.orientation, self.normalization,
|
|
873
886
|
)
|
|
874
887
|
_plot_pairwise(self)
|
|
875
888
|
|
|
@@ -889,7 +902,7 @@ class Figure(Marginal):
|
|
|
889
902
|
|
|
890
903
|
Parameters
|
|
891
904
|
----------
|
|
892
|
-
posts: 1D iterable of Posterior objects
|
|
905
|
+
posts: Posterior or 1D iterable of Posterior objects
|
|
893
906
|
Currently there are no checks that these new posteriors
|
|
894
907
|
have the same parameters (nor same statistics) as self.
|
|
895
908
|
The user needs to make sure they are all compartible.
|
|
@@ -898,6 +911,8 @@ class Figure(Marginal):
|
|
|
898
911
|
length of labels has to be one more than posts, because
|
|
899
912
|
it also contains the label for self.
|
|
900
913
|
"""
|
|
914
|
+
if isinstance(posts, Posterior):
|
|
915
|
+
posts = [posts]
|
|
901
916
|
all_posts = [self.source] + list(posts)
|
|
902
917
|
for post in posts:
|
|
903
918
|
post.hist_xran, post.hist, post.lmax = hist_2D(
|
|
@@ -954,7 +969,9 @@ class Figure(Marginal):
|
|
|
954
969
|
post.posterior, estimates, self.ranges, self.hist_axes,
|
|
955
970
|
self.bins, post.pdf, post.xpdf,
|
|
956
971
|
hpd_min, post.low_bounds, post.high_bounds,
|
|
957
|
-
self.linewidth, post.theme, post.orientation,
|
|
972
|
+
self.linewidth, post.theme, post.orientation,
|
|
973
|
+
normalization=self.normalization,
|
|
974
|
+
alpha=alpha,
|
|
958
975
|
clear=False,
|
|
959
976
|
)
|
|
960
977
|
if not self.show_texts:
|
|
@@ -1109,6 +1126,7 @@ class Posterior():
|
|
|
1109
1126
|
theme='blue', orientation='vertical',
|
|
1110
1127
|
show_texts=True, show_estimates=True,
|
|
1111
1128
|
show_colorbar=True,
|
|
1129
|
+
normalization='density',
|
|
1112
1130
|
seed=314159,
|
|
1113
1131
|
mask=None,
|
|
1114
1132
|
):
|
|
@@ -1131,6 +1149,7 @@ class Posterior():
|
|
|
1131
1149
|
self.ranges = ranges
|
|
1132
1150
|
self.theme = theme
|
|
1133
1151
|
self.orientation = orientation
|
|
1152
|
+
self.normalization = normalization
|
|
1134
1153
|
self.show_texts = show_texts
|
|
1135
1154
|
self.show_estimates = show_estimates
|
|
1136
1155
|
self.show_colorbar = show_colorbar
|
|
@@ -1197,6 +1216,7 @@ class Posterior():
|
|
|
1197
1216
|
fontsize=fontsize,
|
|
1198
1217
|
figsize=figsize,
|
|
1199
1218
|
fignum=fignum,
|
|
1219
|
+
normalization=self.normalization,
|
|
1200
1220
|
show_texts=show_texts,
|
|
1201
1221
|
show_estimates=show_estimates,
|
|
1202
1222
|
show_colorbar=show_colorbar,
|
|
@@ -1235,6 +1255,7 @@ class Posterior():
|
|
|
1235
1255
|
quantile=quantile,
|
|
1236
1256
|
fontsize=fontsize,
|
|
1237
1257
|
linewidth=linewidth,
|
|
1258
|
+
normalization=self.normalization,
|
|
1238
1259
|
show_texts=show_texts,
|
|
1239
1260
|
show_estimates=show_estimates,
|
|
1240
1261
|
alpha=alpha,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mc3
|
|
3
|
-
Version: 3.3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: Multi-core Markov-chain Monte Carlo package
|
|
5
5
|
Author-email: Patricio Cubillos <patricio.cubillos@oeaw.ac.at>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -10,7 +10,7 @@ Description-Content-Type: text/markdown
|
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: numpy>=2.0.0
|
|
12
12
|
Requires-Dist: scipy>=1.5.4
|
|
13
|
-
Requires-Dist: matplotlib>=3.
|
|
13
|
+
Requires-Dist: matplotlib>=3.8.0
|
|
14
14
|
Provides-Extra: test
|
|
15
15
|
Requires-Dist: pytest>=6.0; extra == "test"
|
|
16
16
|
Dynamic: license-file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mc3-3.3.0 → mc3-3.3.1}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|