[Thread Prev][Thread Next][Index]
Re: [ferret_users] inconsistent behaviour trying to use min to find location.
- To: rdbriggs <rdbriggs@xxxxxx>
- Subject: Re: [ferret_users] inconsistent behaviour trying to use min to find location.
- From: Russ Fiedler <russell.fiedler@xxxxxxxx>
- Date: Mon, 19 Mar 2012 10:41:30 +1100
- Cc: "ferret_users@xxxxxxxx" <ferret_users@xxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=csiro.au; i=@csiro.au; q=dns/txt; s=email; t=1332121598; x=1363657598; h=subject:from:to:cc:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=s1byP7IbWnfoGozBbIGFcRIGfePPltqtD38cMwJmu1g=; b=WZHlD3+A6p7ZRzLdVS9ehGRLU1d3HtwitetYDDt9gfi1IR6lBEzRLukP Z5b7qcNZzlOB92nmw7cfLfia9yGBjPdeajBjUzpOrgTEzkCUa6FI/kbYB iNh9hwco+WnV6bW;
- In-reply-to: <4F664A69.6020802@mun.ca>
- References: <4F664A69.6020802@mun.ca>
- Sender: owner-ferret_users@xxxxxxxx
Hi Rob,
I wonder if there is some floating point rounding going in the immediate
mode evaluation that you can't see (i.e. down at the level of precision)
and the minimum gets missed.
try instead
let newvar = var - var[t=@min] ! minima at 0
let xloc = var[t=@loc:0]
Russ
On Mon, 2012-03-19 at 07:49 +1100, rdbriggs wrote:
> Hello,
>
> In the past I've used the
>
> let vmax = v[x=@max,y=@max]
>
> and
>
> let xloc = v[x=@loc:`vmax`]
>
> commands to successfully find the location of the minimum. But this time I have a problem, can anyone tell me what I am doing wrong?
>
> My functions are FUNDHS, FUNDHS50
>
> ! get min
> LET outDHS = funDHS[T=@MIN]
> LET outDHs50 = funDHs50[T=@MIN]
>
> ! and time it occurs
> LET TDHS= funDHS[T=@LOC:`outDHS`]
> LET TDHs50 = funDHs50[T=@LOC:`outDHs50`]
>
> LIST outDHS, outDHS50, TDHs, TDHs50
> DATA SET: ./rreconHs.dat
> T: -120.5 to 0.5
> Column 1: OUTDHS is FUNDHS[T=@MIN]
> Column 2: OUTDHS50 is FUNDHS50[T=@MIN]
> Column 3: TDHS is FUNDHS[T=@LOC:0.7081349]
> Column 4: TDHS50 is FUNDHS50[T=@LOC:27.53873]
> OUTDHS OUTDHS5 TDHS TDHS50
> I / *: 0.7081 27.54 -10.00 ....
>
>
> ------> SoTDHS worksTDHS50 does not ?
>
> The output from my two functions are
>
> yes? list FUNDHS, FUNDHS50
>
> 15 / 106: 50. 163.
> -14 / 107: 33. 130.
> -13 / 108: 20. 109.
> -12 / 109: 10. 104.
> -11 / 110: 3. 32.
> -10 / 111: 1. 28.< ------ I want to automatically identify this time
> -9 / 112: 2. 28.
> -8 / 113: 7. 32.
> -7 / 114: 16. 41.
> -6 / 115: 28. 52.
> -5 / 116: 44. 68.
> -4 / 117: 64. 87.
> -3 / 118: 88. 110.
> -2 / 119: 115. 137.
> -1 / 120: 145. 167.
> 0 / 121: 180. 201.
> yes? list FUNDHS, FUNDHS50
>
>
> improving the precision
> yes? list/form=(2(F9.4)) FUNDHS, FUNDHS50
>
> 33.1926 130.2298
> 19.8315 108.5893
> 10.4672 104.3460
> 2.9604 32.1601
> 0.7081 27.5387<------ these are the mins
> 2.1548 28.4311
> 7.2379 32.3409
> 15.9903 40.5858
> 28.3927 52.3871
> 44.4533 68.0784
> 64.1537 86.9202
> 87.5170 109.8389
> 114.5442 136.8729
> 145.2063 166.8670
> 179.5263 200.7330
>
>
> yes? list FUNDHS50[T=@LOC:27.53873]
> VARIABLE : T of 27.54 in ((HS_ADJDHS50 - HSOBS)/SIGHS50)^2 + ((TAX-TOBS) / TOBS_SIG)^2
> FILENAME : rreconHs.dat
> T : -120.5 to 0.5 (location of 27.54)
> ....
> yes? list FUNDHS50[T=@LOC:28]
> VARIABLE : T of 28 in ((HS_ADJDHS50 - HSOBS)/SIGHS50)^2 + ((TAX-TOBS) / TOBS_SIG)^2
> FILENAME : rreconHs.dat
> T : -120.5 to 0.5 (location of 28)
> -10.10
>
> yes? list outDHS50
> VARIABLE : FUNDHS50[T=@MIN]
> FILENAME : rreconHs.dat
> T : -120.5 to 0.5
> 27.54
> yes? list FUNDHS50[T=@LOC:27.53]
> VARIABLE : T of 27.53 in ((HS_ADJDHS50 - HSOBS)/SIGHS50)^2 + ((TAX-TOBS) / TOBS_SIG)^2
> FILENAME : rreconHs.dat
> T : -120.5 to 0.5 (location of 27.53)
> ....
>
> Any ideas what is going on here ?
>
> Regards,
>
> Rob
>
>
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement