Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
srio committed Oct 5, 2023
1 parent 86f6da6 commit 0ff82e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crystalpy/util/ComplexAmplitudePhotonBunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def __init__(self, complex_amplitude_photons=None):
energy = numpy.zeros(n)
Esigma = numpy.zeros(n)
Epi = numpy.zeros(n)
for el,i in enumerate(complex_amplitude_photons):
for i,el in enumerate(complex_amplitude_photons):
energy[i] = el.energy()
Esigma[i] = el.getComplexAmplitudeS()
Epi[i] = el.getComplexAmplitudeP()
Expand Down
4 changes: 2 additions & 2 deletions crystalpy/util/PhotonBunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def isMonochromatic(self, places):
True if all photons in the bunch have the same energy.
"""
return self.energy().allEqual(self.energy()[0])
return numpy.all(self.energy() == self.energy()[0])

def isUnidirectional(self):
"""Inquires if all photons in the bunch have the same direction.
Expand Down Expand Up @@ -607,7 +607,7 @@ def __init__(self, photons=None):
else:
n = len(photons)
energy = numpy.zeros(n)
for el,i in enumerate(photons):
for i,el in enumerate(photons):
energy[i] = el.energy()
el.unitDirectionVector()
if i == 0:
Expand Down
2 changes: 1 addition & 1 deletion crystalpy/util/PolarizedPhotonBunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def __init__(self, polarized_photons=None):
s1 = numpy.zeros(n)
s2 = numpy.zeros(n)
s3 = numpy.zeros(n)
for el,i in enumerate(polarized_photons):
for i,el in enumerate(polarized_photons):
energy[i] = el.energy()
vv = el.unitDirectionVector()
ss = el.stokesVector()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


setup(name='crystalpy',
version='0.0.16',
version='0.0.17',
description='Python crystal polarization calculation',
author='Manuel Sanchez del Rio, Edoardo Cappelli, Mark Glass',
author_email='[email protected]',
Expand Down

0 comments on commit 0ff82e1

Please sign in to comment.