Changeset 136 for trunk/SRC/Interpolation
- Timestamp:
- 07/10/06 17:20:19 (18 years ago)
- Location:
- trunk/SRC/Interpolation
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/angle.pro
r134 r136 1 1 ;--------- 2 2 ;+ 3 ; @file_comments 3 ; @file_comments 4 4 ; north stereographic polar projection 5 5 ; … … 8 8 ; @param pphi {in}{required} 9 9 ; 10 ; @keyword DOUBLE {default=0} use double precision (default is float) 10 ; @keyword DOUBLE {default=0} 11 ; use double precision (default is float) 11 12 ; 12 13 ; @returns -
trunk/SRC/Interpolation/clickincell.pro
r134 r136 1 1 ;+ 2 ; @file_comments 2 ; @file_comments 3 3 ; click on a map and find in which cell the click was 4 4 ; -
trunk/SRC/Interpolation/compute_fromirr_bilinear_weigaddr.pro
r125 r136 1 1 ;+ 2 ; @file_comments 2 ; @file_comments 3 3 ; compute the weight and address needed to interpolate data from 4 4 ; an "irregular 2D grid" (defined as a grid made of quadrilateral cells) … … 7 7 ; @categories interpolation 8 8 ; 9 ; @param olonin {in}{required} longitudeof the input data 10 ; @param olat {in}{required} latitude of the input data 11 ; @param omsk {in}{required} land/se mask of the input data 12 ; @param alonin {in}{required} longitude of the output data 13 ; @param alat {in}{required} latitude of the output data 14 ; @param amsk {in}{required} land/sea mask of the output data 9 ; @param olonin {in}{required} 10 ; longitude of the input data 11 ; 12 ; @param olat {in}{required} 13 ; latitude of the input data 14 ; 15 ; @param omsk {in}{required} 16 ; land/sea mask of the input data 17 ; 18 ; @param alonin {in}{required} 19 ; longitude of the output data 20 ; 21 ; @param alat {in}{required} 22 ; latitude of the output data 23 ; 24 ; @param amsk {in}{required} 25 ; land/sea mask of the output data 15 26 ; 16 27 ; @param weig {out} -
trunk/SRC/Interpolation/compute_fromreg_bilinear_weigaddr.pro
r134 r136 1 1 ;+ 2 ; @file_comments 2 ; @file_comments 3 3 ; compute the weight and address needed to interpolate data from a 4 4 ; "regular grid" to any grid using the bilinear method … … 6 6 ; @categories interpolation 7 7 ; 8 ; @param alonin {in}{required} longitudeof the input data 9 ; @param alatin {in}{required} latitude of the input data 10 ; @param olonin {in}{required} longitude of the output data 11 ; @param olat {in}{required} latitude of the output data 12 ; 13 ; @keyword NONORTHERNLINE activate if you don't want to take into 14 ; account the northen line of the input data when perfoming the 15 ; @keyword NOSOUTHERNLINE activate if you don't want to take into 16 ; account the southern line of the input data when perfoming the 17 ; interpolation. 8 ; @param alonin{in}{required} 9 ; longitude of the input data 10 ; 11 ; @param alatin {in}{required} 12 ; latitude of the input data 13 ; 14 ; @param olonin {in}{required} 15 ; longitude of the output data 16 ; 17 ; @param olat {in}{required} 18 ; latitude of the output data 19 ; 20 ; @keyword NONORTHERNLINE 21 ; activate if you don't want to take into 22 ; account the northen line of the input data when perfoming the interpolation. 23 ; 24 ; @keyword NOSOUTHERNLINE 25 ; activate if you don't want to take into 26 ; account the southern line of the input data when perfoming the interpolation. 18 27 ; 19 28 ; @param weig {out} -
trunk/SRC/Interpolation/compute_fromreg_imoms3_weigaddr.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; compute the weight and address neede to interpolate data from a 5 5 ; "regular grid" to any grid using the imoms3 method … … 7 7 ; @categories interpolation 8 8 ; 9 ; @param alonin {in}{required} longitude of the input data 10 ; @param alatin {in}{required} latitude of the input data 11 ; @param olonin {in}{required} longitude of the output data 12 ; @param olat {in}{required} latitude of the output data 9 ; @param alonin {in}{required} 10 ; longitude of the input data 11 ; 12 ; @param alatin {in}{required} 13 ; latitude of the input data 14 ; 15 ; @param olonin {in}{required} 16 ; longitude of the output data 17 ; @param olat {in}{required} 18 ; latitude of the output data 13 19 ; 14 20 ; @keyword NONORTHERNLINE -
trunk/SRC/Interpolation/cutpar.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; cut p parallelogram(s) into p*n^2 parallelograms 5 5 ; … … 14 14 ; @param x3 {in}{required} 15 15 ; @param y3 {in}{required} 16 ; 1d arrays of p elements, giving the edge positions. The 17 ; edges must be given as in plot to draw the parallelogram. (see 18 ; example). 16 ; 1d arrays of p elements, giving the edge positions. 17 ; The edges must be given as in plot to draw the parallelogram. (see example). 19 18 ; 20 ; @param n {in}{required} each parallelogram will be cutted in n^2 pieces 19 ; @param n {in}{required} 20 ; each parallelogram will be cutted in n^2 pieces 21 21 ; 22 ; @keyword ENDPOINTS see outputs 22 ; @keyword ENDPOINTS 23 ; see outputs 23 24 ; 24 ; @keyword ONSPHERE to specify that the points are located on a 25 ; sphere. In this case, x and y corresponds to longitude and 26 ; latitude in degrees. 25 ; @keyword ONSPHERE 26 ; to specify that the points are located on a 27 ; sphere. In this case, x and y corresponds to longitude and 28 ; latitude in degrees. 27 29 ; 28 30 ; @returns -
trunk/SRC/Interpolation/cutsegment.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; cut p segments into p*n equal parts 5 5 ; … … 12 12 ; 1d arrays of p elements, the coordinates of the endpoints of the p segments 13 13 ; 14 ; @param n {in}{required} the number of pieces we want to cut each segment 14 ; @param n {in}{required} 15 ; the number of pieces we want to cut each segment 15 16 ; 16 ; @keyword ENDPOINTS see ouputs 17 ; @keyword ENDPOINTS 18 ; see ouputs 17 19 ; 18 ; @keyword ONSPHERE to specify that the points are located on a19 ; sphere. In this case, x and y corresponds to longitude and20 ; 20 ; @keyword ONSPHERE 21 ; to specify that the points are located on a sphere. 22 ; In this case, x and y corresponds to longitude and latitude in degrees. 21 23 ; 22 24 ; @returns -
trunk/SRC/Interpolation/extrapolate.pro
r134 r136 1 1 ;+ 2 ; @file_comments 2 ; @file_comments 3 3 ; extrapolate data (zinput) where maskinput eq 0 by filling 4 4 ; step by step the coastline points with the mean value of the 8 neighbourgs. -
trunk/SRC/Interpolation/fromirr.pro
r125 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; interpolate data from an irregular 2D grid to any 2D grid. 5 5 ; Only 1 method available = bilinear … … 7 7 ; @categories interpolation 8 8 ; 9 ; @param method {in}{required} a string defining the interpolation method. must be 'bilinear' 10 ; @param datain {in}{required} a 2D array the input data to interpolate 11 ; @param lonin {in}{optional} a 2D array defining the longitude of the input data 12 ; @param latin {in}{optional} a 2D array defining the latitude of the input data. 13 ; @param mskin {in}{optional} a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land) 14 ; @param lonout {in}{optional} 1D or 2D array defining the longitude of the output data. 15 ; @param latout {in}{optional} 1D or 2D array defining the latitude of the output data. 16 ; @param mskout {in}{required} a 2D array, the land-sea mask of the ouput data (1 on ocean, 0 on land) 9 ; @param method {in}{required} 10 ; a string defining the interpolation method. must be 'bilinear' 11 ; 12 ; @param datain {in}{required} 13 ; a 2D array the input data to interpolate 14 ; 15 ; @param lonin {in}{optional} 16 ; a 2D array defining the longitude of the input data 17 ; 18 ; @param latin {in}{optional} 19 ; a 2D array defining the latitude of the input data. 20 ; 21 ; @param mskin {in}{optional} 22 ; a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land) 23 ; 24 ; @param lonout {in}{optional} 25 ; 1D or 2D array defining the longitude of the output data. 26 ; 27 ; @param latout {in}{optional} 28 ; 1D or 2D array defining the latitude of the output data. 29 ; 30 ; @param mskout {in}{required} 31 ; a 2D array, the land-sea mask of the ouput data (1 on ocean, 0 on land) 17 32 ; 18 33 ; @keyword WEIG (see ADDR) 19 34 ; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 20 ; 35 ; perform the interpolation: 21 36 ; dataout = total(weig*datain[addr], 1) 22 37 ; dataout = reform(dataout, jpio, jpjo, /over) 23 ; 24 ; 25 ; 26 ; 38 ; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 39 ; values will be copied when the current routine exits. Next, they can be used to perform 40 ; the interpolation whithout computing again those 2 parameters. This greatly 41 ; speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary. 27 42 ; 28 ; @returns 2D array the interpolated data 43 ; @returns 44 ; 2D array the interpolated data 29 45 ; 30 46 ; @restrictions -
trunk/SRC/Interpolation/fromreg.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; interpolate data from a "regular/rectangular grid" to any grid. 5 5 ; 2 methods availables: bilinear and imoms3 … … 9 9 ; @categories interpolation 10 10 ; 11 ; @param method {in}{required} a string defining the interpolation method. 12 ; must be 'bilinear' or 'imoms3' 13 ; @param datain {in}{required} a 2D array the input data to interpolate 14 ; @param lonin {in}{optional} 1D or 2D array defining the longitude of the input data 15 ; @param latin {in}{optional} 1D or 2D array defining the latitude of the input data 16 ; @param lonout {in}{optional} 1D or 2D array defining the longitude of the output data 17 ; @param latout {in}{required} 1D or 2D array defining the latitude of the output data 11 ; @param method {in}{required} 12 ; a string defining the interpolation method. 13 ; must be 'bilinear' or 'imoms3' 14 ; 15 ; @param datain {in}{required} 16 ; a 2D array the input data to interpolate 17 ; 18 ; @param lonin {in}{optional} 19 ; 1D or 2D array defining the longitude of the input data 20 ; 21 ; @param latin {in}{optional} 22 ; 1D or 2D array defining the latitude of the input data 23 ; 24 ; @param lonout {in}{optional} 25 ; 1D or 2D array defining the longitude of the output data 26 ; 27 ; @param latout {in}{required} 28 ; 1D or 2D array defining the latitude of the output data 18 29 ; 19 30 ; @keyword WEIG (see ADDR) 20 31 ; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 21 ; 32 ; perform the interpolation: 22 33 ; dataout = total(weig*datain[addr], 1) 23 34 ; dataout = reform(dataout, jpio, jpjo, /over) 24 ; 25 ; 26 ; 27 ; 35 ; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 36 ; values will be copied when the current routine exits. Next, they can be used to perform 37 ; the interpolation whithout computing again those 2 parameters. In that 38 ; case, lonin, latin, lonout and latout are not necessary. 28 39 ; 29 40 ; @keyword NONORTHERNLINE … … 32 43 ; of the input data when perfoming the interpolation. 33 44 ; 34 ; @returns 2D array the interpolated data 45 ; @returns 46 ; 2D array the interpolated data 35 47 ; 36 48 ; @restrictions -
trunk/SRC/Interpolation/get_gridparams.pro
r134 r136 2 2 ; 3 3 ; @file_comments 4 ; 5 ; 6 ; 7 ; 8 ; 9 ; 4 ; 1) extract from a NetCDF file the longitude, latidude, and their dimensions 5 ; and make sure it is 1D or 2D arrays 6 ; 7 ; or 8 ; 2) given longitude and latitude arrays get their dimensions and make 9 ; sure they are 1D or 2D arrays 10 10 ; 11 11 ; @categories interpolation … … 22 22 ; 23 23 ; 1) 24 ; @param in1 {in}{required} the name of the netcdf file 25 ; @param in2 {in}{required} the name of the variable that contains the longitude in the NetCDF file 26 ; @param in3 {in}{required} the name of the variable that contains the latitude in the NetCDF file 27 ; @param in4 {out} the number of points in the longitudinal direction 28 ; @param in5 {out} the number of points in the latitudinal direction 29 ; @param in6 {out} the variable that will contain the longitudes 30 ; @param in7 {out} the variable that will contain the latitudes 31 ; @param in8 {out} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 24 ; @param in1 {in}{required} 25 ; the name of the netcdf file 26 ; 27 ; @param in2 {in}{required} 28 ; the name of the variable that contains the longitude in the NetCDF file 29 ; 30 ; @param in3 {in}{required} 31 ; the name of the variable that contains the latitude in the NetCDF file 32 ; 33 ; @param in4 {out} 34 ; the number of points in the longitudinal direction 35 ; 36 ; @param in5 {out} 37 ; the number of points in the latitudinal direction 38 ; 39 ; @param in6 {out} 40 ; the variable that will contain the longitudes 41 ; 42 ; @param in7 {out} 43 ; the variable that will contain the latitudes 44 ; 45 ; @param in8 {out} 46 ; 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 32 47 ; 33 48 ; or 34 49 ; 35 50 ; 2) 36 ; @param in1 {in}{required} 1d or 2D arrays defining longitudes and latitudes. 37 ; @param in2 {in}{required} 1d or 2D arrays defining longitudes and latitudes. 38 ; Note that these arrays are also outputs and can therefore be modified. 39 40 ; @param in1 {out} the variable that will contain the longitudes 41 ; @param in2 {out} the variable that will contain the latitudes 42 ; @param in3 {in} the number of points in the longitudinal direction 43 ; @param in4 {in} the number of points in the latitudinal direction 44 ; @param in5 {in} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 45 ; arrays or 2D arrays (jpi,jpj). Note that of n_dimensions = 1, then the 46 ; grid must be regular (each longitudes must be the same for all latitudes 47 ; and each latitudes should be the sae for all longitudes). 48 ; 49 ; @keyword DOUBLE use double precision to perform the computation 51 ; @param in1 {in}{required} 52 ; 1d or 2D arrays defining longitudes and latitudes. 53 ; 54 ; @param in2 {in}{required} 55 ; 1d or 2D arrays defining longitudes and latitudes. 56 ; Note that these arrays are also outputs and can therefore be modified. 57 ; 58 ; @param in1 {out} 59 ; the variable that will contain the longitudes 60 ; 61 ; @param in2 {out} 62 ; the variable that will contain the latitudes 63 ; 64 ; @param in3 {in} 65 ; the number of points in the longitudinal direction 66 ; 67 ; @param in4 {in} 68 ; the number of points in the latitudinal direction 69 ; 70 ; @param in5 {in} 71 ; 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 72 ; arrays or 2D arrays (jpi,jpj). Note that of n_dimensions = 1, then the 73 ; grid must be regular (each longitudes must be the same for all latitudes 74 ; and each latitudes should be the sae for all longitudes). 75 ; 76 ; @keyword DOUBLE 77 ; use double precision to perform the computation 50 78 ; 51 79 ; @examples -
trunk/SRC/Interpolation/inquad.pro
r134 r136 1 1 ;+ 2 ; @file_comments 2 ; @file_comments 3 3 ; to find if an (x,y) point is in a quadrilateral (x1,x2,x3,x4) 4 4 ; … … 7 7 ; @param x {in}{required} 8 8 ; @param y {in}{required} 9 ; 10 ; 9 ; the coordinates of the point we want to know where it is. 10 ; Must be a scalar if /ONSPHERE activated else can be scalar or array. 11 11 ; 12 12 ; @param x1 {in}{required} … … 18 18 ; @param x4 {in}{required} 19 19 ; @param y4 {in}{required} 20 ; the coordinates of the quadrilateral given in the CLOCKWISE order. 21 ; Scalar or array. 22 ; 23 ; @keyword DOUBLE use double precision to perform the computation 24 ; 25 ; @keyword ONSPHERE to specify that the quadilateral are on a sphere and 26 ; that teir coordinates are longitude-latitude coordinates. In this 27 ; case, est-west periodicity, poles singularity and other pbs 28 ; related to longitude-latitude coordinates are managed 29 ; automatically. 20 ; the coordinates of the quadrilateral given in the CLOCKWISE order. 21 ; Scalar or array. 22 ; 23 ; @keyword DOUBLE 24 ; use double precision to perform the computation 25 ; 26 ; @keyword ONSPHERE 27 ; to specify that the quadilateral are on a sphere and 28 ; that teir coordinates are longitude-latitude coordinates. In this 29 ; case, est-west periodicity, poles singularity and other pbs 30 ; related to longitude-latitude coordinates are managed 31 ; automatically. 30 32 ; 31 33 ; @keyword ZOOMRADIUS {default=4} 32 34 ; the zoom (circle centred on the (x,y) with a radius of 33 ; zoomradius degree where we look for the the quadrilateral which 34 ; contains the (x,y) point) used for the satellite projection 35 ; when /ONSPHERE is activated. 36 ; 4 seems to be the minimum which can be used. 37 ; Can be increase if the cell size is larger than 5 degrees. 38 ; 39 ; @keyword NOPRINT to suppress the print messages. 35 ; zoomradius degree where we look for the the quadrilateral which 36 ; contains the (x,y) point) used for the satellite projection 37 ; when /ONSPHERE is activated. 38 ; 4 seems to be the minimum which can be used. 39 ; Can be increase if the cell size is larger than 5 degrees. 40 ; 41 ; @keyword NOPRINT 42 ; to suppress the print messages. 40 43 ; 41 44 ; @keyword NEWCOORD 42 45 ; 43 46 ; @returns 44 ; 45 ; 46 ; 47 ; a n element vector. Where n is the number of elements of 48 ; x. res[i]=j means that the point number i is located in the 49 ; quadrilateral number j with (0 <= j <= n_elements(x0)-1) 47 50 ; 48 51 ; @restrictions … … 67 70 ; IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 68 71 ; 69 ; 72 ; On a sphere see clickincell.pro... 70 73 ; 71 74 ; @history … … 292 295 ; point 293 296 found = temporary(found)/ntofind 294 ; found must be sorted accordin dto forsort297 ; found must be sorted according to forsort 295 298 found = found[sort(forsort)] 296 299 ENDELSE -
trunk/SRC/Interpolation/inrecgrid.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; given - a list of points, (x,y) position 5 5 ; - the x and y limits of a rectangular grid … … 24 24 ; @keyword OUTPUT2D 25 25 ; to get the output as a 2d array (2,n_elements(x1d)), 26 ; with res[0,*] the x index accoring to the 1d array defined by 27 ; left and res[1,*] the y index accoring to the 1d array defined by 28 ; bottom. 26 ; with res[0,*] the x index according to the 1d array defined by 27 ; left and res[1,*] the y index according to the 1d array defined by bottom. 29 28 ; 30 29 ; @keyword CHECKOUT 31 30 ; = [rbgrid,ubgrid] specify the right and upper boundaries of 32 ; 31 ; the grid and check if some points are out. 33 32 ; 34 33 ; @returns 35 ; the index on the cell accor ing to the 2d array defined by left and bottom.34 ; the index on the cell according to the 2d array defined by left and bottom. 36 35 ; 37 36 ; @examples -
trunk/SRC/Interpolation/ll_narcs_distances.pro
r134 r136 8 8 ; 9 9 ; Formula from Map Projections - a working manual. USGS paper 10 ; 1395. 10 ; 1395. Equations (5-5) and (5-6). 11 11 ; 12 12 ; @categories Mapping, geography -
trunk/SRC/Interpolation/map_npoints.pro
r134 r136 1 ;+ 2 ; 3 ; @file_comments 4 ; Return the distance in meter between all np0 points P0 and all 5 ; np1 points P1 on a sphere. If keyword /TWO_BY_TWO is given then 6 ; returns the distances between number n of P0 points and number 1 ;+ 2 ; 3 ; @file_comments 4 ; Return the distance in meter between all np0 points P0 and all 5 ; np1 points P1 on a sphere. If keyword /TWO_BY_TWO is given then 6 ; returns the distances between number n of P0 points and number 7 7 ; n of P1 points (in that case, np0 and np1 must be equal). 8 8 ; Same as map_2points with the meter parameter but for n points … … 46 46 ; an np-element vector giving the distance in meter between P0[i] 47 47 ; and P1[i] (in that case, we have np0 = np1 = np) ; if /MIDDLE see this keyword. 48 ;49 48 ; @examples 50 49 ; IDL> print, $ -
trunk/SRC/Interpolation/neighbor.pro
r134 r136 7 7 ; @categories Maps 8 8 ; 9 ; @param p0lon {in}{required} scalar. longitudes of point P0. 10 ; @param p0lat {in}{required} scalar. latitudes of point P0. 9 ; @param p0lon {in}{required} 10 ; scalar. longitudes of point P0. 11 ; 12 ; @param p0lat {in}{required} 13 ; scalar. latitudes of point P0. 14 ; 11 15 ; @param neighlon {in}{optional} 16 ; 12 17 ; @param neighlat {in}{optional} 13 18 ; -
trunk/SRC/Interpolation/quadrilateral2square.pro
r134 r136 28 28 ; given in the anticlockwise order. 29 29 ; 30 ; @param xxin {in}{required} the coordinates of the point(s) for which we want to do the mapping. Can be scalar or array. 31 ; @param yyin {in}{required} the coordinates of the point(s) for which we want to do the mapping. Can be scalar or array. 30 ; @param xxin {in}{required} 31 ; the coordinates of the point(s) for which we want to do the mapping. 32 ; Can be scalar or array. 33 ; 34 ; @param yyin {in}{required} 35 ; the coordinates of the point(s) for which we want to do the mapping. 36 ; Can be scalar or array. 32 37 ; 33 38 ; @keyword PERF … … 35 40 ; @returns 36 41 ; 37 ; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) 38 ; point(s) after mapping. 39 ; If xin is a scalar, then n is equal to the number of elements of 40 ; x0. If xin is an array , then n is equal to the number of 41 ; elements of xin. 42 ; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) point(s) after 43 ; mapping. 44 ; If xin is a scalar, then n is equal to the number of elements of x0. 45 ; If xin is an array , then n is equal to the number of elements of xin. 42 46 ; 43 47 ; @restrictions -
trunk/SRC/Interpolation/spl_incr.pro
r134 r136 18 18 ; @param y1 {in}{required} 19 19 ; f(x) = y. An n-element input vector that specifies the values 20 ; 21 ; 22 ; 20 ; of the tabulated function F(Xi) corresponding to Xi. As f is 21 ; supposed to be monotonically increasing, y values must be 22 ; monotonically increasing. y can have equal consecutive values. 23 23 ; 24 24 ; @param x2 {in}{required} … … 27 27 ; 28 28 ; @param der2 29 ; 29 30 ; @param x 30 31 ; … … 34 35 ; 35 36 ; @restrictions 36 ; 37 ; 37 ; It might be possible that y2[i+1]-y2[i] has very small negative 38 ; values (amplitude smaller than 1.e-6)... 38 39 ; 39 40 ; @examples -
trunk/SRC/Interpolation/spl_keep_mean.pro
r134 r136 41 41 ; 42 42 ; @returns 43 ; 44 ; y2: the meean value between two consecutive values of x2. This 45 ; array has one element less than y2. y2 has double precision. 43 ; y2: the mean value between two consecutive values of x2. This 44 ; array has one element less than y2. y2 has double precision. 46 45 ; 47 46 ; @restrictions 48 ; It might be possible that y2 has very small negative values 49 ; (amplitude smaller than 1.e-6)... 50 ; 47 ; It might be possible that y2 has very small negative values 48 ; (amplitude smaller than 1.e-6)... 51 49 ; 52 50 ; @examples -
trunk/SRC/Interpolation/square2quadrilateral.pro
r134 r136 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; warm (or map) a unit square onto an arbitrary quadrilateral 5 5 ; according to the 4-point correspondences: … … 14 14 ; @categories image, grid manipulation 15 15 ; 16 ; @param x0in {in}{required} the coordinates of the quadrilateral 17 ; (see above for correspondance with the unit square). Can be 18 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 19 ; given in the anticlockwise order. 20 ; @param y0in {in}{required} the coordinates of the quadrilateral 21 ; (see above for correspondance with the unit square). Can be 22 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 23 ; given in the anticlockwise order. 24 ; @param x1in {in}{required} the coordinates of the quadrilateral 25 ; (see above for correspondance with the unit square). Can be 26 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 27 ; given in the anticlockwise order. 28 ; @param y1in {in}{required} the coordinates of the quadrilateral 29 ; (see above for correspondance with the unit square). Can be 30 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 31 ; given in the anticlockwise order. 32 ; @param x2in {in}{required} the coordinates of the quadrilateral 33 ; (see above for correspondance with the unit square). Can be 34 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 35 ; given in the anticlockwise order. 36 ; @param y2in {in}{required} the coordinates of the quadrilateral 37 ; (see above for correspondance with the unit square). Can be 38 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 39 ; given in the anticlockwise order. 40 ; @param x3in {in}{required} the coordinates of the quadrilateral 41 ; (see above for correspondance with the unit square). Can be 42 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 43 ; given in the anticlockwise order. 44 ; @param y3in {in}{required} the coordinates of the quadrilateral 45 ; (see above for correspondance with the unit square). Can be 46 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 47 ; given in the anticlockwise order. 16 ; @param x0in {in}{required} 17 ; @param y0in {in}{required} 18 ; @param x1in {in}{required} 19 ; @param y1in {in}{required} 20 ; @param x2in {in}{required} 21 ; @param y2in {in}{required} 22 ; @param x3in {in}{required} 23 ; @param y3in {in}{required} 24 ; the coordinates of the quadrilateral (see above for correspondance with the 25 ; unit square). 26 ; Can be scalar or array. 27 ; (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are given in the anticlockwise order. 48 28 ; 49 ; @param xxin {in}{optional} the coordinates of the point(s) for which we want to do the50 ; mapping. Can be scalar or array.51 ; @param yyin {in}{optional} the coordinates of the point(s) for which we want to do the52 ; mapping. Can be scalar or array.29 ; 30 ; @param xxin {in}{optional} 31 ; @param yyin {in}{optional} 32 ; the coordinates of the point(s) for which we want to do the mapping. 53 33 ; 54 34 ; @returns 35 ; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) 36 ; point(s) after mapping. 37 ; If xin is a scalar, then n is equal to the number of elements of 38 ; x0. If xin is an array , then n is equal to the number of 39 ; elements of xin. 40 ; If xin and yin are omited, square2quadrilateral returns the 41 ; matrix A which is used for the inverse transformation. 55 42 ; 56 ; (2,n) array: the new coodinates (xout, yout) of the (xin,yin) 57 ; point(s) after mapping. 58 ; If xin is a scalar, then n is equal to the number of elements of 59 ; x0. If xin is an array , then n is equal to the number of 60 ; elements of xin. 61 ; If xin and yin are omited, square2quadrilateral returns the 62 ; matrix A which is used for the inverse transformation. 63 ; 64 ; 65 ; @restrictions I think degenerated quadrilateral (e.g. flat of 66 ; twisted) is not work. This has to be tested. 43 ; @restrictions 44 ; I think degenerated quadrilateral (e.g. flat of twisted) is not work. 45 ; This has to be tested. 67 46 ; 68 47 ; @examples
Note: See TracChangeset
for help on using the changeset viewer.