gaussfit returning errors [message #36239] |
Thu, 28 August 2003 06:28 |
joanne.taylor
Messages: 1 Registered: August 2003
|
Junior Member |
|
|
hi, I'm fairly new to IDl, so I apologise if this is really simple, or
if it has been covered before (I have looked).
I'm trying to fit a gaussian to a histogram I have using gaussfit:
PROGRAM:
------------------------------------------------------------ ---
READ, gaussmin, PROMPT = 'Enter the minimum SUV to fit gaussian to '
READ, gaussmax, PROMPT = 'Enter the maximum SUV to fit gaussian to '
minimum=(gaussmin/bin)-1
maximum=(gaussmax/bin)-1
gaussXrange = xLabels(minimum:maximum)
gaussYrange = distribution(minimum:maximum)
result = GAUSSFIT(gaussXrange,gaussYrange,output, NTERMS=6)
OPLOT, gaussXrange, result, COLOR=200, THICK=2.0
------------------------------------------------------------ ----
bin, is the binsize, which was chosen by the user earlier.
xLabels, is the true values of the x axis (as opposed to bin number)
when I run this, I get the following error:
% Subscript range values of the form low:high must be >= 0, < size,
with low <= high: XLABELS.
% Execution halted at: ROITOOL_EVENT 5973
(line 5973 is where gaussXrange is defined)
Can anyone tell me what I'm doing wrong?
again, I apologise if this is something really obvious, but its had me
bashing my head against the computer screen all day
thanks
Joanne
|
|
|