How to find the annual cycle for a time series?

0

I am doing a statistical analysis on solar radiation, this means that I have to find the diurnal and annual cycles. For the diurnal cycles, a "for" is used and it worked, but for the annual cycle the "for" is not used, then I leave the codes used.

#Ciclos diurnos 

Serie = Radiacion_Proyecto
print Serie
2016-03-09 00:20:00   -2
2016-03-09 00:21:00   -2
2016-03-09 00:22:00   -2
2016-03-09 00:23:00   -2
2016-03-09 00:24:00   -2
2016-03-09 00:25:00   -2
2016-03-09 00:26:00   -1
2016-03-09 00:27:00   -1
2016-03-09 00:28:00   -1
2016-03-09 00:29:00   -1
2016-03-09 00:30:00   -1
...                  ...
2016-11-09 16:24:00  103
2016-11-09 16:25:00  105
2016-11-09 16:26:00  108
2016-11-09 16:27:00  110
2016-11-09 16:28:00  114
2016-11-09 16:29:00  117
2016-11-09 16:30:00  120
2016-11-09 16:31:00  121
2016-11-09 16:32:00  121
2016-11-09 16:33:00  120
2016-11-09 16:34:00  120
2016-11-09 16:35:00  118
2016-11-09 16:36:00  116
2016-11-09 16:37:00  114
2016-11-09 16:38:00  113

Median  = []
Mean    = []
perc25  = []
perc_75 = []
perc_10 = []
perc_90 = []

for i in range(24):

    a = Serie.between_time(np.str(i)+':00', np.str(i)+':59')
    a = a.values[np.isfinite(a.values)]
    Median.append(np.median(a))
    Mean.append(np.mean(a))
    perc25.append(np.percentile(a,25))
    perc_75.append(np.percentile(a,75))
    perc_10.append(np.percentile(a,10))
    perc_90.append(np.percentile(a,90)) 

**#Ciclo anual
# Si fuera Ciclo Anual
for i in range(12): 
    FP = Serie(['2016 -' + np.str(i)])
    # La i son los 12 meses (Contador)
    #print i** No se como hacerlo!
    
asked by Claudia P. 11.12.2016 в 20:05
source

0 answers