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 shift[2];
00047   float cal_airmass, cal_jdate;
00048   
00049   set_purpose("Compute offset between two arc exposures");
00050   set_arglist("-ref none -arc|cal none");
00051 
00052   init_snifs("$Name:  $","$Revision: 1.8 $");
00053   init_session(argv,argc,&arglabel,&argval);
00054   
00055   if (DEBUG) {
00056     print_msg("$Id: comp_shift.c,v 1.8 2005/10/05 22:44:29 ycopin Exp $");
00057     print_msg("Compilation: %s, %s",__DATE__,__TIME__);
00058   }
00059 
00060   /* ===== Parameters ============================== */
00061   
00062   refname = argval[0];
00063   arcname = argval[1];
00064 
00065   /* ===== Work ============================== */
00066 
00067   status = comp_calibration_offsets(refname, 
00068                                     arcname, &cal_airmass, &cal_jdate,
00069                                     NULL, NULL, NULL, shift);
00070 
00071   if (!status) {
00072     if (VERBOSE) 
00073       print_msg("Calibration offset: %.2f x %.2f px",shift[0],shift[1]);
00074     else {
00075       printf("%f,%f\n",shift[0],shift[1]);
00076       fflush(stdout);
00077     }    
00078   }
00079   
00080   exit_session(status);
00081   return(status);
00082 }

Generated on Wed Oct 26 23:59:39 2005 for Snifs by doxygen 1.3.5