File: main.h

package info (click to toggle)
gnuastro 0.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,360 kB
  • sloc: ansic: 185,444; sh: 15,785; makefile: 1,303; cpp: 9
file content (75 lines) | stat: -rw-r--r-- 3,457 bytes parent folder | download
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*********************************************************************
Warp - Warp images using projective mapping.
Warp is part of GNU Astronomy Utilities (Gnuastro) package.

Original author:
     Mohammad Akhlaghi <mohammad@akhlaghi.org>
Contributing author(s):
     Pedram Ashofteh-Ardakani <pedramardakani@pm.me>
Copyright (C) 2016-2025 Free Software Foundation, Inc.

Gnuastro 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 3 of the License, or (at your
option) any later version.

Gnuastro 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 Gnuastro. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************/
#ifndef MAIN_H
#define MAIN_H

/* Include necessary headers */
#include <gnuastro/data.h>
#include <gnuastro/warp.h>

#include <gnuastro-internal/options.h>

/* Progarm names.  */
#define PROGRAM_NAME   "Warp"        /* Program full name.       */
#define PROGRAM_EXEC   "astwarp"     /* Program executable name. */
#define PROGRAM_STRING PROGRAM_NAME" (" PACKAGE_NAME ") " PACKAGE_VERSION





/* Main program structure. */
struct warpparams
{
  /* From command-line */
  struct gal_options_common_params cp; /* Common parameters.             */
  gal_warp_wcsalign_t  wa;  /* Nonlinear-specific parameters.            */
  char         *inputname;  /* Name of input file.                       */
  size_t        hstartwcs;  /* Header keyword No. to start reading WCS.  */
  size_t          hendwcs;  /* Header keyword No. to end reading WCS.    */
  uint8_t         keepwcs;  /* Wrap the warped/transfomed pixels.        */
  uint8_t  centeroncorner;  /* Shift center by 0.5 before and after.     */
  double      coveredfrac;  /* Acceptable fraction of output covered.    */
  gal_data_t       *width;  /* Width of final image.                     */
  uint8_t      widthinpix;  /* If the given width is in units of pixels. */
  char           *gridhdu;  /* Extension to use for output's WCS.        */
  char          *gridfile;  /* File to use for output's WCS.             */

  /* Internal parameters: */
  gal_data_t       *input;  /* Input data structure.                     */
  gal_data_t      *output;  /* output data structure.                    */
  gal_data_t      *matrix;  /* Warp/Transformation matrix.               */
  gal_data_t   *modularll;  /* List of modular warpings.                 */
  double     *inwcsmatrix;  /* Input WCS matrix.                         */
  double         *inverse;  /* Inverse of the input matrix.              */
  time_t          rawtime;  /* Starting time of the program.             */
  size_t       ordinds[4];  /* Indexs of anticlockwise vertices.         */
  size_t       extinds[4];  /* Indexs of the minimum and maximum values. */
  double    outfpixval[2];  /* Pixel value of first output pixel.        */
  double         opixarea;  /* Area of output pix in units of input pix. */
  uint8_t        wcsalign;  /* If warp must work in WCS-align mode.      */
  uint8_t  distortiontype;  /* Store distortion type in nonlinear mode.  */
};

#endif