-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFail.py
30 lines (24 loc) · 809 Bytes
/
Fail.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#===============================================================================
# DESCRIPTION
# Code to represent the fraction of available data
# To be used in article
# EXAMPLE
#
#===============================================================================
# Import library
from __future__ import division
import glob
from LCBnet_lib import *
if __name__=='__main__':
dirInPath='/home/thomas/PhD/obs-lcb/LCBData/obs/Merge/'
AttSta = att_sta()
AttSta.setInPaths(dirInPath)
Files =AttSta.getatt(AttSta.stations(['Head']),'InPath')
net=LCB_net()
net.AddFilesSta(Files)
df= net.validfraction()
From='2014-10-01 00:00:00'
To='2015-11-01 00:00:00'
df =df[From:To]
df['fraction'].resample('M').plot(kind='bar')
plt.show()