1 /*
2  * Copyright (c) 2011-2016, The University of Oxford
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * 1. Redistributions of source code must retain the above copyright notice,
8  *    this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright notice,
10  *    this list of conditions and the following disclaimer in the documentation
11  *    and/or other materials provided with the distribution.
12  * 3. Neither the name of the University of Oxford nor the names of its
13  *    contributors may be used to endorse or promote products derived from this
14  *    software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef OSKAR_PRIVATE_SKY_H_
30 #define OSKAR_PRIVATE_SKY_H_
31 
32 /**
33  * @file private_sky.h
34  */
35 
36 #include <mem/oskar_mem.h>
37 
38 /**
39  * @struct oskar_Sky
40  *
41  * @brief Structure to hold a sky model.
42  *
43  * @details
44  * The structure holds source parameters for a sky model.
45  */
46 struct oskar_Sky
47 {
48     int precision;
49     int mem_location;
50     int capacity;
51 
52     int num_sources;           /**< Number of sources in the sky model. */
53     oskar_Mem* ra_rad;         /**< Right ascension, in radians. */
54     oskar_Mem* dec_rad;        /**< Declination, in radians. */
55     oskar_Mem* I;              /**< Stokes-I, in Jy. */
56     oskar_Mem* Q;              /**< Stokes-Q, in Jy. */
57     oskar_Mem* U;              /**< Stokes-U, in Jy. */
58     oskar_Mem* V;              /**< Stokes-V, in Jy. */
59     oskar_Mem* reference_freq_hz; /**< Reference frequency for the source flux, in Hz. */
60     oskar_Mem* spectral_index; /**< Spectral index. */
61     oskar_Mem* rm_rad;         /**< Rotation measure, in radians / m^2. */
62 
63     double reference_ra_rad;   /**< Reference right ascension, in radians. */
64     double reference_dec_rad;  /**< Reference declination, in radians. */
65     oskar_Mem* l;              /**< Phase centre relative l-direction cosines. */
66     oskar_Mem* m;              /**< Phase centre relative m-direction cosines. */
67     oskar_Mem* n;              /**< Phase centre relative n-direction cosines. */
68 
69     int use_extended;          /**< Enable use of extended sources */
70     oskar_Mem* fwhm_major_rad; /**< Major axis FWHM for Gaussian sources, in radians. */
71     oskar_Mem* fwhm_minor_rad; /**< Minor axis FWHM for Gaussian sources, in radians. */
72     oskar_Mem* pa_rad;         /**< Position angle for Gaussian sources, in radians. */
73     oskar_Mem* gaussian_a;     /**< Gaussian source width parameter */
74     oskar_Mem* gaussian_b;     /**< Gaussian source width parameter */
75     oskar_Mem* gaussian_c;     /**< Gaussian source width parameter */
76 };
77 
78 #ifndef OSKAR_SKY_TYPEDEF_
79 #define OSKAR_SKY_TYPEDEF_
80 typedef struct oskar_Sky oskar_Sky;
81 #endif /* OSKAR_SKY_TYPEDEF_ */
82 
83 #endif /* OSKAR_PRIVATE_SKY_H_ */
84