Changeset 242 for trunk/SRC/Interpolation
- Timestamp:
- 04/06/07 10:35:17 (17 years ago)
- Location:
- trunk/SRC/Interpolation
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/angle.pro
r238 r242 38 38 RETURN, {x:x, y:y} 39 39 END 40 ; 40 41 ;+ 41 42 ; -
trunk/SRC/Interpolation/clickincell.pro
r238 r242 26 26 ; 27 27 ; @keyword IJ 28 ; see outputs28 ; see returns 29 29 ; 30 30 ; @keyword _EXTRA -
trunk/SRC/Interpolation/cutpar.pro
r231 r242 16 16 ; @param y3 {in}{required} 17 17 ; 1d arrays of p elements, giving the edge positions. 18 ; The edges must be given as in plot to draw the parallelogram. (see example). 18 ; The edges must be given as in <proidl>plot</proidl> to draw the 19 ; parallelogram. (see example). 19 20 ; 20 21 ; @param n {in}{required} … … 22 23 ; 23 24 ; @keyword ENDPOINTS 24 ; see outputs25 ; see returns 25 26 ; 26 27 ; @keyword ONSPHERE 27 28 ; to specify that the points are located on a 28 ; sphere. In this case, x and y correspond sto longitude and29 ; sphere. In this case, x and y correspond to longitude and 29 30 ; latitude in degrees. 30 31 ; -
trunk/SRC/Interpolation/cutsegment.pro
r231 r242 17 17 ; 18 18 ; @keyword ENDPOINTS 19 ; see outputs19 ; see returns 20 20 ; 21 21 ; @keyword ONSPHERE 22 22 ; to specify that the points are located on a sphere. 23 ; In this case, x and y correspond sto longitude and latitude in degrees.23 ; In this case, x and y correspond to longitude and latitude in degrees. 24 24 ; 25 25 ; @returns … … 30 30 ; 31 31 ; @examples 32 ;33 32 ; IDL> x0=[2,5] 34 33 ; IDL> y0=[5,1] -
trunk/SRC/Interpolation/extrapolate.pro
r238 r242 17 17 ; 18 18 ; @param nb_iteration {in}{optional}{type=integer scalar}{default=10.E20} 19 ; Maximum number if iterations done in the extrapolation process. If there19 ; Maximum number of iterations done in the extrapolation process. If there 20 20 ; is no more masked values we exit extrapolate before reaching nb_iteration 21 21 ; (to be sure to fill everything, you can use a very large value) -
trunk/SRC/Interpolation/extrapsmooth.pro
r238 r242 3 3 ; @file_comments 4 4 ; similar to <pro>extrapolate</pro> but could to the job in a better way 5 ; because the ;extrapolated values are smoothed...5 ; because the extrapolated values are smoothed... 6 6 ; takes more time than <pro>extrapolate</pro>. 7 7 ; extrapolate data where mskin is equal 0 by filling -
trunk/SRC/Interpolation/get_gridparams.pro
r238 r242 6 6 ; 7 7 ; or 8 ; 2) given longitude and latitude arrays get their dimensions and make8 ; 2) given longitude and latitude arrays, get their dimensions and make 9 9 ; sure they are 1D or 2D arrays 10 10 ; … … 24 24 ; @param in1 {in}{required} 25 25 ; Case 1: the name of the netcdf file 26 ; Case 2: 1d or 2 Darrays defining longitudes and latitudes.26 ; Case 2: 1d or 2d arrays defining longitudes and latitudes. 27 27 ; Out: the variable that will contain the longitudes 28 28 ; 29 29 ; @param in2 {in}{required} 30 30 ; Case 1: the name of the variable that contains the longitude in the NetCDF file 31 ; Case 2: 1d or 2 Darrays defining longitudes and latitudes.31 ; Case 2: 1d or 2d arrays defining longitudes and latitudes. 32 32 ; Note that these arrays are also outputs and can therefore be modified. 33 33 ; Out: the variable that will contain the latitudes -
trunk/SRC/Interpolation/imoms3.pro
r231 r242 1 1 ;+ 2 ;3 2 ; 4 3 ; @param xin {in}{required} -
trunk/SRC/Interpolation/inquad.pro
r240 r242 47 47 ; 48 48 ; @returns 49 ; a n element vector. Where n is the number of elements of49 ; a n elements vector where n is the number of elements of 50 50 ; x. res[i]=j means that the point number i is located in the 51 51 ; quadrilateral number j with (0 <= j <= n_elements(x0)-1) -
trunk/SRC/Interpolation/ll_narcs_distances.pro
r238 r242 36 36 ; 37 37 ; @returns 38 ; a (2, 38 ; a (2,n) array containing the longitude/latitude of the resulting points. 39 39 ; Values are in radians unless the keyword DEGREES is set. 40 40 ; -
trunk/SRC/Interpolation/map_npoints.pro
r238 r242 36 36 ; 37 37 ; @keyword TWO_BY_TWO 38 ; If given, then map_npoints returns the distances between number n of39 ; P0 points and number n of P1 points38 ; If given, then <pro>map_npoints</pro> returns the distances between 39 ; number n of P0 points and number n of P1 pointsi. 40 40 ; In that case, np0 and np1 must be equal. 41 41 ; … … 44 44 ; points P0 and np1 points P1. Element (i,j) of the output is the 45 45 ; distance between element P0[i] and P1[j]. 46 ; If keyword /TWO_BY_TWO is given then map_npointsreturns47 ; an np-element vector giving the distance in meter between P0[i]46 ; If keyword /TWO_BY_TWO is given then <pro>map_npoints</pro> returns 47 ; an np-elements vector giving the distance in meter between P0[i] 48 48 ; and P1[i] (in that case, we have np0 = np1 = np) ; if /MIDDLE see this keyword. 49 49 ; @examples … … 105 105 FUNCTION map_npoints, lon0, lat0, lon1, lat1, AZIMUTH = azimuth $ 106 106 , RADIANS = radians, RADIUS = radius, MIDDLE = middle, TWO_BY_TWO = two_by_two 107 107 ; 108 108 compile_opt idl2, strictarrsubs 109 109 ; 110 110 IF (N_PARAMS() LT 4) THEN $ 111 MESSAGE, 'Incorrect number of arguments.'111 ras = report('Incorrect number of arguments.') 112 112 113 113 np0 = n_elements(lon0) 114 114 IF n_elements(lat0) NE np0 THEN $ 115 MESSAGE, 'lon0 and lat0 must have the same number of elements'115 ras = report('lon0 and lat0 must have the same number of elements') 116 116 np1 = n_elements(lon1) 117 117 IF n_elements(lat1) NE np1 THEN $ 118 MESSAGE, 'lon1 and lat1 must have the same number of elements'118 ras = report('lon1 and lat1 must have the same number of elements') 119 119 if keyword_set(two_by_two) AND np0 NE np1 then $ 120 MESSAGE, 'When using two_by_two keyword, P0 and P1 must have the same number of elements'120 ras = report('When using two_by_two keyword, P0 and P1 must have the same number of elements') 121 121 122 122 mx = MAX(ABS([lat0[*], lat1[*]])) 123 123 pi2 = !dpi/2 124 124 IF (mx GT (KEYWORD_SET(radians) ? pi2 : 90)) THEN $ 125 MESSAGE, 'Value of Latitude is out of allowed range.'125 ras = report('Value of Latitude is out of allowed range.') 126 126 127 127 k = KEYWORD_SET(radians) ? 1.0d0 : !dpi/180.0 -
trunk/SRC/Interpolation/neighbor.pro
r238 r242 8 8 ; Maps 9 9 ; 10 ; @param p0lon {in}{required} 11 ; scalar.longitudes of point P0.10 ; @param p0lon {in}{required} {type=scalar} 11 ; longitudes of point P0. 12 12 ; 13 ; @param p0lat {in}{required} 14 ; scalar.latitudes of point P0.13 ; @param p0lat {in}{required} {type=scalar} 14 ; latitudes of point P0. 15 15 ; 16 16 ; @param neighlon {in}{optional} … … 47 47 ;- 48 48 ; 49 FUNCTION neighbor, p0lon, p0lat, neighlon, neighlat, sphere = sphere, distance = distance, radians= radians49 FUNCTION neighbor, p0lon, p0lat, neighlon, neighlat, SPHERE = sphere, DISTANCE = distance, RADIANS = radians 50 50 ; 51 51 compile_opt idl2, strictarrsubs 52 52 ; 53 ; som me checks54 IF n_elements(p0lon) NE 1 THEN MESSAGE, 'Sorry p0lon must be a scalar'53 ; some checks 54 IF n_elements(p0lon) NE 1 THEN ras = report('Sorry p0lon must be a scalar') 55 55 p0lon = p0lon[0] 56 IF n_elements(p0lat) NE 1 THEN MESSAGE, 'Sorry p0lat must be a scalar'56 IF n_elements(p0lat) NE 1 THEN ras = report('Sorry p0lat must be a scalar') 57 57 p0lat = p0lat[0] 58 58 nneig = n_elements(neighlon) 59 59 IF n_elements(neighlat) NE nneig THEN $ 60 MESSAGE, 'neighlon and neighlat must have the same number of elements'60 ras = report('neighlon and neighlat must have the same number of elements') 61 61 ; distance between P0 and the others points 62 62 IF keyword_set(sphere) THEN BEGIN -
trunk/SRC/Interpolation/quadrilateral2square.pro
r238 r242 41 41 ; 42 42 ; @returns 43 ; (2,n) array: the new coordinates (xout, 43 ; (2,n) array: the new coordinates (xout,yout) of the (xin,yin) point(s) after 44 44 ; mapping. 45 45 ; If xin is a scalar, then n is equal to the number of elements of x0. 46 ; If xin is an array 46 ; If xin is an array, then n is equal to the number of elements of xin. 47 47 ; 48 48 ; @restrictions -
trunk/SRC/Interpolation/spl_fstdrv.pro
r238 r242 7 7 ; 8 8 ; Given the arrays X and Y, which tabulate a function (with the X[i] 9 ; ANDY[i] in ascending order), and given an input value X2, the9 ; and Y[i] in ascending order), and given an input value X2, the 10 10 ; <pro>spl_incr</pro> function returns an interpolated value for the given 11 11 ; values of X2. The interpolation method is based on cubic spline, corrected … … 16 16 ; 17 17 ; @param x {in}{required} 18 ; An n-element (at least 2) input vector that specifies the18 ; An n-elements (at least 2) input vector that specifies the 19 19 ; tabulate points in ascending order. 20 20 ; 21 21 ; @param y {in}{required} 22 ; f(x) = y. An n-element input vector that specifies the values22 ; f(x) = y. An n-elements input vector that specifies the values 23 23 ; of the tabulated function F(Xi) corresponding to Xi. 24 24 ; … … 26 26 ; The output from <proidl>SPL_INIT</pro> for the specified X and Y. 27 27 ; 28 ; @param x2 {in}{required} 28 ; @param x2 {in}{required} {type= scalar or array} 29 29 ; The input values for which the first derivative values are desired. 30 ; X can be scalar or an array of values.31 30 ; 32 31 ; @returns -
trunk/SRC/Interpolation/spl_incr.pro
r238 r242 2 2 ; 3 3 ; @file_comments 4 ;5 4 ; Given the arrays X and Y, which tabulate a function (with the X[i] 6 5 ; AND Y[i] in ascending order), and given an input value X2, the … … 10 9 ; 11 10 ; @param x1 {in}{required} 12 ; An n-element (at least 2) input vector that specifies the tabulate points in11 ; An n-elements (at least 2) input vector that specifies the tabulate points in 13 12 ; a strict ascending order. 14 13 ; 15 14 ; @param y1 {in}{required} 16 ; f(x) = y. An n-element input vector that specifies the values15 ; f(x) = y. An n-elements input vector that specifies the values 17 16 ; of the tabulated function F(Xi) corresponding to Xi. As f is 18 17 ; supposed to be monotonically increasing, y values must be … … 28 27 ; 29 28 ; @returns 30 ; 31 ; y2: f(x2) = y2. Double precision array 29 ; y2: f(x2) = y2. Double precision array 32 30 ; 33 31 ; @restrictions … … 36 34 ; 37 35 ; @examples 38 ;39 36 ; IDL> n = 100L 40 37 ; IDL> x = (dindgen(n))^2 … … 87 84 ; 88 85 ; @param x1 {in}{required} 89 ; An n-element (at least 2) input vector that specifies the tabulate points in86 ; An n-elements (at least 2) input vector that specifies the tabulate points in 90 87 ; a strict ascending order. 91 88 ; 92 89 ; @param y1 {in}{required} 93 ; f(x) = y. An n-element input vector that specifies the values90 ; f(x) = y. An n-elements input vector that specifies the values 94 91 ; of the tabulated function F(Xi) corresponding to Xi. As f is 95 92 ; supposed to be monotonically increasing, y values must be … … 101 98 ; 102 99 ; @param der2 100 ; 103 101 ; @param x 104 102 ; … … 135 133 ; point X0. If YP0 is omitted, the second derivative at the 136 134 ; boundary is set to zero, resulting in a "natural spline." 135 ; 137 136 ; @keyword YPN_1 138 137 ; The first derivative of the interpolating function at the -
trunk/SRC/Interpolation/spl_keep_mean.pro
r238 r242 2 2 ; 3 3 ; @file_comments 4 ;5 4 ; Given the arrays X and Y, which tabulate a function (with the X[i] 6 5 ; AND Y[i] in ascending order), and given an input value X2, the 7 ; spl_incrfunction returns an interpolated value for the given values6 ; <pro>spl_incr</pro> function returns an interpolated value for the given values 8 7 ; of X2. The interpolation method is based on cubic spline, corrected 9 8 ; in a way that integral of the interpolated values is the same as the … … 13 12 ; 14 13 ; @param x {in}{required} 15 ; An n-element (at least 2) input vector that specifies the tabulate points in14 ; An n-elements (at least 2) input vector that specifies the tabulate points in 16 15 ; a strict ascending order. 17 16 ; -
trunk/SRC/Interpolation/square2quadrilateral.pro
r238 r242 33 33 ; 34 34 ; @returns 35 ; (2,n) array: the new coordinates (xout, 35 ; (2,n) array: the new coordinates (xout,yout) of the (xin,yin) 36 36 ; point(s) after mapping. 37 37 ; If xin is a scalar, then n is equal to the number of elements of 38 38 ; x0. If xin is an array , then n is equal to the number of 39 39 ; elements of xin. 40 ; If xin and yin are omited, square2quadrilateralreturns the40 ; If xin and yin are omited, <pro>square2quadrilateral</pro> returns the 41 41 ; matrix A which is used for the inverse transformation. 42 42 ;
Note: See TracChangeset
for help on using the changeset viewer.