frudawski

# specbandwidth

The specbandwidth function determines the bandwidth of a narrowband spectral power distributions (SPDs) at one half peak maximum or other thresholds.

Usage:

[sbw,lam1,lam2] = specbandwidth(lam,spec,threshold,method)

Where:

Examples

Determine the spectral bandwidth of the V(\lambda) curve:

lam = 380:780;
VL = ciespec(lam,'VL');
sbw = specbandwidth(lam,VL)

Result:

swb = 100.39

Plot the spectral bandwidth for V(\lambda) at 75% peak height:

lam = 380:780;
VL = ciespec(lam,'VL');
threshold = 75;
[sbw,lam1,lam2] = specbandwidth(lam,VL,threshold);

% plotting
plot(lam,VL)
hold on
grid minor
plot([lam1 lam1 lam2 lam2],[0 threshold threshold 0]./100,'--k')
text(lam1+(lam2-lam1)/2,(threshold+5)./100,['bw = ',num2str(sbw),' nm'])
xlabel('$\lambda$ in nm')
ylabel('relative SPD')
hold off
texify

Result:

Determine the spectral bandwidth of the α-opic functions:

lam = 380:780;
spec = ciespec(lam,'aopic');
sbw = specbandwidth(lam,spec)

Result:

sbw = 52.709    93.698   113.072    94.990    84.439

Determine the spectral bandwidth of the α-opic functions using ‘pchip’ interpolation:

lam = 380:780;
spec = ciespec(lam,'aopic');
sbw = specbandwidth(lam,spec,50,'pchip')

sbw = 52.711    93.696   113.071    94.991    84.436