create_table_4.c

00001 /*
00002 
00003 $Id: create_table_4.c,v 1.4 2007/05/03 11:15:34 jim Exp $
00004 
00005 */
00006 
00007 #include <stdio.h>
00008 #include <math.h>
00009 #include "imcore.h"
00010 #include "util.h"
00011 #include "../vircam_fits.h"
00012 
00013 extern void tabinit_4(ap_t *ap) {
00014     long npts,i;
00015     cpl_binary *opm;
00016 
00017     /* The output table doesn't exist */
00018 
00019     tab = NULL;
00020     npts = (ap->lsiz)*(ap->csiz);
00021     ap->opmask = cpl_mask_new(ap->lsiz,ap->csiz);
00022     opm = cpl_mask_get_data(ap->opmask);
00023     for (i = 0; i < npts; i++) 
00024         opm[i] = 0;
00025 
00026     /* Undefined RA and Dec columns */
00027 
00028     imcore_xcol = -1;
00029     imcore_ycol = -1;
00030     
00031 }
00032 
00033 extern int do_seeing_4(ap_t *ap) {
00034 
00035     /* Get out of here */
00036 
00037     ap->fwhm = 0.0;
00038     return(VIR_OK);
00039 }
00040         
00041 
00042 extern int process_results_4(ap_t *ap) {
00043     int i,j,np;
00044     long nx;
00045     plstruct *plarray;
00046     cpl_binary *opm;
00047 
00048     /* Loop for each object in the array */
00049 
00050     opm = cpl_mask_get_data(ap->opmask);
00051     plarray = ap->plarray;
00052     np = ap->npl_pix;
00053     nx = ap->lsiz;
00054     for (i = 0; i < np; i++) {
00055         j = nx*(plarray[i].y - 1) + plarray[i].x - 1;
00056         opm[j] = 1;
00057     }
00058 
00059     /* Get outta here */
00060 
00061     return(VIR_OK);
00062 }
00063 
00064 extern int tabclose_4(ap_t *ap) {
00065 
00066     cpl_image_reject_from_mask(ap->inframe,ap->opmask);
00067     cpl_mask_delete(ap->opmask);
00068     return(VIR_OK);
00069 }
00070 
00071 /*
00072 
00073 $Log: create_table_4.c,v $
00074 Revision 1.4  2007/05/03 11:15:34  jim
00075 Fixed little problem with table wcs
00076 
00077 Revision 1.3  2007/05/02 09:11:35  jim
00078 Modified to allow for inclusion of table WCS keywords into FITS header
00079 
00080 Revision 1.2  2006/03/01 10:31:29  jim
00081 Now uses new vir_fits objects
00082 
00083 Revision 1.1  2005/09/13 13:25:28  jim
00084 Initial entry after modifications to make cpl compliant
00085 
00086 
00087 */

Generated on Wed Apr 10 04:01:54 2013 for VIRCAM Pipeline by  doxygen 1.5.1