00001 //--- 00002 // 00003 // This file is part of sedflux. 00004 // 00005 // sedflux 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 // sedflux 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 sedflux; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 // 00019 //--- 00020 00021 #include <stdio.h> 00022 00023 #include <sed/sed_sedflux.h> 00024 #include "my_processes.h" 00025 00026 Sed_process_info 00027 run_slump( Sed_process proc , Sed_cube prof ) 00028 { 00029 Slump_t* data = sed_process_user_data(proc); 00030 Sed_process_info info = SED_EMPTY_INFO; 00031 int i; 00032 Sed_cube fail; 00033 00034 fail = sed_process_use( proc , FAILURE_PROFILE_DATA ); 00035 //fail = data->failure; 00036 00037 // Add the failure to the profile shifted by an amount based 00038 // on the failure length. 00039 for ( i=0 ; i<sed_cube_n_y(fail) ; i++ ) 00040 sed_column_set_y_position( sed_cube_col(fail,i) , 00041 sed_cube_col_y( fail , i ) 00042 + (int)(sed_cube_n_y(fail)/2.) ); 00043 sed_cube_add(prof,fail); 00044 00045 return info; 00046 } 00047