FORS Pipeline Reference Manual 4.9.9
|
00001 /* $Id: fors_setting-test.c,v 1.2 2007/09/27 12:48:52 jmlarsen Exp $ 00002 * 00003 * This file is part of the FORS Library 00004 * Copyright (C) 2002-2006 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 /* 00022 * $Author: jmlarsen $ 00023 * $Date: 2007/09/27 12:48:52 $ 00024 * $Revision: 1.2 $ 00025 * $Name: fors-4_9_9 $ 00026 */ 00027 00028 #ifdef HAVE_CONFIG_H 00029 #include <config.h> 00030 #endif 00031 00032 #include <fors_setting.h> 00033 00034 #include <fors_dfs.h> 00035 00036 #include <test_simulate.h> 00037 #include <test.h> 00038 00039 #include <cpl.h> 00040 00047 #undef cleanup 00048 #define cleanup \ 00049 do { \ 00050 fors_setting_delete(&setting); \ 00051 cpl_frame_delete(sflat); \ 00052 } while (0) 00053 00056 static void 00057 test_setting(void) 00058 { 00059 fors_setting *setting = NULL; 00060 double exptime = 1.0; 00061 cpl_frame *sflat = create_sky_flat("setting_raw.fits", 00062 SKY_FLAT_IMG, CPL_FRAME_GROUP_RAW, 00063 exptime); 00064 00065 setting = fors_setting_new(sflat); 00066 00067 test_rel(setting->exposure_time, exptime, 0.001); 00068 00069 cleanup; 00070 return; 00071 } 00072 00076 int main(void) 00077 { 00078 TEST_INIT; 00079 00080 /* cpl_msg_set_level(CPL_MSG_DEBUG); */ 00081 test_setting(); 00082 00083 TEST_END; 00084 } 00085