"Fossies" - the Fresh Open Source Software Archive

Member "gnuastro-0.8/bin/convolve/args.h" (20 Dec 2018, 5010 Bytes) of package /linux/privat/gnuastro-0.8.tar.lz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "args.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 0.7_vs_0.8.

    1 /*********************************************************************
    2 Convolve - Convolve input data with a given kernel.
    3 Convolve is part of GNU Astronomy Utilities (Gnuastro) package.
    4 
    5 Original author:
    6      Mohammad Akhlaghi <mohammad@akhlaghi.org>
    7 Contributing author(s):
    8 Copyright (C) 2015-2018, Free Software Foundation, Inc.
    9 
   10 Gnuastro is free software: you can redistribute it and/or modify it
   11 under the terms of the GNU General Public License as published by the
   12 Free Software Foundation, either version 3 of the License, or (at your
   13 option) any later version.
   14 
   15 Gnuastro is distributed in the hope that it will be useful, but
   16 WITHOUT ANY WARRANTY; without even the implied warranty of
   17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   18 General Public License for more details.
   19 
   20 You should have received a copy of the GNU General Public License
   21 along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
   22 **********************************************************************/
   23 #ifndef ARGS_H
   24 #define ARGS_H
   25 
   26 
   27 
   28 
   29 
   30 
   31 /* Array of acceptable options. */
   32 struct argp_option program_options[] =
   33   {
   34     /* Inputs */
   35     {
   36       "kernel",
   37       UI_KEY_KERNEL,
   38       "STR",
   39       0,
   40       "File name of kernel for convolution.",
   41       GAL_OPTIONS_GROUP_INPUT,
   42       &p->kernelname,
   43       GAL_TYPE_STRING,
   44       GAL_OPTIONS_RANGE_ANY,
   45       GAL_OPTIONS_NOT_MANDATORY,
   46       GAL_OPTIONS_NOT_SET
   47     },
   48     {
   49       "column",
   50       UI_KEY_COLUMN,
   51       "STR",
   52       0,
   53       "Column name or number if input is a table.",
   54       GAL_OPTIONS_GROUP_INPUT,
   55       &p->column,
   56       GAL_TYPE_STRING,
   57       GAL_OPTIONS_RANGE_ANY,
   58       GAL_OPTIONS_NOT_MANDATORY,
   59       GAL_OPTIONS_NOT_SET
   60     },
   61     {
   62       "khdu",
   63       UI_KEY_KHDU,
   64       "STR",
   65       0,
   66       "HDU containing the kernel.",
   67       GAL_OPTIONS_GROUP_INPUT,
   68       &p->khdu,
   69       GAL_TYPE_STRING,
   70       GAL_OPTIONS_RANGE_ANY,
   71       GAL_OPTIONS_MANDATORY,
   72       GAL_OPTIONS_NOT_SET
   73     },
   74     {
   75       "kernelcolumn",
   76       UI_KEY_KERNELCOLUMN,
   77       "STR",
   78       0,
   79       "Column name or number if kernel is a table.",
   80       GAL_OPTIONS_GROUP_INPUT,
   81       &p->kernelcolumn,
   82       GAL_TYPE_STRING,
   83       GAL_OPTIONS_RANGE_ANY,
   84       GAL_OPTIONS_NOT_MANDATORY,
   85       GAL_OPTIONS_NOT_SET
   86     },
   87     {
   88       "nokernelflip",
   89       UI_KEY_NOKERNELFLIP,
   90       0,
   91       0,
   92       "Do not flip the kernel image.",
   93       GAL_OPTIONS_GROUP_INPUT,
   94       &p->nokernelflip,
   95       GAL_OPTIONS_NO_ARG_TYPE,
   96       GAL_OPTIONS_RANGE_0_OR_1,
   97       GAL_OPTIONS_NOT_MANDATORY,
   98       GAL_OPTIONS_NOT_SET
   99     },
  100     {
  101       "nokernelnorm",
  102       UI_KEY_NOKERNELNORM,
  103       0,
  104       0,
  105       "Do not normalize the kernel image.",
  106       GAL_OPTIONS_GROUP_INPUT,
  107       &p->nokernelnorm,
  108       GAL_OPTIONS_NO_ARG_TYPE,
  109       GAL_OPTIONS_RANGE_0_OR_1,
  110       GAL_OPTIONS_NOT_MANDATORY,
  111       GAL_OPTIONS_NOT_SET
  112     },
  113     {
  114       "minsharpspec",
  115       UI_KEY_MINSHARPSPEC,
  116       "FLT",
  117       0,
  118       "Deconvolution: min spectrum of sharp img.",
  119       GAL_OPTIONS_GROUP_INPUT,
  120       &p->minsharpspec,
  121       GAL_TYPE_FLOAT64,
  122       GAL_OPTIONS_RANGE_GE_0_LE_1,
  123       GAL_OPTIONS_NOT_MANDATORY,
  124       GAL_OPTIONS_NOT_SET
  125     },
  126 
  127 
  128 
  129 
  130 
  131     /* Outputs */
  132     {
  133       "checkfreqsteps",
  134       UI_KEY_CHECKFREQSTEPS,
  135       0,
  136       0,
  137       "View the steps in the frequency domain.",
  138       GAL_OPTIONS_GROUP_OUTPUT,
  139       &p->checkfreqsteps,
  140       GAL_OPTIONS_NO_ARG_TYPE,
  141       GAL_OPTIONS_RANGE_0_OR_1,
  142       GAL_OPTIONS_NOT_MANDATORY,
  143       GAL_OPTIONS_NOT_SET
  144     },
  145     {
  146       "noedgecorrection",
  147       UI_KEY_NOEDGECORRECTION,
  148       0,
  149       0,
  150       "Do not correct the edges in the spatial domain",
  151       GAL_OPTIONS_GROUP_OUTPUT,
  152       &p->noedgecorrection,
  153       GAL_OPTIONS_NO_ARG_TYPE,
  154       GAL_OPTIONS_RANGE_0_OR_1,
  155       GAL_OPTIONS_NOT_MANDATORY,
  156       GAL_OPTIONS_NOT_SET
  157     },
  158 
  159 
  160 
  161 
  162 
  163     /* Operating mode. */
  164     {
  165       "domain",
  166       UI_KEY_DOMAIN,
  167       "STR",
  168       0,
  169       "Convolution domain: `spatial', `frequency'.",
  170       GAL_OPTIONS_GROUP_OPERATING_MODE,
  171       &p->domainstr,
  172       GAL_TYPE_STRING,
  173       GAL_OPTIONS_RANGE_ANY,
  174       GAL_OPTIONS_MANDATORY,
  175       GAL_OPTIONS_NOT_SET
  176     },
  177     {
  178       "makekernel",
  179       UI_KEY_MAKEKERNEL,
  180       "INT",
  181       0,
  182       "Make 2*INT kernel to create input image.",
  183       GAL_OPTIONS_GROUP_OPERATING_MODE,
  184       &p->makekernel,
  185       GAL_TYPE_SIZE_T,
  186       GAL_OPTIONS_RANGE_GT_0,
  187       GAL_OPTIONS_NOT_MANDATORY,
  188       GAL_OPTIONS_NOT_SET
  189     },
  190 
  191 
  192     {0}
  193   };
  194 
  195 
  196 
  197 
  198 
  199 /* Define the child argp structure. */
  200 struct argp
  201 gal_options_common_child = {gal_commonopts_options,
  202                             gal_options_common_argp_parse,
  203                             NULL, NULL, NULL, NULL, NULL};
  204 
  205 /* Use the child argp structure in list of children (only one for now). */
  206 struct argp_child
  207 children[]=
  208 {
  209   {&gal_options_common_child, 0, NULL, 0},
  210   {0, 0, 0, 0}
  211 };
  212 
  213 /* Set all the necessary argp parameters. */
  214 struct argp
  215 thisargp = {program_options, parse_opt, args_doc, doc, children, NULL, NULL};
  216 #endif