Daniele, 2015-05-06 10:19 GMT-07:00 Daniele Zambelli <daniele.zambe...@gmail.com>:
> Il 6 maggio 2015 12:09, Margherita Di Leo <direg...@gmail.com> ha scritto: > > # questa e` la classe che voglio creare > > class TimeSeries(ndarray): > > '''This object registers for each point the following characteristics > > over time: > > * Column 0 : NIR > > * Column 1 : RED > > * Column 2 : GREEN > > * Column 3 : NDVI > > * Column 4 : SAVI ''' > > def __init__(self, nir, red, green, ndvi, savi): > > self.NIR = nir > > self.RED = red > > self.GREEN = green > > self.NDVI = ndvi > > self.SAVI = savi > > Probabilmente questa soluzione รจ semplicistica e magari neppure > funzionante, ma io metterei in testa al modulo la definizione di > alcune costanti: > > NIR = 0 > RED = 1 > GREEN = 2 > NDVI = 3 > SAVI = 4 > ... > Forse non ho capito cosa intendi.. ma tieni presente che al momento , vale a dire senza la classe TimeSeries(ndarray), NIR (ad esempio) lo chiamo cosi`: points[1].TS[:,0] , mentre quello che vorrei ottenere e` poterlo chiamare points[1].NIR . Allora se ho ben capito quello che suggerisci, se pongo NIR = 0, la mia chiamata diventa points[1].0, che non significa niente. Ma sicuramente credo di non aver capito cosa intendevi. -- Best regards, Dr. Margherita DI LEO Scientific / technical project officer European Commission - DG JRC Institute for Environment and Sustainability (IES) Via Fermi, 2749 I-21027 Ispra (VA) - Italy - TP 261 Tel. +39 0332 78 3600 margherita.di-...@jrc.ec.europa.eu Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python