You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dustmap file is opened and put into memory every time an extinction is computed, then torn down after, resulting in great inefficiency. This cane be made much more efficient.
The text was updated successfully, but these errors were encountered:
I did a quick test to compare time in initialisation vs computation:
Case 1:
for i in range(n):
ra = random.uniform(1,360)
decl = random.uniform(-89,89)
sfd = SFDQuery()
c = SkyCoord(ra, decl, unit="deg", frame='icrs')
ebv = float(sfd(c))
Case 2:
sfd = SFDQuery()
for i in range(n):
ra = random.uniform(1,360)
decl = random.uniform(-89,89)
c = SkyCoord(ra, decl, unit="deg", frame='icrs')
ebv = float(sfd(c))
Clearly there is a gain to be had here, but I don't think it's more than a factor of 2.
The dustmap file is opened and put into memory every time an extinction is computed, then torn down after, resulting in great inefficiency. This cane be made much more efficient.
The text was updated successfully, but these errors were encountered: