Tools#
- class tilepy.include.PointingTools.Tools[source] [edit on github]#
Bases:
objectUtility class for astronomical visibility and observing constraints.
Provides static and class methods for checking darkness/greyness, Sun/Moon altitude, twilight, galactic extinction, and other observation-related computations.
Provides static and class methods for incorporating observational constraints, such as darkness/greyness, Sun/Moon altitude, twilight, galactic extinction, and other factors relevant to scheduling astronomical observations.
Most methods require an
obsparobject, which should provide site coordinates and observing thresholds.- Main functionalities include:
Checking if the sky is dark or grey (usable) for observation.
Computing Sun/Moon altitude, phase, rise and set times.
Determining if a coordinate is inside the Galactic plane.
Getting galactic extinction at given coordinates.
Checking if a position is within the South Atlantic Anomaly (SAA).
Miscellaneous geometric and HEALPix utilities for sky coverage analysis.
Methods Summary
CheckWindow(time, obspar)CheckWindowGrey(time, obspar)GalacticPlaneBorder(coords)Return True if the coordinates are inside the Galactic plane region.
GetGalacticExtinction(coords[, dustmap, filters])Return the galactic extinction at the given coordinates.
IsDarkness(obsTime, obspar)Return True if the sky meets the darkness constraints for observation.
IsGreyness(obsTime, obspar)Return True if the sky meets the greyness (twilight) constraints for observation.
MoonAlt(obsTime, obspar)Return the Moon's altitude (in degrees) at the given time and site.
MoonPhase(obsTime, obspar)Return the phase of the Moon (in percent) at the given time and site.
NextMoonset(obsTime, obspar)NextSunrise(obsTime, obspar)Return the datetime of the next sunrise after the given time at the site.
NextSunset(obsTime, obspar)PreviousMoonset(obsTime, obspar)PreviousSunrise(obsTime, obspar)SunAlt(obsTime, obspar)Return the Sun's altitude (in degrees) at the given time and site.
TrustingDarknessSun(obsTime, obspar)TrustingGreynessSun(obsTime, obspar)UTCtoNamibia(UTCtime)get_regular_polygon_vertices(ra_center, ...)Generate a regular polygon's vertices on the celestial sphere.
hexagon_vertices(radius)Calculate hexagon vertices around a center point on the sphere.
is_in_saa(latitude, longitude)Return True if the given latitude and longitude are inside the South Atlantic Anomaly (SAA).
is_in_saa_opt(satellite, current_time, ...)query_square(center, side_length_rad)Return HEALPix pixel indices for a square region centered at the given point.
Methods Documentation
- classmethod CheckWindow(time, obspar)[source] [edit on github]#
- classmethod CheckWindowGrey(time, obspar)[source] [edit on github]#
- classmethod GalacticPlaneBorder(coords)[source] [edit on github]#
Return True if the coordinates are inside the Galactic plane region.
- classmethod GetGalacticExtinction(coords, dustmap='SFD', filters='SDSS_r')[source] [edit on github]#
Return the galactic extinction at the given coordinates.
- classmethod IsDarkness(obsTime, obspar)[source] [edit on github]#
Return True if the sky meets the darkness constraints for observation.
- Parameters:
obsTime (datetime.datetime) – Time of observation (UTC).
obspar (object) – Observation parameters.
- Returns:
True if darkness constraints are satisfied, False otherwise.
- Return type:
bool
- classmethod IsGreyness(obsTime, obspar)[source] [edit on github]#
Return True if the sky meets the greyness (twilight) constraints for observation.
So check if the Sun and Moon are in the grey twilight regime.
- classmethod MoonAlt(obsTime, obspar)[source] [edit on github]#
Return the Moon’s altitude (in degrees) at the given time and site.
- classmethod MoonPhase(obsTime, obspar)[source] [edit on github]#
Return the phase of the Moon (in percent) at the given time and site.
- classmethod NextMoonset(obsTime, obspar)[source] [edit on github]#
- classmethod NextSunrise(obsTime, obspar)[source] [edit on github]#
Return the datetime of the next sunrise after the given time at the site.
- classmethod NextSunset(obsTime, obspar)[source] [edit on github]#
- classmethod PreviousMoonset(obsTime, obspar)[source] [edit on github]#
- classmethod PreviousSunrise(obsTime, obspar)[source] [edit on github]#
- classmethod SunAlt(obsTime, obspar)[source] [edit on github]#
Return the Sun’s altitude (in degrees) at the given time and site.
- classmethod TrustingDarknessSun(obsTime, obspar)[source] [edit on github]#
- classmethod TrustingGreynessSun(obsTime, obspar)[source] [edit on github]#
- classmethod UTCtoNamibia(UTCtime)[source] [edit on github]#
- classmethod get_regular_polygon_vertices(ra_center, dec_center, radius_deg, n_sides, rotation_deg)[source] [edit on github]#
Generate a regular polygon’s vertices on the celestial sphere.
Parameters: - ra_center, dec_center: center in degrees - radius_deg: angular radius from center to each vertex - n_sides: number of polygon sides - rotation_deg: optional rotation angle (degrees)
Returns: - vertices (np.ndarray): (N, 3) array of unit vectors
- classmethod hexagon_vertices(radius)[source] [edit on github]#
Calculate hexagon vertices around a center point on the sphere.
- classmethod is_in_saa(latitude, longitude)[source] [edit on github]#
Return True if the given latitude and longitude are inside the South Atlantic Anomaly (SAA).
- classmethod is_in_saa_opt(satellite, current_time, threshold_nT, datasetDir)[source] [edit on github]#
- classmethod query_square(center, side_length_rad)[source] [edit on github]#
Return HEALPix pixel indices for a square region centered at the given point.