comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » gaussfit returning errors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
gaussfit returning errors [message #36239] Thu, 28 August 2003 06:28
joanne.taylor is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Assoc and byteorder keywords
Next Topic: Re: gaussfit returning errors

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:17:53 PDT 2025

Total time taken to generate the page: 0.63830 seconds