00001 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* vim:set sw=2 sts=2 et cin: */ 00003 /* 00004 * This file is part of the MUSE Instrument Pipeline 00005 * Copyright (C) 2005-2014 European Southern Observatory 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef MUSE_TRACING_H 00023 #define MUSE_TRACING_H 00024 00025 /*----------------------------------------------------------------------------* 00026 * Includes * 00027 *----------------------------------------------------------------------------*/ 00028 #include <cpl.h> 00029 00030 #include "muse_image.h" 00031 00032 /*----------------------------------------------------------------------------* 00033 * Defines * 00034 *----------------------------------------------------------------------------*/ 00035 00036 /*----------------------------------------------------------------------------* 00037 * parameters for tracing * 00038 *----------------------------------------------------------------------------*/ 00039 #define TRACE_BINSIZE 55 /* half length of the bin in which to locate the midpoint */ 00040 00041 #define MUSE_TRACE_NPOLY 3 /* number of polynomial solutions * 00042 * (center, left, and right) */ 00043 enum muse_trace_poly { 00044 MUSE_TRACE_CENTER = 0, 00045 MUSE_TRACE_LEFT, 00046 MUSE_TRACE_RIGHT 00047 }; 00048 00049 /*----------------------------------------------------------------------------* 00050 * Function prototypes * 00051 *----------------------------------------------------------------------------*/ 00052 cpl_vector *muse_trace_locate_slices(cpl_vector *, const unsigned short, double, const unsigned char); 00053 double muse_trace_edgefinder(const cpl_vector *, double, double *, double *, cpl_boolean *, const unsigned char); 00054 cpl_table *muse_trace(const muse_image *, int, double, int, cpl_table **); 00055 int muse_trace_table_get_order(const cpl_table *); 00056 cpl_polynomial **muse_trace_table_get_polys_for_slice(const cpl_table *, const unsigned short); 00057 void muse_trace_polys_delete(cpl_polynomial *[]); 00058 00059 cpl_error_code muse_trace_plot_samples(cpl_table *, cpl_table *, unsigned short, unsigned short, unsigned char, muse_image *); 00060 cpl_error_code muse_trace_plot_widths(cpl_table *, unsigned short, unsigned short, unsigned char); 00061 00062 #endif /* MUSE_TRACING_H */
1.6.1