array of map structures [message #93831] |
Tue, 01 November 2016 21:28  |
gunvicsin11
Messages: 93 Registered: November 2012
|
Member |
|
|
Hi all,
I would like to make movie of an array of map structures. But I
couldnt make array of map structures. I have created structure
using create_struct,
create_struct,ca,'ksom',
['DATA','XC','YC','DX','DY','TIME','ID','DUR','XUNITS','YUNI TS','ROLL_ANGLE','ROLL_CENTER'],'d(767,684),d(1),d(1),d(1),d (1),a(1),a(1),f(1),a(1),a(1),d(1),d(2)'
ksom=replicate(ca,nn)
then inside the loop I have given like this,
ksom(ii)=make_map(dumksodata1,xc=correct_kso_map.xc,yc=corre ct_kso_map.yc,dx=correct_kso_map.dx,dy=correct_kso_map.dy,ti me=correct_kso_map.time)
now for example if I do plot_image,ksom(2).data then the output is
displayed. But if I do Plot_map,ksom(2) then I am getting error like this,
PLOT_MAP_INDEX: Extracted data is not 2-D.
Please let me know what is the problem here.
thanks
|
|
|
Re: array of map structures [message #93833 is a reply to message #93831] |
Wed, 02 November 2016 03:17  |
David B
Messages: 18 Registered: January 2015
|
Junior Member |
|
|
On Wednesday, 2 November 2016 04:28:33 UTC, sid wrote:
> Hi all,
>
> I would like to make movie of an array of map structures. But I
> couldnt make array of map structures. I have created structure
> using create_struct,
>
> create_struct,ca,'ksom',
> ['DATA','XC','YC','DX','DY','TIME','ID','DUR','XUNITS','YUNI TS','ROLL_ANGLE','ROLL_CENTER'],'d(767,684),d(1),d(1),d(1),d (1),a(1),a(1),f(1),a(1),a(1),d(1),d(2)'
> ksom=replicate(ca,nn)
>
> then inside the loop I have given like this,
>
> ksom(ii)=make_map(dumksodata1,xc=correct_kso_map.xc,yc=corre ct_kso_map.yc,dx=correct_kso_map.dx,dy=correct_kso_map.dy,ti me=correct_kso_map.time)
>
> now for example if I do plot_image,ksom(2).data then the output is
> displayed. But if I do Plot_map,ksom(2) then I am getting error like this,
> PLOT_MAP_INDEX: Extracted data is not 2-D.
>
> Please let me know what is the problem here.
> thanks
It's not something as simple as your input data array being of the form:
data = [n, m, 1]
rather than the
data = [n, m]
form expected by the function?
You could carry out a test to see if this is the case. If so, then you can use the reform( data ) to get rid of the extra dimension.
David
|
|
|