Usage of angleToSun
Return to directory of Todd's CASA extensions
Compute the angular separation (in degrees) between the Sun and another object. See also
sun,
plotSunDuringTrack,
ComputeSolarRADec and
ComputeSolarRADecRadians.
Usage:
au.angleToSun(date=None, mjdsec=None, radec='', raRadian=None, decRadian=None,
raDegrees=None, decDegrees=None, days=None, figfile=None, vis=None,
field=None, body=None, verbose=False, useJPL=False, showTable=False,
returnPositionAngle=False)
Specify the date/time to use in one of the following two ways:
- date: UT in string format, e.g. '2011/10/16 05:00:00'
- mjdsec: the time to use (default = now)
Specify the coordinates of the object in one of the five following ways:
- radec: a sexagesimal string, e.g. 03:49:10.99 +57:17:44.806
- raRadian and decRadian: in radians
- raDegrees and decDegrees: in degrees
- vis: measurement set name: if specified, will compute angle from Sun to all fields
- field: if vis is specified, then return the angle between the Sun and this field (integer or string ID or name)
- body: alternative to entering radec
Plotting:
- days: compute the angle for the next integer number of days (default=None) and also make a plot
- figfile: name of the png to write (set to True for default="angleToSun.png")
- verbose: print separations to screen
- body: if True and body is set, then use the JPL position for body, (otherwise use CASA position)
- returnPositionAngle: if True, then also return the position angle (in deg)
Examples:
Fixed object: M100
CASA <2>: au.angleToSun(radec='12:22:54.9 +15:49:21')
11:41:13.60881, +002:01:52.689057
Separation: radian = 0.300097, degrees = 17.194272, arcsec = 61899.378262
Out[2]: 17.194271739578085
CASA <5>: au.angleToSun(vis='uid___A002_X6e23cb_X7b0.ms')
Field ID, Name Angle to sun (deg) at 2013-09-30 04:58:50 UT
0 = J0006-0623 = 169.459
1 = J0215-0222 = 152.202
2 = Uranus = 176.463
3 = mira = 151.194
Separation: radian = 2.95762, degrees = 169.459141, arcsec = 610052.907654
Out[5]: 169.45914101500597
Solar system object: Uranus
CASA <2>: au.angleToSun('2015-04-01',planet='Uranus',days=12,figfile='Uranus_sun_2015.png')
MJD= 57113.00000, MJDseconds= 4934563200.0, JD= 2457113.50000
Plot left in Uranus.fluxvstime.345GHz.57113-57124.png
RA,Dec plot left in Uranus.radec.345GHz.57113-57124.png
00:59:39.14160, +005:41:32.820000
00:59:51.82080, +005:42:52.092000
01:00:04.51440, +005:44:11.400000
01:00:17.21760, +005:45:30.708000
01:00:29.93040, +005:46:49.980000
01:00:42.64800, +005:48:09.288000
01:00:55.36800, +005:49:28.524000
01:01:08.08800, +005:50:47.724000
01:01:20.81040, +005:52:06.816000
01:01:33.52560, +005:53:25.872000
01:01:46.23600, +005:54:44.820000
01:01:58.93680, +005:56:03.624000
Plot saved to Uranus_sun_2015.png
Out[2]: 5.257848726565127
--
ToddHunter - 2013-09-17