fors_subtract_bias.c

00001 /*
00002  * This file is part of the FORS Data Reduction Pipeline
00003  * Copyright (C) 2002-2010 European Southern Observatory
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #ifdef HAVE_CONFIG_H
00021 #include <config.h>
00022 #endif
00023 
00024 #include "fors_utils.h"
00025 #include "fors_image.h"
00026 
00027 
00028 #undef cleanup
00029 #define cleanup 
00030 
00035 void fors_subtract_bias(fors_image * image,
00036                         const fors_image *bias)
00037 {
00038     /* Variance is now (image_noise**2  +  bias_noise**2) */
00039     fors_image_subtract(image, bias);
00040 
00041     assure( !cpl_error_get_code(), return ,  "Bias subtraction failed" );
00042 
00043 }
00044 
00045 void fors_subtract_bias_imglist(fors_image_list * imglist,
00046                                 const fors_image *bias)
00047 {
00048     
00049     fors_image * img = fors_image_list_first(imglist);
00050     for(int i = 0; i< fors_image_list_size(imglist); i++)
00051     {
00052         fors_subtract_bias(img, bias);
00053         img =  fors_image_list_next(imglist);
00054     }
00055 
00056     assure( !cpl_error_get_code(), return ,  "Bias subtraction failed" );
00057 
00058 }

Generated on 12 Feb 2016 for FORS Pipeline Reference Manual by  doxygen 1.6.1