This module contains the programs associated with running pythonPWA in the JLab batch farm system
This is the submition program for the alpha calculation.
This is the submition program for Gamp.
This is the submition program for the normint calculation.
This is the main user interface for the whole PyPWA framework. All functions for fitting and simulation can be accessed from here.
This is the program that does the work of simulation for PyPWA simulaton.
Default FASTLikelihood constructor
Kwargs:
mass (float): Test mass at the center of the bin.
waves (array): Array of all waves in this pwa fit/simulation.
normint (array): PyPWA normalization integral object.
productionAmplitudes (list): List of all production amplitudes/ V values.
alphaList (list): List of all alpha values for that bin.
dataDir (string): File path to the mass bin directory that is being simulated.
rhoAA (numpy ndarray): The PyPWA rhoAA object.
iList (numpy array): List of all intensities.
iMax (float): The maximum intensity for the whole mass range.
list of weak references to the object (if defined)
Calculates the list of intensities.
Returns:
iList; Note, does NOT save it. Must be saved after returning.
This function does the bulk of the simulation work for PyPWA simulation.
Args:
inputGampFile (file): Open file with the flat .gamp events.
outputRawGampFile (file): Open file for the events that only pass the weight filter.
outputAccGampFile (file): Open file for the events that pass both the weight and p/f filter.
inputPfFile (file): Open file with the acceptance of the events (p/f).
outputPFGampFile (file): Open file for the events that only pass the p/f filter.
This is the mathmatical class of the likelihood calculation and the calculation of the intensity.
Default FASTLikelihood constructor
Kwargs:
waves (array): Array of all waves in this pwa fit/simulation.
productionAmplitudes (list): List of all production amplitudes/ V values.
alphaList (list): List of all alpha values for that bin.
acceptedPath (string): Full file path to the accepted MC alpha file.
generatedPath (string): Full file path to the generated MC alpha file.
rhoAA (numpy ndarray array): PyPWA rhoAA array.
accNormInt (numpy array): The normalization integral from the accepted MC.
list of weak references to the object (if defined)
Calculates the list of intensities for a mass bin.
Returns:
iList (numpy array)
Sets the self.etaX variable.
Calculates the value of the negative of the log likelihood function.
Returns:
Value of the negative of the log likelihood function. (float)
Sets the production Amplitudes from Minuit and calculates the value of the negative of the log likelihood function.
Returns:
Value of the negative of the log likelihood function. (float)
Returns the length of an alpha file.
Args:
path (string): Path to the alpha file to be measured.
Returns:
Length of file. (float)
This program is the first step for the PyPWA fitting process. It sets up all directories and files needed for fitting as well as all binning in mass as prescribed by the pwa_controls GUI.
Writes out a file containing a wrapper function for minuitLn.calcneglnL, simply give this function the number of terms (which should be equivalent to 2*number of waves) and it will write the needed wrapper function to the file specified by self.filename.
list of weak references to the object (if defined)
This program calculates the value of alpha for every event in a .gamp file and saves it to a .txt list, one event per line.
Default generatAlphas constructor
Kwargs:
mode (int): 8 = p pi+ pi- pi0, 22 = p p+ p-, 24 = p k+ k-, 42 = gamma p –> p Ks Ks (pi+ pi- pi+ pi-)
indir (string): Full file path to directory of file
gfile (string): File name without .gamp extension.
list of weak references to the object (if defined)
p p+ p-
p k+ k-
gamma p –> p Ks Ks (pi+ pi- pi+ pi-)
p pi+ pi- pi0
Saves the list to a file.
This program runs in the interactive farm to retrieve the maximum intensity value among the whole mass range.
This is the graphicPlot GUI optimized for fitting.
This is the graphicPlot GUI optimized for simulation.
This is the main program for running the calculation of the log likelihood fitter/minuit.
This is the PyPWA mass binning utility that simulation/fitting install uses to bin .gamp files in mass.
This is the program used by the PWA_GUI’s wave function to move .bamp files between the fit/simulation and the /overflow directory.
This program is the pwa_controls GUI, or the gui the user uses to specify environment variables for PyPWA.
This class calculates the 3D numpy array, rhoAA. Each value is the spin density matrix times a wave times the complex conjugate of another wave and possibly times Q.
Default rhoAA constructor.
Kwargs:
waves (array): Array of all waves in this pwa fit/simulation.
alphaList (list): List of all alpha values for this mass bin.
Q (list): List of all Q values for this mass bin.
beamPolarization (float): Value of beam polarization; 0.0 for no polarization.
list of weak references to the object (if defined)
Function that does the work of calculating rhoAA
Return: rhoAA (numpy ndarray): Note, this class does NOT save the array and must be saved after returning.
This is the program that does the work of calculating the normilization integral and returning it as a .npy file.
This program is the first step for the PyPWA simulation process. It sets up all directories and files needed for simulation as well as all binning in mass as prescribed by the pwa_controls GUI.
This is the main simulation program for PyPWA simulation. It creates the iList and the simulated gamp files. It can do this using the fitted V values or from the pre chosen waves and resonences.
This is the submition program for the likelihood program.
This is the submition program for the simulator.
This is the submition program for the nTrue calculation.
This function calculates the value of the total nTrue and the nTrue values for each wave for a single mass bin directory.