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

Home » Public Forums » archive » MPFIT2DFUN- use for a time series of images?
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
MPFIT2DFUN- use for a time series of images? [message #75507] Thu, 10 March 2011 12:01 Go to next message
Katie[1] is currently offline  Katie[1]
Messages: 2
Registered: March 2011
Junior Member
I want to fit pixel values to a logistic model that each have X, Y
coordinates and a day of the year value associated with them. I see
from the MPFIT2DFUN documentation how to define X, Y for a each Z
dependent value and the dependent error value, but can a third
variable (day of the year in this case) be defined in order to fit a
curve in MPFIT2DFUN? I currently have each each date as a separate
band in a stacked image file that I exported as an ASCII file. I want
to determine the day of the year that the pixel values (vegetation
indices) reach a value on the the curve.

Any suggestions, or perhaps I am not understanding the MPFIT2DFUN
correctly (I am very new to IDL)?
Re: MPFIT2DFUN- use for a time series of images? [message #87551 is a reply to message #75507] Fri, 14 February 2014 11:47 Go to previous messageGo to next message
rajen.water is currently offline  rajen.water
Messages: 1
Registered: February 2014
Junior Member
On Thursday, March 10, 2011 3:01:14 PM UTC-5, Katie wrote:
> I want to fit pixel values to a logistic model that each have X, Y
> coordinates and a day of the year value associated with them. I see
> from the MPFIT2DFUN documentation how to define X, Y for a each Z
> dependent value and the dependent error value, but can a third
> variable (day of the year in this case) be defined in order to fit a
> curve in MPFIT2DFUN? I currently have each each date as a separate
> band in a stacked image file that I exported as an ASCII file. I want
> to determine the day of the year that the pixel values (vegetation
> indices) reach a value on the the curve.
>
> Any suggestions, or perhaps I am not understanding the MPFIT2DFUN
> correctly (I am very new to IDL)?

Hi Katie,
Were you able to solve your problem? I do have the similar problem now.

Best,
Rajendra
Re: MPFIT2DFUN- use for a time series of images? [message #87561 is a reply to message #87551] Fri, 14 February 2014 21:56 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Friday, February 14, 2014 2:47:33 PM UTC-5, rajen...@gmail.com wrote:
> On Thursday, March 10, 2011 3:01:14 PM UTC-5, Katie wrote:
>
>> I want to fit pixel values to a logistic model that each have X, Y
>
>> coordinates and a day of the year value associated with them. I see
>
>> from the MPFIT2DFUN documentation how to define X, Y for a each Z
>
>> dependent value and the dependent error value, but can a third
>
>> variable (day of the year in this case) be defined in order to fit a
>
>> curve in MPFIT2DFUN? I currently have each each date as a separate
>
>> band in a stacked image file that I exported as an ASCII file. I want
>
>> to determine the day of the year that the pixel values (vegetation
>
>> indices) reach a value on the the curve.
>
> Were you able to solve your problem? I do have the similar problem now.

The easiest way to solve Katie's problem is to use the FUNCTARGS option. For example, if DOY is day of year,

pp = mpfit2dfun(myfunct, x, y, z, err, pp0, functargs={doy: doy})

and then MYFUNCT needs to accept the DOY keyword,

function myfunct, x, y, p, doy=doy
;; calculate function based on x, y and doy
return, f
end

Another way is described here,
http://www.physics.wisc.edu/~craigm/idl/fitqa.html#multivar

Basically MPFIT doesn't care how many independent your function has. That is ancillary information that only you need to know. All you need to do is find a way to get that data into your user function.

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reconstruct surface from gradient field?
Next Topic: Writing an 8 Column array into a data file

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

Current Time: Wed Oct 08 09:13:23 PDT 2025

Total time taken to generate the page: 0.00440 seconds