-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-22470: Remove all uses of past and future from fgcm #10
Changes from all commits
c2b154e
a3722af
9560cfb
7ab67ba
6f42358
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from __future__ import division, absolute_import, print_function | ||
|
||
__version__ = '2.4.0' | ||
__version__ = '2.4.1' | ||
|
||
__version_info__ = __version__.split('.') |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from __future__ import division, absolute_import, print_function | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove all the |
||
from past.builtins import xrange | ||
|
||
from builtins import range | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove |
||
|
||
import numpy as np | ||
import scipy.interpolate as interpolate | ||
|
@@ -356,10 +356,10 @@ def generateTable(self): | |
self.fgcmLog.info("Generating %d*%d=%d PWV atmospheres..." % (pwvPlus.size,zenithPlus.size,pwvPlus.size*zenithPlus.size)) | ||
self.pwvAtmTable = np.zeros((pwvPlus.size,zenithPlus.size,self.atmLambda.size)) | ||
|
||
for i in xrange(pwvPlus.size): | ||
for i in range(pwvPlus.size): | ||
sys.stdout.write('%d' % (i)) | ||
sys.stdout.flush() | ||
for j in xrange(zenithPlus.size): | ||
for j in range(zenithPlus.size): | ||
sys.stdout.write('.') | ||
sys.stdout.flush() | ||
atm=self.modGen(pwv=pwvPlus[i],zenith=zenithPlus[j], | ||
|
@@ -370,10 +370,10 @@ def generateTable(self): | |
self.fgcmLog.info("\nGenerating %d*%d=%d O3 atmospheres..." % (o3Plus.size,zenithPlus.size,o3Plus.size*zenithPlus.size)) | ||
self.o3AtmTable = np.zeros((o3Plus.size, zenithPlus.size, self.atmLambda.size)) | ||
|
||
for i in xrange(o3Plus.size): | ||
for i in range(o3Plus.size): | ||
sys.stdout.write('%d' % (i)) | ||
sys.stdout.flush() | ||
for j in xrange(zenithPlus.size): | ||
for j in range(zenithPlus.size): | ||
sys.stdout.write('.') | ||
sys.stdout.flush() | ||
atm=self.modGen(o3=o3Plus[i],zenith=zenithPlus[j], | ||
|
@@ -386,7 +386,7 @@ def generateTable(self): | |
self.o2AtmTable = np.zeros((zenithPlus.size, self.atmLambda.size)) | ||
self.rayleighAtmTable = np.zeros((zenithPlus.size, self.atmLambda.size)) | ||
|
||
for j in xrange(zenithPlus.size): | ||
for j in range(zenithPlus.size): | ||
sys.stdout.write('.') | ||
sys.stdout.flush() | ||
atm=self.modGen(zenith=zenithPlus[j], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from __future__ import division, absolute_import, print_function | ||
from past.builtins import xrange | ||
|
||
from builtins import range | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. |
||
|
||
import numpy as np | ||
import os | ||
|
@@ -140,7 +141,7 @@ def brightestObsMeanMag(self,debug=False,computeSEDSlopes=False): | |
# see also fgcmChisq.py | ||
# splitValues is the first of the goodStars in each list | ||
splitValues = np.zeros(nSections-1,dtype='i4') | ||
for i in xrange(1,nSections): | ||
for i in range(1,nSections): | ||
splitValues[i-1] = goodStarsList[i][0] | ||
|
||
# get the indices from the goodStarsSub matched list | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from __future__ import division, absolute_import, print_function | ||
from past.builtins import xrange | ||
from builtins import range | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove. I won't comment further on unnecessary use of |
||
|
||
import numpy as np | ||
import os | ||
|
@@ -344,7 +344,7 @@ def __call__(self,fitParams,fitterUnits=False,computeDerivatives=False,computeSE | |
proc = None | ||
|
||
self.totalHandleDict = {} | ||
for thisCore in xrange(self.nCore): | ||
for thisCore in range(self.nCore): | ||
self.totalHandleDict[workerIndex + thisCore] = ( | ||
snmm.createArray(self.nSums,dtype='f8')) | ||
|
||
|
@@ -359,7 +359,7 @@ def __call__(self,fitParams,fitterUnits=False,computeDerivatives=False,computeSE | |
# see also fgcmBrightObs.py | ||
# splitValues is the first of the goodStars in each list | ||
splitValues = np.zeros(nSections-1,dtype='i4') | ||
for i in xrange(1,nSections): | ||
for i in range(1,nSections): | ||
splitValues[i-1] = goodStarsList[i][0] | ||
|
||
# get the indices from the goodStarsSub matched list (matched to goodStars) | ||
|
@@ -398,7 +398,7 @@ def __call__(self,fitParams,fitterUnits=False,computeDerivatives=False,computeSE | |
|
||
# sum up the partial sums from the different jobs | ||
partialSums = np.zeros(self.nSums,dtype='f8') | ||
for thisCore in xrange(self.nCore): | ||
for thisCore in range(self.nCore): | ||
partialSums[:] += snmm.getArray( | ||
self.totalHandleDict[workerIndex + thisCore])[:] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this since it's not needed in python3.