/* @(#)extract_cuts.c 17.1.1.1 (ESO-IPG) 01/25/02 17:51:58 */ /* Otmar Stahl extract_cuts.c extract lines from echelle spectrum IN: imno: input frame first_cut: first cut in y cut_step : step in y cut_nr: number of cuts npix: size of input frame OUT: imageo: array holding output, space must be reserved */ /* general Midas includes */ #include int extract_cuts #ifdef __STDC__ ( int imno, int first_cut, int cut_step, int cut_nr, float imageo[], int npix[] ) #else ( imno, first_cut, cut_step, cut_nr, imageo, npix ) int imno, first_cut, cut_step, cut_nr, npix[]; float imageo[]; #endif { float *buffer; int i, j, jj, actvals, pix_step, k, kk, l; buffer = (float *)osmmget(npix[0] * sizeof(float)); pix_step = cut_step * npix[0]; j = -npix[0]; jj = (first_cut + 1)* npix[0] + 1; for(i = 0; i < cut_nr; i++) { /* -1 0 + 1 */ /* kk = jj - npix[0]; */ kk = jj; j = j + npix[0]; /* average three lines */ for(k = 0; k