--
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