How to use the ultranest.plot.PredictionBand function in ultranest

To help you get started, we’ve selected a few ultranest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JohannesBuchner / BXA / bxa / xspec / solver.py View on Github external
ndata_columns = 6 if Plot.background else 4
			ncomponents = content.shape[1] - ndata_columns
			if data[0] is None:
				data[0] = content[:,0:ndata_columns]
			model_contributions = []
			for component in range(ncomponents):
				y = content[:, ndata_columns + component]
				kwargs = dict(drawstyle='steps', alpha=0.1, color='k')
				kwargs.update(plot_args[component])
				
				label = component_names[component]
				# we only label the first time we enter here
				# otherwise we get lots of entries in the legend
				component_names[component] = ''
				if component >= len(bands):
					bands.append(PredictionBand(xmid,
						shadeargs=dict(color=kwargs['color']),
						lineargs=dict(color=kwargs['color'])))
				if label != 'ignore':
					#plt.plot(xmid, y, label=label, **kwargs)
					bands[component].add(y)
				
				model_contributions.append(y)
			models.append(model_contributions)
github JohannesBuchner / BXA / bxa / xspec / solver.py View on Github external
def plot_unconvolved_components(content):
			xmid = content[:,0]
			ncomponents = content.shape[1] - 2
			for component in range(ncomponents):
				y = content[:, 2 + component]
				kwargs = dict(drawstyle='steps', alpha=0.1, color='k')
				kwargs.update(plot_args[component])
				
				label = component_names[component]
				# we only label the first time we enter here
				# otherwise we get lots of entries in the legend
				component_names[component] = ''
				if component >= len(bands):
					bands.append(PredictionBand(xmid,
						shadeargs=dict(color=kwargs['color']),
						lineargs=dict(color=kwargs['color'])))
				if label != 'ignore':
					#plt.plot(xmid, y, label=label, **kwargs)
					bands[component].add(y)

ultranest

Fit and compare complex models reliably and rapidly. Advanced Nested Sampling.

GPL-3.0
Latest version published 9 days ago

Package Health Score

76 / 100
Full package analysis

Similar packages