The MATLAB readProtoLidar function improperly combines the active and passive parts of the signal. The active part of the signal has units of photons and the passive term has units of photons/sec.
Line 39 of extra/matlab-lidar/readProtoLidar.m should read:
realReturn = pulseData(2:end,detIdx) + pulseData(1,detIdx) * timeBinWidth;
where timeBinWidth should be previously defined as:
if pulseHeader.timeGateBinCount == 1
% avoid those pesky divide by zeros (although we should rarely have a single bin lidar system).
timeBinWidth = ( pulseHeader.timeGateStop - pulseHeader.timeGateStart );
timeBinWidth = ( pulseHeader.timeGateStop - pulseHeader.timeGateStart ) / double( pulseHeader.timeGateBinCount - 1 );
I will make sure we check that in.
We checked in a set of updates that Paul submitted for the main read routine, which will be in the 4.5.3 release.