casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BeamCalcAntenna.h
Go to the documentation of this file.
1 #ifndef SYNTHESIS_ANTENNA_H
2 #define SYNTHESIS_ANTENNA_H
3 
4 namespace casa
5 {
7 
8 #define MAXGEOM 2000
9  /*
10  * calcAntenna parameters
11  */
12  typedef struct
13  {
14  casacore::Double sub_h; /* height of subreflector (on axis) */
15  casacore::Double feed[3]; /* position of the feed */
16  casacore::Double feeddir[3]; /* unit vector pointing along feed */
17  casacore::Double pfeeddir[3]; /* same as above after pathology applied */
18  casacore::Double radius; /* antenna radius (m) */
20  casacore::Double deltar;
21  casacore::Double zedge; /* height at the edge of the dish */
22  casacore::Double bestparabola; /* best fit parabola quadratic coef */
23  casacore::Double ftaper; /* taper of feed */
24  casacore::Double thmax; /* maximum angle of feed */
25  casacore::Double fa2pi;
26  casacore::Double legwidth;
27  casacore::Double legfoot, legfootz;
28  casacore::Double legapex;
29  casacore::Double legthick;
30  casacore::Double hole_radius;
31  casacore::Double freq, lambda;
32  casacore::Double dir[3];
33  casacore::Double hhat[3], vhat[3]; /* unit vectors orthogonal to dir */
36  casacore::Double k[3];
37  casacore::Int ngeom;
38  char name[16];
39  casacore::Int gridsize;
40  } calcAntenna;
41 
42  typedef struct
43  {
44  casacore::Double subrot[3][3]; /* 3x3 matrix rotating x,y,z or nx,ny,nz */
45  casacore::Double feedrot[3][3]; /* 3x3 matrix rotating x,y,z or nx,ny,nz */
46  casacore::Double subshift[3]; /* 3 length vector */
47  casacore::Double feedshift[3]; /* 3 length vector */
48  casacore::Double subrotpoint[3]; /* 3 vector describing point to rotate sub. */
49  casacore::Double az_offset; /* azimuth pointing offset (radians) */
50  casacore::Double el_offset; /* elevation pointing offset (radians) */
51  casacore::Double phase_offset; /* DC offset in phase (radians) */
52  casacore::Double focus; /* meters out of focus toward subreflector */
53  } Pathology;
54 
55  typedef struct
56  {
57  casacore::Double aper[6]; /* aperture x, y, z, nx, ny, nz */
58  casacore::Double dish[6]; /* dish x, y, z, nx, ny, nz */
59  casacore::Double sub[6]; /* subreflector x, y, z, nx, ny, nz */
60  casacore::Double feed[3]; /* feed x, y, z */
61  } Ray;
62 
63  calcAntenna *newAntenna(casacore::Double sub_h, casacore::Double feed_x, casacore::Double feed_y, casacore::Double feed_z,
64  casacore::Double ftaper, casacore::Double thmax, const char *geomfile);
65  void deleteAntenna(calcAntenna *a);
66  void Antennasetfreq(calcAntenna *a, casacore::Double freq);
67  void Antennasetdir(calcAntenna *a, const casacore::Double *dir);
68  void alignfeed(calcAntenna *a, const Pathology *p);
69  void getfeedbasis(const calcAntenna *a, casacore::Double B[3][3]);
70  void Efield(const calcAntenna *a,
71  const casa::Complex *pol,
72  casa::Complex *E);
73  casacore::Int Antennasetfeedpattern(calcAntenna *a, const char *filename, casacore::Double scale);
74  calcAntenna *newAntennafromApertureCalcParams(struct ApertureCalcParams *ap);
75  void applyPathology(Pathology *P, calcAntenna *a);
77  casacore::Int subfromdish(const calcAntenna *a, casacore::Double x, casacore::Double y, casacore::Double *subpoint);
78  casacore::Int dishfromsub(const calcAntenna *a, casacore::Double x, casacore::Double y, casacore::Double *dishpoint);
79 
80  Ray *newRay(const casacore::Double *sub);
81  void deleteRay(Ray *ray);
82  Pathology *newPathology();
83  Pathology *newPathologyfromApertureCalcParams(struct ApertureCalcParams *ap);
84  void deletePathology(Pathology *P);
85  casacore::Double dAdOmega(const calcAntenna *a, const Ray *ray1, const Ray *ray2,
86  const Ray *ray3, const Pathology *p);
87  casacore::Double dOmega(const calcAntenna *a, const Ray *ray1, const Ray *ray2,
88  const Ray *ray3, const Pathology *p);
89  casacore::Double Raylen(const Ray *ray);
90  casacore::Double feedfunc(const calcAntenna *a, casacore::Double theta);
91  void Pathologize(casacore::Double *sub, const Pathology *p);
92  void intersectdish(const calcAntenna *a, const casacore::Double *sub, const casacore::Double *unitdir,
93  casacore::Double *dish, casacore::Int niter);
94  void intersectaperture(const calcAntenna *a, const casacore::Double *dish,
95  const casacore::Double *unitdir, casacore::Double *aper);
96  Ray *trace(const calcAntenna *a, casacore::Double x, casacore::Double y, const Pathology *p);
97  casacore::Double feedgain(const calcAntenna *a, const Ray *ray, const Pathology *p);
98 
99  void tracepol(casa::Complex *E0, const Ray *ray, casa::Complex *E1);
100 
102  casacore::Int legplanewaveblock2(const calcAntenna *a, const Ray *ray);
103  casacore::Int legsphericalwaveblock(const calcAntenna *a, const Ray *ray);
104 };
105 #endif
void deleteRay(Ray *ray)
void applyPathology(Pathology *P, calcAntenna *a)
int Int
Definition: aipstype.h:50
casacore::Int legplanewaveblock2(const calcAntenna *a, const Ray *ray)
casacore::Int dishfromsub(const calcAntenna *a, casacore::Double x, casacore::Double y, casacore::Double *dishpoint)
void deleteAntenna(calcAntenna *a)
void Antennasetdir(calcAntenna *a, const casacore::Double *dir)
Pathology * newPathologyfromApertureCalcParams(struct ApertureCalcParams *ap)
void deletePathology(Pathology *P)
Ray * trace(const calcAntenna *a, casacore::Double x, casacore::Double y, const Pathology *p)
void intersectdish(const calcAntenna *a, const casacore::Double *sub, const casacore::Double *unitdir, casacore::Double *dish, casacore::Int niter)
casacore::Int legplanewaveblock(const calcAntenna *a, casacore::Double x, casacore::Double y)
void alignfeed(calcAntenna *a, const Pathology *p)
void Antennasetfreq(calcAntenna *a, casacore::Double freq)
#define MAXGEOM
casacore::Double feedfunc(const calcAntenna *a, casacore::Double theta)
Ray * newRay(const casacore::Double *sub)
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
casacore::Int legsphericalwaveblock(const calcAntenna *a, const Ray *ray)
void intersectaperture(const calcAntenna *a, const casacore::Double *dish, const casacore::Double *unitdir, casacore::Double *aper)
void Efield(const calcAntenna *a, const casa::Complex *pol, casa::Complex *E)
casacore::Double feedgain(const calcAntenna *a, const Ray *ray, const Pathology *p)
double Double
Definition: aipstype.h:55
casacore::Int dishvalue(const calcAntenna *a, casacore::Double r, casacore::Double *z, casacore::Double *m)
calcAntenna * newAntenna(casacore::Double sub_h, casacore::Double feed_x, casacore::Double feed_y, casacore::Double feed_z, casacore::Double ftaper, casacore::Double thmax, const char *geomfile)
void tracepol(casa::Complex *E0, const Ray *ray, casa::Complex *E1)
casacore::Double Raylen(const Ray *ray)
casacore::Double dOmega(const calcAntenna *a, const Ray *ray1, const Ray *ray2, const Ray *ray3, const Pathology *p)
void getfeedbasis(const calcAntenna *a, casacore::Double B[3][3])
casacore::Int subfromdish(const calcAntenna *a, casacore::Double x, casacore::Double y, casacore::Double *subpoint)
Pathology * newPathology()
casacore::Double dAdOmega(const calcAntenna *a, const Ray *ray1, const Ray *ray2, const Ray *ray3, const Pathology *p)
casacore::Int Antennasetfeedpattern(calcAntenna *a, const char *filename, casacore::Double scale)
void Pathologize(casacore::Double *sub, const Pathology *p)
calcAntenna * newAntennafromApertureCalcParams(struct ApertureCalcParams *ap)