/*-------------------------------------------------------------------------------------------------*/ /* ANSI C99 CODE TO PRODUCE HMI FILTER TRANSMISSION PROFILES */ /* */ /* Author: Sebastien Couvidat */ /* Mostly based on code by Jesper Schou */ /* version 2.0 April 11, 2009 */ /* */ /*-------------------------------------------------------------------------------------------------*/ #include #include #include /*-----------------------------------------------------------------------------*/ /* Function to perform linear interpolation */ /* (found on the internet !) */ /* returns the values yinterp at points x of 1D function yv (at the points xv) */ /*-----------------------------------------------------------------------------*/ void lininterp1f(double *yinterp, float *xv, float *yv, double *x, double ydefault, int m, int minterp) { int i, j; int nrowsinterp, nrowsdata; nrowsinterp = minterp; nrowsdata = m; for (i=0; i xv[nrowsdata-1])) yinterp[i] = ydefault; else { for(j=1; j