VIRCAM Pipeline  2.3.12
casu_imstack-test.c
1 /* $Id: casu_imstack-test.c,v 1.3 2015/11/27 12:39:55 jim Exp $
2  *
3  * This file is part of the CASU Pipeline utilities
4  * Copyright (C) 2015 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: jim $
23  * $Date: 2015/11/27 12:39:55 $
24  * $Revision: 1.3 $
25  * $Name: $
26  */
27 
28 #include <stdio.h>
29 #include <stdlib.h>
30 
31 #include <cpl_init.h>
32 #include <cpl_test.h>
33 #include <casu_tfits.h>
34 #include <casu_utils.h>
35 #include <casu_mods.h>
36 
37 int main(void) {
38  int status,retval;
39  casu_fits *out,*outc,*outv;
40 
41  /* Initialise */
42 
43  cpl_test_init(PACKAGE_BUGREPORT,CPL_MSG_WARNING);
44 
45  /* Check inherited status only. This is too complicated to do a noddy
46  test. Do a proper regression test later */
47 
48  status = CASU_FATAL;
49  retval = casu_imstack(NULL,NULL,NULL,NULL,100,100,5.0,5.0,1,0,1,0,
50  "EXPTIME",&out,&outc,&outv,&status);
51  cpl_test_eq(status,CASU_FATAL);
52  cpl_test_eq(status,retval);
53  cpl_test_null(out);
54  cpl_test_null(outc);
55  cpl_test_null(outv);
56  status = CASU_OK;
57  retval = casu_imstack(NULL,NULL,NULL,NULL,0,100,5.0,5.0,1,0,1,0,
58  "EXPTIME",&out,&outc,&outv,&status);
59  cpl_test_eq(status,CASU_FATAL);
60  cpl_test_eq(status,retval);
61  cpl_test_null(out);
62  cpl_test_null(outc);
63  cpl_test_null(outv);
64 
65  return(cpl_test_end(0));
66 }
67 
68 /*
69 
70 $Log: casu_imstack-test.c,v $
71 Revision 1.3 2015/11/27 12:39:55 jim
72 Added extra unmap parameter to imstack calls
73 
74 Revision 1.2 2015/08/07 13:06:54 jim
75 Fixed copyright to ESO
76 
77 Revision 1.1.1.1 2015/06/12 10:44:32 jim
78 Initial import
79 
80 Revision 1.1 2015/01/09 11:39:55 jim
81 new entry
82 
83 
84 */
int casu_imstack(casu_fits **inf, casu_fits **inconf, casu_fits **invar, casu_tfits **cats, int nimages, int nconfs, float lthr, float hthr, int method, int seeing, int fast, int unmap, const char *expkey, casu_fits **out, casu_fits **outc, casu_fits **outv, int *status)
Stack images into a mean image using WCS info.
Definition: casu_imstack.c:187