Code covered by the BSD License  

Highlights from
Log Binning of Data

Be the first to rate this file! 41 Downloads (last 30 days) File Size: 1.6 KB File ID: #27176

Log Binning of Data

by

 

06 Apr 2010 (Updated )

Takes in data, and then produces data for a log binned histogram

| Watch this File

File Information
Description

  This script takes in data, and then produces a logarithmically binned (natural log) histogram:
  [midpoints,Freq,eFreq] =logbin(data, BinNum)
  where the inputs are
  data: the input data from some experiment which will be binned
  BinNum: the number of bins used in the data reduction process.
  
  The outputs are:
  
 midpoints := the centre of each log bin

 Freq := the number of counts in each bin

 eFreq := This calculates the original relative Poissonian error before normalisation, then calculates the new error after normalisation.
  
  One should note that this script is a slightly modified version of
   'logbinfromlinbin.m' which can be found here:
  http://www-personal.umich.edu/~ladamic/courses/si614w06/matlab/index.html
  
  Modified by LPS July, 2010.

  NOTES:
This paper will be of use to some looking more deeply into the technique of using log bins in data reduction

"Sampling, log binning, fitting, and plotting durations of open and shut intervals from single channels and the effects of noise"
by McManus et al. 1987.

Acknowledgements

This file inspired Estimate Pdf Of Data Set Spanning Orders Of Magnitude.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
11 Mar 2011 LPS

Hi Frank,

Thanks for the kind remarks. As for the error, I will look in to altering it within the near future; as well as add more to it.

LPS

26 Jan 2011 Frank Gommer

Hi LPS,
just tried your code and it seems that it does not work with negative values?
It would be nice to add the plot function as well (similiar to hist)...
Otherwise, for my work the code is a good idea!
Cheers,
Frank

21 Apr 2010 LPS

Please do not forget to rate this algorithm, and leave questions or suggestions for improvements to this script.

Many thanks,

LPS

08 Apr 2010 LPS

Thanks John, just getting used to the whole layout of the community.

This paper will be of use to some looking more deeply into the technique of using log bins in data reduction

"Sampling, log binning, fitting, and plotting durations of open and shut intervals from single channels and the effects of noise"
by McManus et al. 1987.

Updates
06 Apr 2010

Edited info text

07 Apr 2010

Edit info content

08 Apr 2010

Fixed rounding error which created some extra unnecessary end bins. Also included another output parameter: edges; which some may find useful.

15 Jun 2010

Corrected normalisation issue; added better documentation (i.e. request help in CMD window works).

30 Jun 2010

I have included an error on the Frequency. This calculates the original relative Poissonian error before normalisation, then calculates the new error after normalisation.

15 Jul 2010

Realised the information on the usage of the file was severely out of date. This has now been updated.

18 Aug 2010

Cleaned up the script, updated the help document within the file - it should be more easily used now.

11 Mar 2011

Made a research article more apparent in the description.

Contact us