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

Home » Public Forums » archive » Re: 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
Re: MPFIT2DFUN- use for a time series of images? [message #75465] Mon, 14 March 2011 06:46 Go to next message
Allard de Wit is currently offline  Allard de Wit
Messages: 7
Registered: December 2002
Junior Member
>> Allard
>
> Thanks Gray and Allard, that makes more sense, I will look at
> MPFITFUN-- and yes Allard it would be extremely helpful to be able to
> look at the copy of your code!
>
> Katie

Katie,

I have put a package on our public ftp server:
ftp://sc:Image188@ftp.alterra.nl/pub/adewit/idlsigmoid.zip

It contains the following files:
fit_phenology_gimms.pro - a wrapper I used to run it over GIMMS (needs
ENVI)
fit_sigmoid.pro - a wrapper for sigmoid fitting
fsigmoid.pro - double sigmoid defined as a function
psigmoid.pro - double sigmoid defined as a procedure
test_fit_sigmoid_curvefit.pro - curve fitting using curvefit
test_fit_sigmoid_mpfit.pro - curve fitting using mpfitfun

Some test profiles, needed by the test* routines
test_ndvi_zprofile2.sav
test_ndvi_zprofile3.sav
test_ndvi_zprofile4.sav
test_ndvi_zprofile5.sav

Cheers

Allard
Re: MPFIT2DFUN- use for a time series of images? [message #75496 is a reply to message #75465] Fri, 11 March 2011 06:47 Go to previous messageGo to next message
Katie[1] is currently offline  Katie[1]
Messages: 2
Registered: March 2011
Junior Member
On Mar 11, 7:49 am, Allard de Wit <ajwde...@xs4all.nl> wrote:
> On Mar 10, 9:01 pm, Katie <kmwhite21...@gmail.com> 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)?
>
> Katie,
>
> You will need to iterate over the rows and columns of your image and
> fit
> the logistic model to the time-series at each row/column value.
> Indeed, MPFITFUN is one of the tools to do that.
>
> A couple of years ago I implemented this approach for use with the
> GIMMS
> dataset. In fact it uses a double logistic model to model the NDVI
> time-series. My implementation does not include a variable day-of-year
> (just regular time-steps) but this is a trivial extension. It also
> uses IDLs native Curve_Fit routine rather then MPFITFUN, although the
> latter is better.
>
> If you're interested I can send you a copy of that code.
>
> Allard

Thanks Gray and Allard, that makes more sense, I will look at
MPFITFUN-- and yes Allard it would be extremely helpful to be able to
look at the copy of your code!

Katie
Re: MPFIT2DFUN- use for a time series of images? [message #75500 is a reply to message #75496] Fri, 11 March 2011 04:49 Go to previous messageGo to next message
Allard de Wit is currently offline  Allard de Wit
Messages: 7
Registered: December 2002
Junior Member
On Mar 10, 9:01 pm, Katie <kmwhite21...@gmail.com> 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)?

Katie,

You will need to iterate over the rows and columns of your image and
fit
the logistic model to the time-series at each row/column value.
Indeed, MPFITFUN is one of the tools to do that.

A couple of years ago I implemented this approach for use with the
GIMMS
dataset. In fact it uses a double logistic model to model the NDVI
time-series. My implementation does not include a variable day-of-year
(just regular time-steps) but this is a trivial extension. It also
uses IDLs native Curve_Fit routine rather then MPFITFUN, although the
latter is better.

If you're interested I can send you a copy of that code.

Allard
Re: MPFIT2DFUN- use for a time series of images? [message #75506 is a reply to message #75500] Thu, 10 March 2011 12:27 Go to previous messageGo to next message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Mar 10, 3:01 pm, Katie <kmwhite21...@gmail.com> 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)?

Well, you're trying to fit 3d data with a 2d function. I would look
at mpfitfun or just mpfit.
Re: MPFIT2DFUN- use for a time series of images? [message #87657 is a reply to message #75465] Thu, 20 February 2014 20:23 Go to previous message
sawaid.abbas is currently offline  sawaid.abbas
Messages: 1
Registered: February 2014
Junior Member
On Monday, March 14, 2011 9:46:22 PM UTC+8, Allard de Wit wrote:
>>> Allard
>>
>> Thanks Gray and Allard, that makes more sense, I will look at
>> MPFITFUN-- and yes Allard it would be extremely helpful to be able to
>> look at the copy of your code!
>>
>> Katie
>
> Katie,
>
> I have put a package on our public ftp server:
> ftp://sc:Image188@ftp.alterra.nl/pub/adewit/idlsigmoid.zip
>
> It contains the following files:
> fit_phenology_gimms.pro - a wrapper I used to run it over GIMMS (needs
> ENVI)
> fit_sigmoid.pro - a wrapper for sigmoid fitting
> fsigmoid.pro - double sigmoid defined as a function
> psigmoid.pro - double sigmoid defined as a procedure
> test_fit_sigmoid_curvefit.pro - curve fitting using curvefit
> test_fit_sigmoid_mpfit.pro - curve fitting using mpfitfun
>
> Some test profiles, needed by the test* routines
> test_ndvi_zprofile2.sav
> test_ndvi_zprofile3.sav
> test_ndvi_zprofile4.sav
> test_ndvi_zprofile5.sav
>
> Cheers
>
> Allard


Dear Allard,

I need your codes for curve fitting.
Currently I can not download it.
I also need your suggestion about my work.
I want to extract pheno-pauses from NDVI time-series.
I after fitting curve, I need to extract time of phenology according to a fixed NDVI values that is different for every pixel.
Need your suggestions guys.
New to IDL also,


Regards
Sawaid
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to check the variables by myself ?
Next Topic: Problem with cgcmdwindow__define

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

Current Time: Wed Oct 08 15:49:03 PDT 2025

Total time taken to generate the page: 0.00734 seconds