File: imaginginterface.h

package info (click to toggle)
wsclean 3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,296 kB
  • sloc: cpp: 129,246; python: 22,066; sh: 360; ansic: 230; makefile: 185
file content (76 lines) | stat: -rw-r--r-- 2,100 bytes parent folder | download | duplicates (3)
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
76
#ifndef IMAGING_INTERFACE_H
#define IMAGING_INTERFACE_H

/**
 * @file imaginginterface.h
 * This file is the generic part of an interface between imaging operators.
 * It is used in @ref wscleaninterface.h. A client program can use this file,
 * put it in their code repository and link to the WSClean library to avoid
 * needing to compile C++ code.
 */

#ifndef DCOMPLEX

#ifdef __cplusplus
#include <complex>
#define DCOMPLEX std::complex<double>
#else
/** In C++, this is defined as std::complex<double>, while in
 * plain C, this is defined as 'double complex'. */
#define DCOMPLEX double complex
#endif

#endif

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Class that defines the image properties.
 * Used by @ref wsclean_initialize().
 */
typedef struct {
  /** Path to the measurement set */
  const char* msPath;
  /** Image width in pixels */
  int imageWidth;
  /** Image height in pixels */
  int imageHeight;
  /** Horizontal size of a pixel in radians */
  double pixelScaleX;
  /** Vertical size of a pixel in radians */
  double pixelScaleY;
  /** A string containing command line parameters that are passed to WSClean,
   * for example "-weight natural" to use natural weighting. */
  const char* extraParameters;
  /** Whether the PSF should be normalized to one, as is the normal case.
   * When set to true, the image is in Jy/by. When set to false, the image
   * is unnormalized. */
  int doNormalize;
} imaging_parameters;

/**
 * Holds information about the visibility data.
 */
typedef struct {
  /** Number of visibilities in the set (that are selected). */
  long dataSize;
  enum {
    DATA_TYPE_DOUBLE,
    DATA_TYPE_COMPLEX_DOUBLE
  } lhs_data_type,
      rhs_data_type;

  /*void (*deinitialize_function)(void* userData);
  void (*read_function)(void* userData, DCOMPLEX* data, double* weights);
  void (*write_function)(void* userData, const double* image);
  void (*operator_A_function)(void* userData, void* dataOut, void* dataIn);
  void (*operator_At_function)(void* userData, void* dataOut, void* dataIn);*/
} imaging_data;

#ifdef __cplusplus
}
#endif

#endif