From 7c7def13662ec846f4454fee6e72098f19951975 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Tue, 12 Nov 2019 16:38:10 +0100 Subject: [PATCH] Clanup and spell checking --- buildFucntions.py => buildFunctions.py | 0 nightlyBuildSixTrack.py | 2 +- randtest.py | 39 -------------------------- 3 files changed, 1 insertion(+), 40 deletions(-) rename buildFucntions.py => buildFunctions.py (100%) delete mode 100755 randtest.py diff --git a/buildFucntions.py b/buildFunctions.py similarity index 100% rename from buildFucntions.py rename to buildFunctions.py diff --git a/nightlyBuildSixTrack.py b/nightlyBuildSixTrack.py index 0a2b308..e3df6d6 100755 --- a/nightlyBuildSixTrack.py +++ b/nightlyBuildSixTrack.py @@ -19,7 +19,7 @@ import logging from os import path, chdir, mkdir, listdir, system from datetime import datetime -from buildFucntions import * +from buildFunctions import * logger = logging.getLogger("SixTrackTestBuild") diff --git a/randtest.py b/randtest.py deleted file mode 100755 index 9b9d000..0000000 --- a/randtest.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python3 - -import numpy as np -import matplotlib.pyplot as plt - -nPart = 1000000 - -nRnd = np.random.uniform(0.0, 1.0, nPart) -pDist = np.zeros(nPart) - -cMax = 2.0 -cMin = 0.0 - -# CCC = ONEONE -EXP( -(CMAX+CMIN)*(CMAX-CMIN)/TWOTWO ) -# BOXMUL = SQRT( CMIN**2 -TWOTWO*LOG( ONEONE-CCC*RAND() ) ) - -cFac = 1.0 - np.exp(-(cMax+cMin)*(cMax-cMin)/2.0) -# for i in range(nPart): -# pDist[i] = np.sqrt(cMin**2 - 2.0*np.log(1.0-cFac*nRnd[i])) - -# CCC = ONEONE -EXP( -CMAX**2/TWOTWO ) -# BOXMUL = SQRT( -TWOTWO*LOG( ONEONE-CCC*RAND() ) ) -cFac = 1.0 - np.exp(-cMax**2/2.0) -for i in range(int(nPart/2)): - rad = np.sqrt(-2.0*np.log(1.0-cFac*nRnd[2*i])) - # rad = np.sqrt(cMin**2 - 2.0*np.log(1.0-cFac*nRnd[2*i])) - # rad = np.sqrt(1.0-2.0*np.log(nRnd[2*i])) - pDist[2*i] = rad*np.cos(2.0*np.pi*nRnd[2*i+1]) - pDist[2*i+1] = rad*np.sin(2.0*np.pi*nRnd[2*i+1]) - -# Plot -figOne = plt.figure(1,figsize=(10, 8),dpi=100) -figOne.clf() - -pHist, pG = np.histogram(pDist, bins=200, density=True) -pC = (pG[:-1] + pG[1:])/2 -plt.step(pC,pHist,where="mid") - -plt.show(block=True)