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

focus/source/comp_shift.c

Go to the documentation of this file.
00001 /* === Doxygen Comment ======================================= */
00013 /* =========================================================== */
00014 
00015 #include <IFU_io.h>
00016 #include <IFU_math.h>
00017 #include <snifs.h>
00018 #include <focus.h>
00019 #include "../../extract/incl/extract.h" /* Probably not the right way... */
00020 
00021 #define ARCWIDTH 128 
00022 
00023 /* === Doxygen Comment ======================================= */
00037 /* =========================================================== */
00038 
00039 int main(int argc, char **argv)
00040 {
00041   char **argval, **arglabel;
00042   char *refname, *arcname;
00043 
00044   int status;
00045 
00046   float ref_airmass, cal_airmass, cal_jdate;
00047 
00048   double shift[2];
00049   
00050   set_purpose("Compute offset between two arc exposures");
00051   set_arglist("-ref none -arc|cal none");
00052 
00053   init_snifs("$Name:  $");
00054   init_session(argv,argc,&arglabel,&argval);
00055   
00056   if (DEBUG) {
00057     print_msg("$Id: comp_shift.c,v 1.5 2004/10/06 16:56:31 ycopin Exp $");
00058     print_msg("Compilation: %s, %s",__DATE__,__TIME__);
00059   }
00060 
00061   /* ===== Parameters ============================== */
00062   
00063   refname = argval[0];
00064   arcname = argval[1];
00065 
00066   /* ===== Work ============================== */
00067 
00068   status = comp_calibration_offsets(refname, &ref_airmass, 
00069                                     arcname, &cal_airmass, &cal_jdate,
00070                                     NULL, NULL, NULL,
00071                                     shift);
00072 
00073   if (!status) {
00074     if (VERBOSE) 
00075       print_msg("Calibration offset: %.2f x %.2f px",shift[0],shift[1]);
00076     else {
00077       printf("%f,%f\n",shift[0],shift[1]);
00078       fflush(stdout);
00079     }    
00080   }
00081   
00082   exit_session(status);
00083   return(status);
00084 }

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