802 KiB
802 KiB
In [1]:
import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates
Unprocessed parquet files¶
In [2]:
selection = [("date", ">=", "2019-05-09")] hk_files = pd.read_parquet('data/hk_files_parquet', filters=selection).sort_index() pbp_files = pd.read_parquet('data/pbp_files_parquet', filters=selection).sort_index()
In [3]:
hk_files.head()
Out[3]:
<style scoped="">
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| Time Stamp | Time (sec) | Time Stamp (UTC sec) | Elapsed Time | Error Code | Packet Time Stamp | Laser TEC Temp (C) | Crystal TEC Temp (C) | Inlet Air Temp (C) | Computer Heatsink Temp (C) | ... | t0 | file | folder_name | delta_sec | file_datetime | date_floored | floor_time | Secs_2GB | date | hour | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| calculated_time | |||||||||||||||||||||
| 2019-05-09 00:00:00.992400 | 2019-05-09 00:00:01.090 | 2.419201e+06 | 3.640205e+09 | 2394625.789 | 0 | 2394657.25 | 29.230175 | 30352 | 34.956111 | 28.543153 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0002 | 20190508172218 | 23862.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 00:00:00 | 2419201 | 2019-05-09 | 0 |
| 2019-05-09 00:00:01.992400 | 2019-05-09 00:00:02.090 | 2.419202e+06 | 3.640205e+09 | 2394626.789 | 0 | 2394658.25 | 29.203979 | 30352 | 34.956111 | 28.543153 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0002 | 20190508172218 | 23863.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 00:00:01 | 2419202 | 2019-05-09 | 0 |
| 2019-05-09 00:00:02.992400 | 2019-05-09 00:00:03.020 | 2.419203e+06 | 3.640205e+09 | 2394627.716 | 0 | 2394659.25 | 29.230175 | 30352 | 34.956111 | 28.543153 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0002 | 20190508172218 | 23864.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 00:00:02 | 2419203 | 2019-05-09 | 0 |
| 2019-05-09 00:00:03.992400 | 2019-05-09 00:00:04.050 | 2.419204e+06 | 3.640205e+09 | 2394628.747 | 0 | 2394660.25 | 29.230175 | 30352 | 34.956111 | 28.543153 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0002 | 20190508172218 | 23865.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 00:00:03 | 2419204 | 2019-05-09 | 0 |
| 2019-05-09 00:00:04.992400 | 2019-05-09 00:00:05.070 | 2.419205e+06 | 3.640205e+09 | 2394629.760 | 0 | 2394661.25 | 29.230175 | 30352 | 34.956111 | 28.543153 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0002 | 20190508172218 | 23866.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 00:00:04 | 2419205 | 2019-05-09 | 0 |
5 rows × 151 columns
In [4]:
pbp_files.head()
Out[4]:
<style scoped="">
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| Time (sec) | Packet Time Stamp | Flag | Dropped Records | Record Count | Record Size | Particle Time Stamp | Particle Flags | Scatter relPeak | Scatter Transit Time | ... | t0 | file | folder_name | delta_sec | file_datetime | date_floored | floor_time | Secs_2GB | date | hour | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| calculated_time | |||||||||||||||||||||
| 2019-05-09 00:00:00.992400 | 2.419202e+06 | 2419233.25 | 0 | 0 | 76 | 32 | 2419232.25 | 1 | 2015056.0 | 904.0 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0004 | 20190508172218 | 23862.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 | 2419201 | 2019-05-09 | 0 |
| 2019-05-09 00:00:00.992400 | 2.419202e+06 | 2419233.25 | 0 | 0 | 76 | 32 | 2419233.00 | 1 | 2107910.0 | 920.0 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0004 | 20190508172218 | 23862.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 | 2419201 | 2019-05-09 | 0 |
| 2019-05-09 00:00:00.992400 | 2.419202e+06 | 2419233.25 | 0 | 0 | 76 | 32 | 2419233.00 | 1 | 10092470.0 | 1282.0 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0004 | 20190508172218 | 23862.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 | 2419201 | 2019-05-09 | 0 |
| 2019-05-09 00:00:00.992400 | 2.419202e+06 | 2419233.25 | 0 | 0 | 76 | 32 | 2419233.00 | 1 | 873502.0 | 822.0 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0004 | 20190508172218 | 23862.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 | 2419201 | 2019-05-09 | 0 |
| 2019-05-09 00:00:00.992400 | 2.419202e+06 | 2419233.25 | 0 | 0 | 76 | 32 | 2419233.00 | 1 | 36306660.0 | 1582.0 | ... | 2019-05-08 17:22:18.400 | 20190508172218_x0004 | 20190508172218 | 23862.5924 | 2019-05-08 17:22:18 | 2019-05-09 | 2019-05-09 | 2419201 | 2019-05-09 | 0 |
5 rows × 32 columns
Processed parquet files¶
PbP calibrated¶
In [6]:
pbp_calib = pd.read_parquet('data/SP2XR_processed_1min/pbp_calibrated', filters=selection).sort_index()
In [7]:
pbp_calib.columns
Out[7]:
Index(['Time (sec)', 'Packet Time Stamp', 'Flag', 'Dropped Records',
'Record Count', 'Record Size', 'Particle Time Stamp', 'Particle Flags',
'Scatter relPeak', 'Scatter Transit Time', 'Scatter Peak Time',
'Scatter FWHM', 'Scatter Size (nm)', 'Incand relPeak',
'Incand Transit Time', 'Incand Peak Time', 'Incand FWHM',
'Incand Delay', 'Incand Mass (fg)', 'Reserved', 'path', 'first_val',
't0', 'file', 'folder_name', 'delta_sec', 'file_datetime',
'date_floored', 'floor_time', 'Secs_2GB', 'BC mass', 'Opt diam',
'time_lag', 'ratio_inc_scatt', 'flag_valid_inc_signal',
'flag_inc_not_sat', 'flag_valid_inc_signal_in_range',
'flag_valid_scatt_signal', 'flag_scatt_not_sat',
'flag_valid_scatt_signal_in_range', 'flag_negative_timelag',
'flag_extreme_positive_timelag', 'flag_valid_timelag_thin',
'flag_valid_timelag_thick', 'flag_low_ratio_inc_scatt',
'Opt diam scatt only', 'cnts_thin', 'cnts_thin_noScatt', 'cnts_thick',
'cnts_thick_sat', 'cnts_thin_sat', 'cnts_ntl_sat', 'cnts_ntl',
'cnts_extreme_positive_timelag', 'cnts_thin_low_inc_scatt_ratio',
'cnts_particles_for_tl_dist', 'cnts_thin_total', 'cnts_thick_total',
'cnts_unclassified', 'BC mass within range',
'Opt diam scatt only within range', 'temporary_col',
'Sample Flow Controller Read (vccm)', 'BC mass bin', 'date', 'hour'],
dtype='object')
In [8]:
cnts_cols = ['cnts_thin', 'cnts_thin_noScatt', 'cnts_thick', 'cnts_thick_sat', 'cnts_thin_sat', 'cnts_ntl_sat', 'cnts_ntl', 'cnts_extreme_positive_timelag', 'cnts_thin_low_inc_scatt_ratio'] colors = ['C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'k', 'grey'] fig, ax = plt.subplots(figsize=(8, 6), layout='constrained') for i, cnts_col in enumerate(cnts_cols): df_filtered = pbp_calib[pbp_calib[cnts_col] == 1] x = df_filtered['Opt diam'].fillna(90) y = df_filtered['BC mass'] ax.scatter(x, y, alpha=0.4, s=5, color=colors[i], label=cnts_col.replace('cnts_', '')) ax.set_xlabel('Opt diam [nm]') ax.set_ylabel('BC mass [fg]') ax.set_xscale('log') ax.set_yscale('log') ax.grid(alpha=0.3) ax.axvline(90, c='k', ls='--', alpha=0.5, lw=1, label='No scatter placeholder') ax.legend(fontsize=8, markerscale=2)
Out[8]:
<matplotlib.legend.Legend at 0x7f2ba7f34be0>
Bulk Concentrations¶
In [9]:
conc_60s = pd.read_parquet("data/SP2XR_processed_1min/conc_60s", filters=selection).sort_index()
In [10]:
conc_60s.head()
Out[10]:
<style scoped="">
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| Dropped Records | Incand Mass (fg) | BC mass | BC mass within range | cnts_thin | cnts_thin_noScatt | cnts_thick | cnts_thick_sat | cnts_thin_sat | cnts_ntl_sat | ... | BC_massConc_within_range_std | BC_massConc_within_range_vol | BC_numConc_within_range_std | BC_numConc_within_range_vol | S_numConc_std | S_numConc_vol | S_numConc_within_range_std | S_numConc_within_range_vol | date | hour | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| calculated_time | |||||||||||||||||||||
| 2019-05-09 00:01:00 | 0.0 | 16.855231 | 174.442428 | 159.740085 | 22 | 6 | 52 | 0 | 0 | 0 | ... | 0.005323 | 0.004794 | 2.732726 | 2.460738 | 125.238836 | 112.773832 | 124.872251 | 112.443733 | 2019-05-09 | 0 |
| 2019-05-09 00:02:00 | 0.0 | 30.337629 | 192.119622 | 177.837469 | 29 | 1 | 34 | 0 | 0 | 0 | ... | 0.005929 | 0.005339 | 2.200244 | 1.981288 | 120.646739 | 108.640617 | 120.613402 | 108.610597 | 2019-05-09 | 0 |
| 2019-05-09 00:03:00 | 0.0 | 30.950136 | 198.343122 | 188.532185 | 24 | 5 | 55 | 0 | 0 | 0 | ... | 0.006284 | 0.00566 | 2.799689 | 2.522018 | 117.786913 | 106.104884 | 117.586935 | 105.92474 | 2019-05-09 | 0 |
| 2019-05-09 00:04:00 | 0.0 | 44.184496 | 220.411625 | 206.865198 | 17 | 7 | 65 | 0 | 0 | 1 | ... | 0.006898 | 0.006212 | 3.034345 | 2.732733 | 118.772924 | 106.966968 | 118.506169 | 106.726727 | 2019-05-09 | 0 |
| 2019-05-09 00:05:00 | 0.0 | 50.056468 | 230.294057 | 217.496214 | 27 | 2 | 58 | 0 | 0 | 0 | ... | 0.007251 | 0.00653 | 2.900645 | 2.61209 | 119.993332 | 108.056445 | 119.793287 | 107.876301 | 2019-05-09 | 0 |
5 rows × 39 columns
In [11]:
conc_60s.columns
Out[11]:
Index(['Dropped Records', 'Incand Mass (fg)', 'BC mass',
'BC mass within range', 'cnts_thin', 'cnts_thin_noScatt', 'cnts_thick',
'cnts_thick_sat', 'cnts_thin_sat', 'cnts_ntl_sat', 'cnts_ntl',
'cnts_extreme_positive_timelag', 'cnts_thin_low_inc_scatt_ratio',
'cnts_thin_total', 'cnts_thick_total', 'cnts_unclassified',
'BC numb from file', 'BC numb', 'BC numb within range',
'scatter numb from file', 'Scatt numb', 'Scatt numb within range',
'Secs_2GB_mean', 'Sample Flow Controller Read (sccm)',
'Sample Flow Controller Read (vccm)', 'BC_massConc_std',
'BC_massConc_vol', 'BC_numConc_std', 'BC_numConc_vol',
'BC_massConc_within_range_std', 'BC_massConc_within_range_vol',
'BC_numConc_within_range_std', 'BC_numConc_within_range_vol',
'S_numConc_std', 'S_numConc_vol', 'S_numConc_within_range_std',
'S_numConc_within_range_vol', 'date', 'hour'],
dtype='object')
In [13]:
fig, axs = plt.subplots(nrows=3, figsize=(5, 6), sharex=True, layout='constrained') axs[0].plot(conc_60s['BC_massConc_std'], label='BC_massConc_std') axs[0].plot(conc_60s['BC_massConc_vol'], label='BC_massConc_vol') axs[0].plot(conc_60s['BC_massConc_within_range_std'], label='BC_massConc_within_range_std') axs[0].plot(conc_60s['BC_massConc_within_range_vol'], label='BC_massConc_within_range_vol') axs[0].set_ylabel('[ug m-3]') axs[1].plot(conc_60s['BC_numConc_std'], label='BC_numConc_std') axs[1].plot(conc_60s['BC_numConc_vol'], label='BC_numConc_vol') axs[1].plot(conc_60s['BC_numConc_within_range_std'], label='BC_numConc_within_range_std') axs[1].plot(conc_60s['BC_numConc_within_range_vol'], label='BC_numConc_within_range_vol') axs[1].set_ylabel('[# cm-3]') axs[2].plot(conc_60s['S_numConc_std'], label='S_numConc_std') axs[2].plot(conc_60s['S_numConc_vol'], label='S_numConc_vol') axs[2].plot(conc_60s['S_numConc_within_range_std'], label='S_numConc_within_range_std') axs[2].plot(conc_60s['S_numConc_within_range_vol'], label='S_numConc_within_range_vol') axs[2].set_ylabel('[# cm-3]') locator = mdates.AutoDateLocator(minticks=3, maxticks=7) formatter = mdates.ConciseDateFormatter(locator) axs[2].xaxis.set_major_locator(locator) axs[2].xaxis.set_major_formatter(formatter) for ax in axs: ax.legend(fontsize=6) ax.grid(alpha=0.4)
In [14]:
fig, axs = plt.subplots(nrows=2, figsize=(5, 4), sharex=True, layout='constrained') axs[0].plot(conc_60s['Sample Flow Controller Read (sccm)'], label='Sample Flow Controller Read (sccm)') axs[1].plot(conc_60s['Sample Flow Controller Read (vccm)'], label='Sample Flow Controller Read (vccm)') locator = mdates.AutoDateLocator(minticks=3, maxticks=7) formatter = mdates.ConciseDateFormatter(locator) axs[1].xaxis.set_major_locator(locator) axs[1].xaxis.set_major_formatter(formatter) for ax in axs: ax.legend(fontsize=6) ax.grid(alpha=0.4)
Distributions¶
In [15]:
hists_60s = pd.read_parquet('data/SP2XR_processed_1min/hists_60s', filters=selection).sort_index() hists_60s.drop(columns=['date', 'hour'], inplace=True)
In [16]:
hists_60s.head()
Out[16]:
<style scoped="">
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| dNdlogDmev_all_70.03 | dNdlogDmev_all_73.55 | dNdlogDmev_all_77.24 | dNdlogDmev_all_81.11 | dNdlogDmev_all_85.18 | dNdlogDmev_all_89.45 | dNdlogDmev_all_93.94 | dNdlogDmev_all_98.65 | dNdlogDmev_all_103.60 | dNdlogDmev_all_108.80 | ... | dNdlogDsc_all_223.81 | dNdlogDsc_all_243.59 | dNdlogDsc_all_265.12 | dNdlogDsc_all_288.56 | dNdlogDsc_all_314.07 | dNdlogDsc_all_341.83 | dNdlogDsc_all_372.05 | dNdlogDsc_all_404.94 | dNdlogDsc_all_440.74 | dNdlogDsc_all_479.70 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| calculated_time | |||||||||||||||||||||
| 2019-05-09 00:00:00 | 5.509758 | 7.060021 | 7.060021 | 7.060021 | 4.236013 | 11.296034 | 5.648017 | 9.88403 | 12.708039 | 4.236013 | ... | 247.228126 | 213.774815 | 179.50557 | 142.788522 | 77.513769 | 64.458818 | 31.005508 | 20.39836 | 10.607147 | 1.701024 |
| 2019-05-09 00:01:00 | 11.01676 | 8.469907 | 7.058256 | 5.646605 | 4.234953 | 14.116512 | 4.234953 | 5.646605 | 7.058256 | 4.234953 | ... | 252.876411 | 235.746073 | 200.669668 | 132.964048 | 75.862923 | 53.838204 | 28.550562 | 16.314607 | 9.788764 | 0.850299 |
| 2019-05-09 00:02:00 | 8.265464 | 4.236437 | 4.236437 | 1.412146 | 1.412146 | 2.824291 | 5.648582 | 4.236437 | 5.648582 | 2.824291 | ... | 238.276687 | 172.995403 | 167.283291 | 137.090697 | 80.785589 | 41.616819 | 28.560562 | 16.320321 | 13.056257 | 4.252986 |
| 2019-05-09 00:03:00 | 2.755568 | 5.64943 | 11.29886 | 7.061788 | 7.061788 | 11.29886 | 5.64943 | 7.061788 | 1.412358 | 9.886503 | ... | 215.460578 | 194.240976 | 171.389096 | 115.075536 | 87.326825 | 53.865144 | 37.542373 | 17.13891 | 6.529108 | 6.805799 |
| 2019-05-09 00:04:00 | 12.402539 | 8.475842 | 8.475842 | 12.713763 | 7.063202 | 8.475842 | 5.650561 | 11.301123 | 1.41264 | 2.825281 | ... | 235.09496 | 191.830957 | 184.48424 | 131.424613 | 93.874724 | 53.059626 | 29.38687 | 12.244529 | 5.714114 | 2.552685 |
5 rows × 1293 columns
In [17]:
prefixes = hists_60s.columns.str.rsplit('_', n=1).str[0] groups = prefixes.unique() groups
Out[17]:
Index(['dNdlogDmev_all', 'dMdlogDmev_all', 'dNdlogDmev_thin',
'dMdlogDmev_thin', 'dNdlogDmev_thin_noScatt', 'dMdlogDmev_thin_noScatt',
'dNdlogDmev_thick', 'dMdlogDmev_thick', 'dNdlogDmev_thick_sat',
'dMdlogDmev_thick_sat', 'dNdlogDmev_thin_sat', 'dMdlogDmev_thin_sat',
'dNdlogDmev_ntl_sat', 'dMdlogDmev_ntl_sat', 'dNdlogDmev_ntl',
'dMdlogDmev_ntl', 'dNdlogDmev_extreme_positive_timelag',
'dMdlogDmev_extreme_positive_timelag',
'dNdlogDmev_thin_low_inc_scatt_ratio',
'dMdlogDmev_thin_low_inc_scatt_ratio', 'dNdlogDmev_thin_total',
'dMdlogDmev_thin_total', 'dNdlogDmev_thick_total',
'dMdlogDmev_thick_total', 'dNdlogDmev_unclassified',
'dMdlogDmev_unclassified', 'dNdlogDsc_all'],
dtype='object')
In [18]:
t0 = '2019-05-09 15:00:00' t1 = '2019-05-09 16:00:00' resample = '15min' use = 2 hists_60s_plot = hists_60s.loc[t0:t1].resample(resample).mean().iloc[use] dNdlogDmev_all_col = [col for col in hists_60s.columns if 'dNdlogDmev_all' in col] dMdlogDmev_all_col = [col for col in hists_60s.columns if 'dMdlogDmev_all' in col] dNdlogDsc_all_col = [col for col in hists_60s.columns if 'dNdlogDsc_all' in col] Dmev = [float(d.rsplit('_')[-1]) for d in dNdlogDmev_all_col] Dsc = [float(d.rsplit('_')[-1]) for d in dNdlogDsc_all_col] fig, axs = plt.subplots(ncols=3, figsize=(6, 2), layout='constrained') axs[0].set_title('dN/dlogDmev [# cm-3]', fontsize=8) axs[1].set_title('dM/dlogDmev [ug m-3]', fontsize=8) axs[2].set_title('dN/dlogDsc [# cm-3]', fontsize=8) axs[0].plot(Dmev, hists_60s_plot[dNdlogDmev_all_col]) axs[1].plot(Dmev, hists_60s_plot[dMdlogDmev_all_col]) axs[2].plot(Dsc, hists_60s_plot[dNdlogDsc_all_col]) axs[0].set_xlabel('Dmev [nm]') axs[1].set_xlabel('Dmev [nm]') axs[2].set_xlabel('Dscatt [nm]') for ax in axs: ax.set_xscale('log')
In [21]:
t0 = '2019-05-09 15:00:00' t1 = '2019-05-09 16:00:00' resample = '1h' use = 0 hists_60s_plot = hists_60s.loc[t0:t1].resample(resample).mean().iloc[use] dMdlogDmev_all_col = [col for col in hists_60s.columns if 'dMdlogDmev_all' in col] dMdlogDmev_thin_tot_col = [col for col in hists_60s.columns if 'dMdlogDmev_thin_total' in col] dMdlogDmev_thick_tot_col = [col for col in hists_60s.columns if 'dMdlogDmev_thick_total' in col] Dmev = [float(d.rsplit('_')[-1]) for d in dMdlogDmev_all_col] fig, axs = plt.subplots(figsize=(4, 4), layout='constrained') axs.set_title('dM/dlogDmev [ug m-3]', fontsize=8) axs.plot(Dmev, hists_60s_plot[dMdlogDmev_all_col], c='k', alpha=0.2, lw=3, label='Total') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thin_tot_col], label='Thin (total)') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thick_tot_col], label='Thick (total)') axs.set_xlabel('Dmev [nm]') axs.legend() axs.grid(alpha=0.4, which='both') axs.set_xscale('log')
In [22]:
t0 = '2019-05-09 15:00:00' t1 = '2019-05-09 16:00:00' resample = '1h' use = 0 hists_60s_plot = hists_60s.loc[t0:t1].resample(resample).mean().iloc[use] dMdlogDmev_thin_col = [col for col in hists_60s.columns if 'dMdlogDmev_thin' in col and not any(x in col for x in ['total', 'low', 'sat', 'noScatt'])] dMdlogDmev_thin_noScatt_col = [col for col in hists_60s.columns if 'dMdlogDmev_thin_noScatt' in col] dMdlogDmev_thin_tot_col = [col for col in hists_60s.columns if 'dMdlogDmev_thin_total' in col] Dmev = [float(d.rsplit('_')[-1]) for d in dMdlogDmev_thin_col] fig, axs = plt.subplots(figsize=(4, 4), layout='constrained') axs.set_title('dM/dlogDmev [ug m-3]', fontsize=8) axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thin_tot_col], c='k', alpha=0.4, lw=4, label='Thin total') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thin_col], label='-10 < Dt < 50') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thin_noScatt_col], label='no scatt peak') axs.legend() axs.set_xlabel('Dmev [nm]') axs.grid(alpha=0.4, which='both') axs.set_xscale('log')
In [23]:
t0 = '2019-05-09 15:00:00' t1 = '2019-05-09 16:00:00' resample = '1h' use = 0 hists_60s_plot = hists_60s.loc[t0:t1].fillna(0).resample(resample).mean().iloc[use] dMdlogDmev_thick_col = [col for col in hists_60s.columns if 'dMdlogDmev_thick' in col and not any(x in col for x in ['total', 'low', 'sat', 'noScatt'])] dMdlogDmev_thick_sat_col = [col for col in hists_60s.columns if 'dMdlogDmev_thick_sat' in col] dMdlogDmev_thin_sat_col = [col for col in hists_60s.columns if 'dMdlogDmev_thin_sat' in col] dMdlogDmev_thick_tot_col = [col for col in hists_60s.columns if 'dMdlogDmev_thick_total' in col] dMdlogDmev_ntl_col = [col for col in hists_60s.columns if 'dMdlogDmev_ntl' in col and not any(x in col for x in ['sat'])] dMdlogDmev_ntl_sat_col = [col for col in hists_60s.columns if 'dMdlogDmev_ntl_sat' in col] Dmev = [float(d.rsplit('_')[-1]) for d in dMdlogDmev_all_col] fig, axs = plt.subplots(figsize=(4, 4), layout='constrained') axs.set_title('dM/dlogDmev [ug m-3]', fontsize=8) axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thick_tot_col], c='k', alpha=0.4, lw=4, label='Thick total') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thick_col], label='Dt > 50') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thick_sat_col], label='Dt > 50, scatt saturated') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_thin_sat_col], label='-10 < Dt < 50, scatt saturated') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_ntl_col], label='Dt < -10') axs.plot(Dmev, hists_60s_plot[dMdlogDmev_ntl_sat_col], label='Dt < -10, scatt saturated') axs.legend(fontsize=8) axs.set_xlabel('Dmev [nm]') axs.grid(alpha=0.4, which='both') axs.set_xscale('log')