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