Re: What's HISTOGRAM doing now? [message #73098 is a reply to message #73086] |
Fri, 22 October 2010 05:12  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mrunmayee writes:
> Why are bins different? Output is unchaged for log bins when I am
> histo-ing alog10(data) with corresponding log bins. Also, instead of
> using BINSIZE, if I use NBINS in program, things work as they should.
> So what's histogram upto NOW? Where am I missing something?
The most common reason for histogram to produce
strange results is a data type mismatch
between the data and the value you pass in
for the binsize. The documentation mentions
they have to be the same data type, but this
is a strange requirement for IDL users, who
most of the time could care less about data
type. I would say most people don't know
this requirement exists.
I've never understood why Histogram can't
just do the data type conversion for you
and thus behave like a normal IDL command.
This was the most obnoxious thing I had to
deal with when I was creating the Histoplot
program.
Remnants of the struggle live on in the form
of the Convert_to_Type program in the Coyote
Library. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|