source: branches/asap-3.x/external/atnf/pks/pks_maths.h@ 2353

Last change on this file since 2353 was 1720, checked in by Malte Marquarding, 15 years ago

Update from livedata CVS repository

File size: 3.4 KB
Line 
1//#---------------------------------------------------------------------------
2//# pks_maths.h: Mathematical functions for Parkes single dish data reduction
3//#---------------------------------------------------------------------------
4//# livedata - processing pipeline for single-dish, multibeam spectral data.
5//# Copyright (C) 2000-2009, Australia Telescope National Facility, CSIRO
6//#
7//# This file is part of livedata.
8//#
9//# livedata is free software: you can redistribute it and/or modify it under
10//# the terms of the GNU General Public License as published by the Free
11//# Software Foundation, either version 3 of the License, or (at your option)
12//# any later version.
13//#
14//# livedata is distributed in the hope that it will be useful, but WITHOUT
15//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17//# more details.
18//#
19//# You should have received a copy of the GNU General Public License along
20//# with livedata. If not, see <http://www.gnu.org/licenses/>.
21//#
22//# Correspondence concerning livedata may be directed to:
23//# Internet email: mcalabre@atnf.csiro.au
24//# Postal address: Dr. Mark Calabretta
25//# Australia Telescope National Facility, CSIRO
26//# PO Box 76
27//# Epping NSW 1710
28//# AUSTRALIA
29//#
30//# http://www.atnf.csiro.au/computing/software/livedata.html
31//# $Id: pks_maths.h,v 1.7 2009-09-29 07:45:02 cal103 Exp $
32//#---------------------------------------------------------------------------
33//# Original: 2004/07/16 Mark Calabretta
34//#---------------------------------------------------------------------------
35#ifndef ATNF_PKS_MATHS_H
36#define ATNF_PKS_MATHS_H
37
38// AIPS++ includes.
39#include <casa/aips.h>
40#include <casa/Arrays/Vector.h>
41
42
43#include <casa/namespace.h>
44
45// Global mathematical functions for single-dish data reduction.
46
47// Nearest integral value.
48Int nint(Double v);
49Double anint(Double v);
50
51// Round value v to the nearest integral multiple of precision p.
52Double round(Double v, Double p);
53
54// Compute the weighted median value of an array.
55Float median(const Vector<Float> &v, const Vector<Float> &wgt);
56
57// Angular distance between two directions (angles in radian).
58Double angularDist(Double lng1, Double lat1, Double lng2, Double lat2);
59
60// Generalized position angle of the field point (lng,lat) from reference
61// point (lng0,lat0) and the angular distance between them (angles in radian).
62void distPA(Double lng0, Double lat0, Double lng, Double lat, Double &dist,
63 Double &pa);
64
65// Euler angle based transformation of spherical coordinates (radian).
66void eulerx(Double lng0, Double lat0, Double phi0, Double theta, Double phi,
67 Double &lng1, Double &lat1);
68
69// Low precision coordinates of the sun.
70void sol(Double mjd, Double &elng, Double &ra, Double &dec);
71
72// Low precision Greenwich mean and apparent sidereal time (radian); UT1 is
73// given in MJD form.
74void gst(Double ut1, Double &gmst, Double &gast);
75
76// Convert (ra,dec) to (az,el). Position as a Cartesian triplet (m), UT1 in
77// MJD form, and all angles in radian.
78void azel(const Vector<Double> position, Double ut1, Double ra, Double dec,
79 Double &az, Double &el);
80
81// Compute the Solar elevation (radian) using the above functions.
82Double solel(const Vector<Double> position, Double ut1);
83
84#endif
Note: See TracBrowser for help on using the repository browser.