make mape [message #94716] |
Tue, 05 September 2017 05:05  |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
Hi,
I have 10000 values of h at specific 10000 values of x and y, every values stored in idlsave file, I want to combine all values of h at specific x,y in new array take this form
hh=[x,y,h]
where
IDL> help,h
h FLOAT = Array[1, 1, 56]
|
|
|
Re: make mape [message #94718 is a reply to message #94716] |
Tue, 05 September 2017 06:58   |
Markus Schmassmann
Messages: 129 Registered: April 2016
|
Senior Member |
|
|
On 09/05/2017 02:05 PM, AGW wrote:
> I have 10000 values of h at specific 10000 values of x and y, every
> values stored in idlsave file, I want to combine all values of h at
> specific x,y in new array take this form
>
> hh=[x,y,h]
>
> where
>
> IDL> help,h
> h FLOAT = Array[1, 1, 56]
most likely what you want is easiest to get using
Result = GRIDDATA( x, y, h )
If you want to combine your values within a grid interval yourself you
could modify HIST_2D to give you a reverse index.
Hopefully one of these approaches gives you what you need, good luck,
Markus
|
|
|
Re: make mape [message #94720 is a reply to message #94716] |
Tue, 05 September 2017 08:31   |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
On Tuesday, September 5, 2017 at 2:05:03 PM UTC+2, AGW wrote:
> Hi,
>
> I have 10000 values of h at specific 10000 values of x and y, every values stored in idlsave file, I want to combine all values of h at specific x,y in new array take this form
>
> hh=[x,y,h]
>
> where
>
> IDL> help,h
> h FLOAT = Array[1, 1, 56]
It not work
Unable to concatenate variables because the dimensions do not agree: h.
|
|
|
Re: make mape [message #94721 is a reply to message #94720] |
Wed, 06 September 2017 05:19   |
Markus Schmassmann
Messages: 129 Registered: April 2016
|
Senior Member |
|
|
On 09/05/2017 05:31 PM, AGW wrote:
> On Tuesday, September 5, 2017 at 2:05:03 PM UTC+2, AGW wrote:
>> I have 10000 values of h at specific 10000 values of x and y, every
>> values stored in idlsave file, I want to combine all values of h
>> at specific x,y in new array take this form
>>
>> hh=[x,y,h]
>>
>> where
>>
>> IDL> help,h h FLOAT = Array[1, 1, 56]
> It not work
>
> Unable to concatenate variables because the dimensions do not agree:
> h.
what are the dimensions of x & y?
IDL> help, x,y,h
|
|
|
Re: make mape [message #94722 is a reply to message #94716] |
Wed, 06 September 2017 11:32   |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
On Tuesday, September 5, 2017 at 2:05:03 PM UTC+2, AGW wrote:
> Hi,
>
> I have 10000 values of h at specific 10000 values of x and y, every values stored in idlsave file, I want to combine all values of h at specific x,y in new array take this form
>
> hh=[x,y,h]
>
> where
>
> IDL> help,h
> h FLOAT = Array[1, 1, 56]
h FLOAT = Array[1, 1, 56]
IDL> help,x
X INT = 200
IDL> help,y
Y INT = 230
|
|
|
Re: make mape [message #94724 is a reply to message #94722] |
Thu, 07 September 2017 04:46   |
Markus Schmassmann
Messages: 129 Registered: April 2016
|
Senior Member |
|
|
On 09/06/2017 08:32 PM, AGW wrote:
> I have 10000 values of h at specific 10000 values of x and y, every
> values stored in idlsave file, I want to combine all values of h
> at specific x,y in new array take this form
>
> hh=[x,y,h]
>
> where
>
> IDL> help,h
> h FLOAT = Array[1, 1, 56]
>
> IDL> help,x
> X INT = 200
>
> IDL> help,y
> Y INT = 230
I'm not sure I understand what you want, but maybe this is it:
sz=size(h,/dim)
hh=[replicate(x,sz),replicate(y,sz),h]
If not, please explain better what you want. Markus
|
|
|
Re: make mape [message #94726 is a reply to message #94716] |
Thu, 07 September 2017 09:56   |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
On Tuesday, September 5, 2017 at 2:05:03 PM UTC+2, AGW wrote:
> Hi,
>
> I have 10000 values of h at specific 10000 values of x and y, every values stored in idlsave file, I want to combine all values of h at specific x,y in new array take this form
>
> hh=[x,y,h]
>
> where
>
> IDL> help,h
> h FLOAT = Array[1, 1, 56]
Sorry for this confusion, I have map 500 x 1000 pixels, I want to calculate the velocity of some pixels, I calculate it correctly, I want to make map of velocity, but the problem is I did not calculate all pixels so I want to put the new values of velocity in origin position (x & y). How can I do it?
|
|
|
Re: make mape [message #94727 is a reply to message #94726] |
Fri, 08 September 2017 02:56   |
Markus Schmassmann
Messages: 129 Registered: April 2016
|
Senior Member |
|
|
On 09/07/2017 06:56 PM, AGW wrote:
> On Tuesday, September 5, 2017 at 2:05:03 PM UTC+2, AGW wrote:
>> Hi,
>>
>> I have 10000 values of h at specific 10000 values of x and y, every
>> values stored in idlsave file, I want to combine all values of h
>> at specific x,y in new array take this form
>>
>> hh=[x,y,h]
>>
>> where
>>
>> IDL> help,h
>> h FLOAT = Array[1, 1, 56]
>
> Sorry for this confusion, I have map 500 x 1000 pixels, I want to
> calculate the velocity of some pixels, I calculate it correctly, I
> want to make map of velocity, but the problem is I did not calculate
> all pixels so I want to put the new values of velocity in origin
> position (x & y). How can I do it
; Creating example data:
x_all=randomu(seed,10000)
y_all=randomu(seed,10000)
x=[0:1:(1./499)]
y=[0:1:(1./999)]
values_all=sin(!dpi*2*x_all)*cos(!dpi*2*y_all)
; Data for 10000 points calculated:
IDL> help, x_all, y_all, value_all
X_ALL FLOAT = Array[10000]
y_ALL FLOAT = Array[10000]
VALUE_ALL FLOAT = Array[10000]
; and the coordinates of your desired map is given by
IDL> help, x, y
X FLOAT = Array[500]
Y FLOAT = Array[1000]
; then you can create your map by
yourMap = GRIDDATA( x_all, y_all, values_all , /grid, xout=x, yout=y)
; exact for comparison
exact=rebin( sin(!dpi*2*x) ,[500,1000])* $
rebin(transpose(cos(!dpi*2*y)),[500,1000])
; show
im=image([yourMap,exact,yourMap-exact])
; I hope this is what you want, good luck, Markus
|
|
|
Re: make mape [message #94728 is a reply to message #94716] |
Wed, 13 September 2017 05:09  |
Ali Gamal
Messages: 98 Registered: June 2013
|
Member |
|
|
On Tuesday, September 5, 2017 at 2:05:03 PM UTC+2, AGW wrote:
> Hi,
> thanks for your help
> I have 10000 values of h at specific 10000 values of x and y, every values stored in idlsave file, I want to combine all values of h at specific x,y in new array take this form
>
> hh=[x,y,h]
>
> where
>
> IDL> help,h
> h FLOAT = Array[1, 1, 56]
|
|
|