Tags:
create new tag
, view all tags
-- CorentinSanchez - 2017-10-05

Question sur le compilateur : Python renvoie t-il la fonction parseF avec le test sur healpyID ou considere-t-il cela comme une constante ?

Réponse : Python ne fait pas l'intelligent et continue de tester ( A priori, vu nos tests via le déboggeur )

def fParseF(healpyID=False):
def parseF(csvLine):
fields = csvLine.split(",")
try:
ra=float(fields[1])
dec=float(fields[2])
if healpyID: #On veut calculer l'indice healpy
hpx=healpy.ang2pix(NSIDE,dec,ra,nest=True,lonlat=True) #Calcul de l'indice healpix
else: # on se fiche de l'indice healpy car on le recalculera pour la duplication
hpx=0
except:
hpx=ra=dec=0
return (hpx,(ra,dec))
return parseF
Topic revision: r1 - 2017-10-05 - CorentinSanchez
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback