% Code for loading DEID and MASC data and plotting basic power law 
% mass-diameter and density-diameter relationships
% 
% The table "DEID_All" contains all hydrometeor properties obtained by the 
% DEID during the Red Butte field experiment. Includes both rain and snow. 
%
% The table "DEID_Snow" contains the properties of all snowflakes obtained 
% by the DEID during the Red Butte field experiment. Very small objects
% that have less than three contiguous pixels of data in all three
% dimesions have been excluded.
%
% The table "DEID_MASC" contains data for snow events that were observed by
% both the DEID and the MASC. MASC properties are averaged in one-minute
% intervals. Each row represents a single hydrometeor.
%
% Karlie Rees
% University of Utah
%

load('Density_data.mat')    % load data

% Plot the power law relationship for the mass-diameter relationship for
% all snowflakes (Figure 7)
[a, b] = powerlaw(DEID_Snow.D_deff,DEID_Snow.D_mmg,'D_{eff}','M',1);

% Plot the power law relationship for the mass-diameter relationship for
% all snowflakes (Figure 7)
[a, b] = powerlaw(DEID_Snow.D_deff,DEID_Snow.D_denS,'D_{eff}','\rho',1);

% Plot the power law relationship for MASC-adjusted density (Figure 10,
% right)
[a, b] = powerlaw(DEID_MASC.D_deff,DEID_MASC.M_den,'D_{eff}','\rho',1);





