Function argument name fix

Former-commit-id: fc94fe122c9c8e9eb3f0a0b125db79a0a238fee7
This commit is contained in:
Marek Nečada 2018-09-22 23:05:37 +03:00
parent ea2ec950c9
commit 95eaea1b4b
1 changed files with 5 additions and 4 deletions

View File

@ -8,6 +8,7 @@ from scipy.special import lpmn, lpmv, sph_jn, sph_yn, poch, gammaln
from scipy.misc import factorial from scipy.misc import factorial
import math import math
import cmath import cmath
import os
""" """
''' '''
@ -847,7 +848,7 @@ def processWfiles_sameKs(freqfilenames, destfilename, lMax = None, f='npz'):
k0s[succread] = data[0,2] # TODO check this as well? k0s[succread] = data[0,2] # TODO check this as well?
EeVs[succread] = data[0,1] EeVs[succread] = data[0,1]
succread += 1 succread += 1
allWs.close() del allWs
freqs = freqs_weirdunits * c / um freqs = freqs_weirdunits * c / um
if f == 'npz': if f == 'npz':
@ -882,19 +883,19 @@ def processWfiles_sameKs(freqfilenames, destfilename, lMax = None, f='npz'):
def loadWfile_processed(fileName, lMax = None, fatForm = True, midk_halfwidth = None): def loadWfile_processed(fileName, lMax = None, fatForm = True, midk_halfwidth = None):
if os.path.isdir(fileName): # .npy files in a directory if os.path.isdir(fileName): # .npy files in a directory
p = filename p = fileName
j = os.path.join j = os.path.join
nk = np.load(j(p,'nk.npy'))[()] nk = np.load(j(p,'nk.npy'))[()]
nfreqs = np.load(j(p,'nfreqs.npy'))[()] nfreqs = np.load(j(p,'nfreqs.npy'))[()]
nparticles = np.load(j(p,'npart.npy'))[()] nparticles = np.load(j(p,'npart.npy'))[()]
Ws = np.load(j(p,'Wdata.npy'), mode='r') Ws = np.load(j(p,'Wdata.npy'), mmap_mode='r')
ks = np.load(j(p,'ks.npy')) ks = np.load(j(p,'ks.npy'))
freqs = np.load(j(p,'freqs.npy')) freqs = np.load(j(p,'freqs.npy'))
k0s = np.load(j(p,'k0s.npy')) k0s = np.load(j(p,'k0s.npy'))
EeVs_orig = np.load(j(p,'EeVs_orig.npy')) EeVs_orig = np.load(j(p,'EeVs_orig.npy'))
freqs_weirdunits = np.load(j(p,'freqs_weirdunits.npy')) freqs_weirdunits = np.load(j(p,'freqs_weirdunits.npy'))
else: # npz file else: # npz file
data = np.load(fileName, mode='r') data = np.load(fileName, mmap_mode='r')
nk = data['nk'][()] nk = data['nk'][()]
nfreqs = data['nfreqs'][()] nfreqs = data['nfreqs'][()]
nparticles = data['npart'][()] nparticles = data['npart'][()]