SourceVisibility#

class radiotools.visibility.SourceVisibility(target: tuple | str, date: str | list[str], location: str | EarthLocation = None, obs_length: float = 4.0, frame: str | BaseCoordinateFrame = 'icrs', min_alt: float = 15.0, max_alt: float = 85.0, print_optimal_date: bool = False)[source]#

Bases: object

Plots the source visibility for a given location and time range.

Parameters:
targettuple or str

Tuple of RA/Dec coordinates or string of valid target name (ICRS).

datestr or list[str]

Date or start and end points of a range of dates.

locationstr or astropy.coordinates.EarthLocation, optional

Name of an existing array layout included in pyvisgen, a location, or astropy.coordinates.EarthLocation object of an observatory or telescope. Default: None

obs_length: float, optional

Observation length in hours. Default: None

framestr or astropy.coordinates.BaseCoordinateFrame, optional

Type of coordinate frame the source sky coordinates should represent. Defaults: 'icrs'

print_optimal_datebool, optional

Prints the optimal date to observe. Default: False

Methods Summary

get_optimal_date([print_result])

Computes the best date to observe the target source.

plot([figsize, colors, descr_text, legend, ...])

Plots the visibility of the source at the given time range.

Methods Documentation

get_optimal_date(print_result: bool = False) list[source]#

Computes the best date to observe the target source. Returns a list of three Timestamp where the first and last are the best date \(\pm\) obs_length / 2.

Parameters:
print_resultbool, optional

If True, also prints the result. Default: False

Returns:
resultlist

List of Timestamp.

plot(figsize: tuple[int, int] = (10, 5), colors: list = ['#fd7f6f', '#7eb0d5', '#b2e061', '#bd7ebe', '#ffb55a', '#ffee65', '#beb9db', '#fdcce5', '#8bd3c7', '#b3d4ff'], *, descr_text: bool = True, legend: bool = True, locale: Literal['EN', 'DE'] = 'EN') tuple[source]#

Plots the visibility of the source at the given time range. Also plots the positions of the sun and moon if set to True.

Parameters:
figsizetuple[int, int], optional

Figure size. Width, height in inches. Default: (10, 5)

colorslist, optional

List of colors. If nothing provided a default list of colors is used. Default: None

descr_textbool, optional

Whether to put a descriptive text next to the plot. Default: True

legendbool, optional

If True, show legend in the plot. Default: True

Returns:
tuple

Figure and axis objects.