This module is in charge of reading the POPS housekeeping file and converting it to a TimeSeries instance.
In [1]:
from atmPy.aerosols.instruments.POPS import housekeeping
%matplotlib inline
In [4]:
filename = './data/POPS_housekeeping.csv'
hk = housekeeping.read_csv(filename)
In [5]:
hk.data.columns
Out[5]:
In [6]:
hk.data.stdDevBL.plot()
Done! hk is an instance of TimeSeries and you can do with it what ever the instance is capable of (see here). E.g. plot stuff.
In [3]:
out = hk.plot_all()
In [2]:
from atmPy.aerosols.instruments import POPS
In [33]:
reload(POPS)
reload(POPS.housekeeping)
Out[33]:
In [34]:
fname = '/Users/htelg/data/2017_ICARUS/POPS_SN14_ambient_more_raw/F20170523/HK_20170523x001.csv'
hk = POPS.read_housekeeping(fname)
In [36]:
for col in hk.data.columns:
print(col)
In [39]:
sel = hk._del_all_columns_but(['Temp','TofP','LDTemp'])
In [40]:
sel.data.plot()
Out[40]:
In [41]:
hk.get_timespan()
Out[41]:
In [ ]:
In [12]:
col_names = pd.read_csv(fname, sep=',', nrows=1, header=None,
# index_col=1,
# usecols=np.arange()
).values[0][:-1].astype(str)
col_names = np.char.strip(col_names)
col_names
Out[12]:
In [18]:
col_names = pd.read_csv(fname, sep=',', nrows=1, header=None,
# index_col=1,
# usecols=np.arange()
).values[0][:-1].astype(str)
col_names = np.char.strip(col_names)
data = pd.read_csv(fname, sep=',', skiprows=1, header=None,
# index_col=1,
# usecols=np.arange()
)
data_hk = data.iloc[:, :27]
data_hk.columns = col_names
data_hk.index = pd.to_datetime(data_hk['DateTime'], unit='s')
data_hk.drop('DateTime', axis=1, inplace=True)
# hk = atmPy.general.timeseries.TimeSeries(data_hk, sampling_period = 1)
hk = _housekeeping.POPSHouseKeeping(data_hk, sampling_period=1)
hk.data['Barometric_pressure'] = hk.data['P']
In [13]:
col_names = pd.read_csv(fname, sep=',', nrows=1, header=None).values[0][:-1].astype(str)
col_names = np.char.strip(col_names)
pd.read_csv(fname, usecols=range(5), skiprows=1, )
Out[13]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]: