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

Home » Public Forums » archive » Organizing arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Organizing arrays [message #89127] Sat, 26 July 2014 20:06
gpeterso is currently offline  gpeterso
Messages: 22
Registered: February 2013
Junior Member
Hey folks! I am very new to IDL. Here is my problem: I have three different arrays shown below

Array one:

index # Latitude longitude Orbit # Ls Local time
0 33.4829 144.685 29074.0 185.281 0.715993
2 36.3315 91.0626 29076.0 185.371 0.719348
3 37.0565 64.0919 29077.0 185.415 0.720421
4 33.3151 35.5232 29078.0 185.459 0.716017
6 35.0037 8.50496 29079.0 185.504 0.717235
7 34.4065 -18.9372 29080.0 185.549 0.716722
8 34.8903 -46.2066 29081.0 185.594 0.716919
9 36.4789 -100.000 29083.0 185.683 0.719498
10 35.0933 -128.030 29084.0 185.727 0.717122
11 32.9497 -155.667 29085.0 185.772 0.715697
13 35.5729 150.636 29087.0 185.862 0.718892
14 32.0291 122.251 29088.0 185.906 0.715020
16 35.5763 68.7436 29090.0 185.996 0.718833
17 37.6885 42.0765 29091.0 186.041 0.721119


Array 2

index # Latitude longitude Orbit # Ls Local time
0 32.2091 93.6677 29074.0 185.281 0.575063
2 37.9429 63.1391 29075.0 185.327 0.567475
3 35.0501 37.6105 29076.0 185.371 0.571654
4 35.7919 9.82673 29077.0 185.416 0.570469
5 32.1131 -15.2921 29078.0 185.460 0.575648
7 33.7751 -43.5211 29079.0 185.505 0.573503
8 33.1527 -70.5551 29080.0 185.549 0.574123
10 33.5869 -98.1293 29081.0 185.594 0.573473
12 38.5033 -128.339 29082.0 185.639 0.566563
13 35.2229 -153.572 29083.0 185.683 0.571470
14 33.8217 179.900 29084.0 185.728 0.573268
15 38.1313 150.102 29085.0 185.773 0.567385
16 34.3573 97.7053 29087.0 185.862 0.572646
17 37.1803 68.6905 29088.0 185.907 0.568572
18 38.6269 40.5004 29089.0 185.952 0.566419

Array 3
index # Latitude longitude Orbit # Ls Local time
0 37.7635 -35.9067 29074.0 185.294 0.236150
2 32.0721 -66.7581 29075.0 185.339 0.227666
3 35.0153 -92.4317 29076.0 185.383 0.231442
4 33.9841 -120.445 29077.0 185.428 0.229713
5 37.9441 -145.032 29078.0 185.472 0.236275
6 36.2873 -173.342 29079.0 185.517 0.233905
7 36.8653 159.725 29080.0 185.562 0.234806
8 36.3945 132.199 29081.0 185.606 0.234291
9 37.7809 105.764 29082.0 185.651 0.236322
10 34.8291 76.3341 29083.0 185.696 0.231116
11 36.2353 50.1601 29084.0 185.740 0.233895
12 38.3637 24.1150 29085.0 185.785 0.236893
13 35.8291 -4.69733 29086.0 185.830 0.233335
14 35.6629 -32.0563 29087.0 185.874 0.233214
16 32.8421 -61.2955 29088.0 185.920 0.228516
17 37.6395 -85.4017 29089.0 185.964 0.236161

What I need to is to organize the data so that the the orbits are are in a ascending order in groups of three. if there is not a match then I need it to skip the row for all three. Here is an example:

Array 1 orbit # Array 2 orbit # Array 3 orbit # Array 1 index # Array 2index # 3idx#

29074.0 29075.0 29076.0 0 2 3


I was thinking of doing something like this.


for j = 0, n_elements-1 do begin

orb_num=array_1[j]


if array_2(3,*,*,*,*,*) eq orb_num+1 and array_3(3,*,*,*,*,*)+2 then begin

print, array_1(3,*,*,*,*,*)[j] , array_2(3,*,*,*,*,*)[j], array_3(3,*,*,*,*,*), array_1(0,*,*,*,*,*), array_2(0,*,*,*,*,*), array_3(0,*,*,*,*,*)

Does anyone know if this idea would work? any suggestions?
[Message index]
 
Read Message
Previous Topic: writing different file to a single file
Next Topic: Inhibit setting the X axis starting value to 0

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

Current Time: Wed Oct 08 16:09:37 PDT 2025

Total time taken to generate the page: 0.00177 seconds