1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
/*
* Copyright (c) 2002, 2017 Jens Keiner, Stefan Kunis, Daniel Potts
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "api.h"
#if defined(DIRAC_DELTA)
static const INT m2K_[] = {0};
#elif defined(GAUSSIAN)
static const INT m2K_[] = {0, 1, 3, 6, 7, 9, 11, 13, 15, 17, 19, 21, 22, 23, 24};
#elif defined(B_SPLINE)
static const INT m2K_[] = {0, 0, 4, 7, 10, 13, 15, 17, 19, 22, 24};
#elif defined(SINC_POWER)
static const INT m2K_[] = {0, 0, 2, 5, 8, 11, 12, 14, 16, 18, 21, 23, 24, 24};
#else /* Kaiser-Bessel is the default. */
static const INT m2K_[] = {1, 3, 7, 9, 14, 17, 20, 23, 24};
#endif
/**
* Returns an appropriate value of the parameter K used with the PRE_LIN_PSI
* flag for a given value of the cut-off parameter m.
*/
INT Y(m2K)(const INT m)
{
int j = MIN(((int)(m)), ((int)((sizeof(m2K_) / sizeof(m2K_[0])) - 1)));
return (INT)((1U << m2K_[j]) * (m + 2));
}
/**
* Returns the default window cut off m for the selected window
*/
NFFT_INT Y(get_default_window_cut_off)()
{
return (NFFT_INT)(WINDOW_HELP_ESTIMATE_m);
}
const char *Y(get_window_name)()
{
return STRINGIZE(WINDOW_NAME);
}
|