Documentation for pp_lib

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

./

pp_rise_set.pro


Routines

top source pp_rise_set

result = pp_rise_set(ra, dec [, obsname=obsname] [, lat=lat] [, lon=lon] [, tz=tz], day=day, month=month, year=year [, prev_day=prev_day] [, extra=extra])

Calculates rise, transit and set times, plus the time above the horizon (sky time) for the given equatorial coordinates, location and date.

GDL-compatible. All dependencies are routines from idlastro (http://idlastro.gsfc.nasa.gov/).

Return value

A structure with the fields transit, sky, rise and set, each with the same dimensions as ra,dec, with the times for transit, above the horizon, rise and set, respectively, in civil hours. Those points that are never above the horizon have sky=0 and NaN for rise and set. Those points that are always above the horizon have sky=24 and NaN for rise and set.

Parameters

ra in required

Right ascension(s) of the point(s) to calculate the visibility for. Units: hours. May be a scalar or arrar, and must have the same number of elements as dec.

dec in required

Declination(s) of the point(s) to calculate the visibility for. Units: degrees. May be a scalar or arrar, and must have the same number of elements as ra.

Keywords

obsname in optional

String with the observatory name, as understood by idlastro's observatory procedure. If provided, supersedes lat, lon and tz.

lat in optional

Latitude of the observing location, in degrees (positive is north).

lon in optional

Longitude of the observing location, in degrees (positive is east, contrary to that returned by observatory).

tz in optional

Time zone of the observing location, in hours (positive is east, contrary to that returned by observatory).

day in required

Day of the month for the observation.

month in required

Month for the observation.

year in required

Year for the observation.

prev_day in optional default=0

By default, returned times of day (for transit, rise and set) are relative to local midnight, so times before midnight are negative. If this keyword is set, times before midnight are returned as the time for the previous day, instead.

extra in optional default=0

If set, extra data is output (sunrise/sunset times, target altitude at sunrise/sunet, etc).

Examples

Make up some coordinates and calculate the times:

ra=[22d0+3d0/60d0+18d0/3600d0,0d0,19d0] dec=[-9d0-40d0/60d0-34d0/3600d0,-87d0,80d0] r=pp_rise_set(ra,dec,obsname='eso',day=0,month=06,year=2010,/prev) print,r.transit 6.2173759 8.1019913 3.1540115 print,r.sky 12.765635 24.000000 0.0000000 print,r.rise 23.834559 NaN NaN print,r.set 12.600193 NaN NaN

Author information

Author:

Paulo Penteado (pp.penteado@gmail.com), Jun/2010

Other attributes

Uses:

observatory, ten, ct2lst, jdcnv

Statistics

Lines:
61 lines
Cyclomatic complexity:
19
Modified cyclomatic complexity:
19

File attributes

Modification date: Wed Jun 29 22:15:28 2016
Lines: 61
Docformat: rst rst