Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

extract/source/offset_max.c

Go to the documentation of this file.
00001 /* === Doxygen Comment ======================================= */
00015 /* =========================================================== */
00016 
00017 #include <IFU_io.h>
00018 
00019 int main(int argc, char **argv)
00020 {
00021   Maxima_Set maxset;
00022 
00023   int i,j;
00024   float dx,dy;
00025   char *maxname;
00026   char **argval, **arglabel;
00027 
00028   set_arglist("-max max -offset 2047,4095");
00029 
00030   init_session(argv,argc,&arglabel,&argval);
00031   maxname = argval[0];
00032   sscanf(argval[1], "%f,%f", &dx, &dy);
00033 
00034   load_TIGER_max(&maxset,maxname);
00035 
00036   print_msg("Max %s: %d lines [%.1f-%.1f]", maxname, maxset.nb_ycoords,
00037             maxset.line[0].ycoord,maxset.line[maxset.nb_ycoords-1].ycoord);
00038   print_msg("Offset: %.1fx%.1f",dx,dy);
00039 
00040   for (j=0; j<maxset.nb_ycoords; j++) {
00041     maxset.line[j].ycoord -= dy;
00042     for (i=0; i<maxset.line[j].nb_max; i++) {
00043       maxset.line[j].maxima[i].xcoord -= dx;
00044     }
00045   }
00046   save_TIGER_max(&maxset,maxname);
00047 
00048   return(OK);
00049 }

Generated on Tue Nov 23 18:04:20 2004 for Snifs by doxygen 1.3.3