conflux.Basic

Classes

Spectrum

A general class of a spectrum to initialize, add, and modify the object.

Summed

A general class for summed objects, such as summed spectra

Functions

integrate_trapezoid(xs, ys)

integrate int y dx points (sorted ascending x) by trapezoidal rule

Module Contents

class conflux.Basic.Spectrum(xbins=np.arange(0, 20, 0.1))

A general class of a spectrum to initialize, add, and modify the object.

xbins

The particle energy (MeV), or x values of the spectrum

nbin

Size of the spectrum array

spectrum

Contents of the spectrum

uncertainty

Spectrum content uncertainties

cov_matrix

Spectrum content covariance

integral = 0

Integral of spectrum

Add(targetSpec, W=1, sigma_W=0)

An operator to add (or subtract) a spectrum

Parameters:

targetSpec (list): A list containing the spectrum we want to add to the current spectrum W (float): The weight of the added spectrum sigma_W (float): The uncertainty in the weight of the added spectrum

Returns:

None

Norm(W, sigma_W=0)

An operator to scale the spectrum by a weighting factor

Parameters:

W (float): The weight of the spectrum sigma_W (float): The uncertainty in the weight

Returns:

None

Integral()

The absolute integral of the spectrum

Parameters:

None

Returns:

integral (float): The integral of the spectrum

SaveToFile(filename)

To save the spectrum to a csv file

Parameters:

filename (String): The name of the file you want to save the spectrum to.

Returns:

None

conflux.Basic.integrate_trapezoid(xs, ys)

integrate int y dx points (sorted ascending x) by trapezoidal rule

class conflux.Basic.Summed(ID)

A general class for summed objects, such as summed spectra

Parameters

IDint

The isotopic ID of a particular spectrum in the summed spectrum

branchesdictionary

A dictionary that contains the branch IDs of all spectra in this summed object

spectradictionary

A dictionary containing all spectral information for each branch

uncertaintydictionary

A dictionary containing all uncertainty information for each branch

Methods

Clear():

Clears out all associated dictionaries inside the summed spectra

AddBranch(branch):

Adds a branch object to the summed spectra

SumSpectra():

Sums the spectra of all branches

ID
branches
spectra
uncertainty
Clear()

Clears out all associated dictionaries inside the summed spectra

Parameters:

None

Returns:

None

AddBranch(branch)

Adding a branch element to the summing object

Parameters:

branch (int): The ID of the branch you want to add to the summed spectrum

Returns:

None

SumSpectra()

Summing units together

Parameters:

None

Returns:

None