def load_spatial_experiments(data_dir, glob='*'):
    data_cache = DataCache(data_dir, make_spatial_key, ('band', 'exp'),
        pattern=glob)
    data_cache.key_sorter = spatial_sorter
    wavelengths,exps = data_cache.sub_keys()
    return data_cache
Esempio n. 2
0
    if data.runinfo.AxisRatioCalc != 'Brandes':
        exp_key = 'Shape'
        diff_count += 1
    if diff_count > 1:
        exp_key = 'Combined'
    return data.waveBand, exp_key

def setupDefaults(grid):
    ax = grid[0]
    ax.xaxis.set_major_locator(plt.MultipleLocator(5))
    ax.set_xlim(-15, 15)
    ax.set_ylim(0, 50)

plt.rcParams['font.size'] = 12
plots.defaults.axisDefaults.setup = setupDefaults
data_cache = DataCache('ref_runs', make_key, ('band', 'exp'))
data_cache.key_sorter = sorter
wavelengths,exps = data_cache.sub_keys()

for lam_text, exp_text in [('C', 'Control'), ('X', 'Control')]:
    data = data_cache[lam_text, exp_text]
    with datatypes.PlotInfoContext(wavelength=data.wavelength):
        for desc,moms in [('Single', (datatypes.Reflectivity, datatypes.DopplerVelocity, datatypes.SpectrumWidth)),
                          ('Dual', (datatypes.ZDR, datatypes.RhoHV, datatypes.PhiDP)),
                          ('Attenuation', (datatypes.Attenuation, datatypes.DiffAtten))]:
            source = 'calc' if desc=='Attenuation' else 'ts'
            moments = [data.fields.grab(moment, pol='H', source=source) for moment in moms] 

            fig = plt.figure(figsize=(11, 6), dpi=200)
            if len(moments) == 3:
                rect = [0.07, 0.05, 0.88, 0.95]
Esempio n. 3
0
        exp_key = 'Wavelength'
        diff_count += 1
    if np.isnan(data.runinfo.FixedTemp):
        exp_key = 'Temperature'
        diff_count += 1
    if data.runinfo.CantingWidth > 10.0:
        exp_key = 'Canting'
        diff_count += 1
    if data.runinfo.AxisRatioCalc != 'Brandes':
        exp_key = 'Shape'
        diff_count += 1
    if diff_count > 1:
        exp_key = 'Combined'
    return data.waveBand, exp_key

data_cache = DataCache('ref_runs', make_key, ('band', 'exp'))
del data_cache['C', 'Canting']
del data_cache['X', 'Canting']
data_cache.key_sorter = sorter
wavelengths,exps = data_cache.sub_keys()

# <codecell>

import disser.plots.defaults as defaults
from disser import plots, datatypes, atten

# <codecell>

AttenDelta = datatypes.DataType('Attenuation Difference', r'$\Delta A$')
SpecAttenDelta = datatypes.DataType('Specific Attenuation Difference', r'$\Delta \alpha$')
DiffAttenDelta = datatypes.DataType('Differential Attenuation Difference', r'$\Delta A_D$')