Example #1
0
# sun_set_time
obs.sun_set_time(time_obs, which='nearest') # Default
obs.sun_set_time(time_obs, which='next')
obs.sun_set_time(time_obs, which='previous')
obs.sun_set_time() # Will be use time=Time.now(), which='nearest'

# sun_rise_time
obs.sun_rise_time(time_obs, which='nearest') # Default
obs.sun_rise_time(time_obs, which='next')
obs.sun_rise_time(time_obs, which='previous')

# moon rise
obs.moon_rise(time_obs, which='nearest')

# moon set
obs.moon_set(time_obs, which='nearest')

# The above functions can be called with an `angle` keyword argument to specify
# a particular horizon angle for rising or setting, or can be called with
# convenience functions for particular morning/evening twilight.
# For example, to compute astronomical twilight by specifying the `angle`:
obs.sun_set_time(time_obs, which='next', angle=18*u.degree)

# evening (astronomical) twilight
obs.twilight_evening_astronomical(time_obs)

# evening (nautical) twilight
obs.twilight_evening_nautical(time_obs)

# evening (civil) twilight
obs.twilight_evening_civil(time_obs)
# sunset
obs.sunset(date=time_obs, which='nearest') # Default
obs.sunset(date=time_obs, which='next')
obs.sunset(date=time_obs, which='previous')

# sunrise
obs.sunrise(date=time_obs, which='nearest') # Default
obs.sunrise(date=time_obs, which='next')
obs.sunrise(date=time_obs, which='previous')

# moon rise
obs.moon_rise(date=time_obs, which='nearest')

# moon set
obs.moon_set(date=time_obs, which='nearest')

# The above functions can be called with an `angle` keyword argument to specify
# a particular horizon angle for rising or setting, or can be called with
# convenience functions for particular morning/evening twilight.
# For example, to compute astronomical twilight by specifying the `angle`:
obs.sunset(date=time_obs, which='next', angle=18*u.degree) 

# evening (astronomical) twilight
obs.evening_astronomical(date=time_obs)

# evening (nautical) twilight
obs.evening_nautical(date=time_obs)

# evening (civil) twilight
obs.evening_civil(date=time_obs)