1 | ;+ |
---|
2 | ; |
---|
3 | ; @file_comments |
---|
4 | ; |
---|
5 | ; Used to avoid a bug in congrid in a old version of IDL |
---|
6 | ; Useless now... |
---|
7 | ; |
---|
8 | ; old example: based on a old version of IDL (5.??) |
---|
9 | ; IDL> print, congrid([[1,2,3,4],[5,6,7,8]],12,4) |
---|
10 | ; 1 1 1 2 2 2 3 3 3 3 4 4 |
---|
11 | ; 1 1 1 2 2 2 3 3 3 3 4 4 |
---|
12 | ; 5 5 5 6 6 6 7 7 7 7 8 8 |
---|
13 | ; 5 5 5 6 6 6 7 7 7 7 8 8 |
---|
14 | ; IDL> print, rebin([[1,2,3,4],[5,6,7,8]],12,4) |
---|
15 | ; 1 1 1 2 2 2 3 3 3 4 4 4 |
---|
16 | ; 3 3 3 4 4 4 5 5 5 6 6 6 |
---|
17 | ; 5 5 5 6 6 6 7 7 7 8 8 8 |
---|
18 | ; 5 5 5 6 6 6 7 7 7 8 8 8 |
---|
19 | ; IDL> print, congridseb([[1,2,3,4],[5,6,7,8]],12,4) |
---|
20 | ; 1 1 1 2 2 2 3 3 3 4 4 4 |
---|
21 | ; 1 1 1 2 2 2 3 3 3 4 4 4 |
---|
22 | ; 5 5 5 6 6 6 7 7 7 8 8 8 |
---|
23 | ; 5 5 5 6 6 6 7 7 7 8 8 8 |
---|
24 | ; |
---|
25 | ; @obsolete |
---|
26 | ; |
---|
27 | ; @param tableau {in}{required} |
---|
28 | ; 1 or 2d array |
---|
29 | ; |
---|
30 | ; @param x {in}{required} |
---|
31 | ; first dimension of the result which must be |
---|
32 | ; a multiple of the first dimension of the input array. |
---|
33 | ; |
---|
34 | ; @param y {in}{required} |
---|
35 | ; second dimension of the result which must be |
---|
36 | ; a multiple of the second dimension of the input array |
---|
37 | ; |
---|
38 | ; @returns |
---|
39 | ; an array which dimensions are x,y |
---|
40 | ; |
---|
41 | ; @history |
---|
42 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
43 | ; 20/3/98 |
---|
44 | ; 18/6/1999 supression d''une horrible boucle |
---|
45 | ; |
---|
46 | ; @version |
---|
47 | ; $Id$ |
---|
48 | ; |
---|
49 | ;- |
---|
50 | ; |
---|
51 | FUNCTION congridseb, tableau, x, y |
---|
52 | ; |
---|
53 | compile_opt idl2, strictarrsubs |
---|
54 | ; |
---|
55 | CASE N_PARAMS() OF |
---|
56 | 2: return, congrid(tableau, x) |
---|
57 | 3:return, congrid(tableau, x, y) |
---|
58 | else: return, report('Bad number or arguments in the call of congridseb') |
---|
59 | endcase |
---|
60 | end |
---|