nenupy.astro.target


Celestial Target

Inheritance diagram of nenupy.astro.target.FixedTarget, nenupy.astro.target.SolarSystemTarget

FixedTarget(coordinates[, time, observer])

Class to handle astronomical targets outside the Solar System.

SolarSystemTarget(name, coordinates[, time, ...])

Class to handle Solar System targets.

class nenupy.astro.target.FixedTarget(coordinates, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.530741>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]

Bases: Target

Class to handle astronomical targets outside the Solar System.

Added in version 2.0.0.

Parameters:

Attributes Summary

coordinates

time

observer

is_circumpolar

Whether the celestial object is circumpolar at the observer's latitude.

culmination_azimuth

Methods Summary

from_name(name[, time, observer])

Instantiates a FixedTarget object from a name that could be resolved by Simbad.

separation(other)

Computes the angular separation between two Target instances.

meridian_transit([t_min, duration, ...])

Computes the Target meridian transit time(s).

next_meridian_transit([time, precision, ...])

Computes the Target next meridian transit time.

previous_meridian_transit([time, precision, ...])

Computes the Target previous meridian transit time.

azimuth_transit([azimuth, t_min, duration, ...])

Computes the Target transit time(s) at a given azimuth value.

rise_time([t_min, elevation, duration, ...])

Computes the Target rise time(s) above elevation.

next_rise_time([time, elevation, precision])

Computes the Target next rise time above elevation.

previous_rise_time([time, elevation, precision])

Computes the Target previous rise time above elevation.

set_time([t_min, elevation, duration, precision])

Computes the Target set time(s) below elevation.

next_set_time([time, elevation, precision])

Computes the Target next set time below elevation.

previous_set_time([time, elevation, precision])

Computes the Target previous set time below elevation.

Attributes and Methods Documentation

classmethod from_name(name, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.530844>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]

Instantiates a FixedTarget object from a name that could be resolved by Simbad.

Parameters:
  • name (str) – Source name.

  • time (Time) – Time at which the source is looked at. Default is current time.

  • observer (EarthLocation) – Earth location from where the source is observed. Default is NenuFAR’s location.

Returns:

FixedTarget instance.

Return type:

FixedTarget

Example:
>>> from nenupy.astro.target import FixedTarget
>>> cyg_a = FixedTarget.from_name("Cyg A")
property horizontal_coordinates
class nenupy.astro.target.SolarSystemTarget(name, coordinates, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.531016>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]

Bases: Target

Class to handle Solar System targets.

Added in version 2.0.0.

Attributes Summary

coordinates

time

observer

is_circumpolar

Whether the celestial object is circumpolar at the observer's latitude.

culmination_azimuth

Methods Summary

from_name(name[, time, observer])

separation(other)

Computes the angular separation between two Target instances.

meridian_transit([t_min, duration, ...])

Computes the Target meridian transit time(s).

next_meridian_transit([time, precision, ...])

Computes the Target next meridian transit time.

previous_meridian_transit([time, precision, ...])

Computes the Target previous meridian transit time.

azimuth_transit([azimuth, t_min, duration, ...])

Computes the Target transit time(s) at a given azimuth value.

rise_time([t_min, elevation, duration, ...])

Computes the Target rise time(s) above elevation.

next_rise_time([time, elevation, precision])

Computes the Target next rise time above elevation.

previous_rise_time([time, elevation, precision])

Computes the Target previous rise time above elevation.

set_time([t_min, elevation, duration, precision])

Computes the Target set time(s) below elevation.

next_set_time([time, elevation, precision])

Computes the Target next set time below elevation.

previous_set_time([time, elevation, precision])

Computes the Target previous set time below elevation.

Attributes and Methods Documentation

classmethod from_name(name, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.531119>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
property horizontal_coordinates
class nenupy.astro.target.Target(coordinates, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.528451>)[source]

Bases: AstroObject, ABC

Abstract class to handle target objects.

Added in version 2.0.0.

Attributes Summary

coordinates

time

observer

is_circumpolar

Whether the celestial object is circumpolar at the observer's latitude.

culmination_azimuth

Methods Summary

separation(other)

Computes the angular separation between two Target instances.

meridian_transit([t_min, duration, ...])

Computes the Target meridian transit time(s).

next_meridian_transit([time, precision, ...])

Computes the Target next meridian transit time.

previous_meridian_transit([time, precision, ...])

Computes the Target previous meridian transit time.

azimuth_transit([azimuth, t_min, duration, ...])

Computes the Target transit time(s) at a given azimuth value.

rise_time([t_min, elevation, duration, ...])

Computes the Target rise time(s) above elevation.

next_rise_time([time, elevation, precision])

Computes the Target next rise time above elevation.

previous_rise_time([time, elevation, precision])

Computes the Target previous rise time above elevation.

set_time([t_min, elevation, duration, precision])

Computes the Target set time(s) below elevation.

next_set_time([time, elevation, precision])

Computes the Target next set time below elevation.

previous_set_time([time, elevation, precision])

Computes the Target previous set time below elevation.

Attributes and Methods Documentation

azimuth_transit(azimuth=<Quantity 180. deg>, t_min=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.528963>, duration=<TimeDelta object: scale='None' format='sec' value=86400.0>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target transit time(s) at a given azimuth value. This method returns all the transit times found in the time window ranging from t_min to t_min + duration.

Parameters:
  • azimuth (Quantity) – Azimuth at which the transit is computed. Default is 180 deg (i.e. South).

  • t_min (Time) – Starting time of the temporal window within which azimuth transits are looked for. Default is current time.

  • duration (TimeDelta) – Width of the temporal window within which azimuth transits are looked for. Default is 1 day.

  • precision (TimeDelta) – Temporal precision of the returned azimuth transit values. Default is 5 sec.

Returns:

Azimuth transit times. If no transit times are found (either because the requested time window doesn’t contain any or because the source apparent sky position does not cross the desired azimuth) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.azimuth_transit(
        azimuth=100*u.deg,
        t_min=Time("2021-01-01"),
        duration=TimeDelta(86400*2, format="sec")
    )
<Time object: scale='utc' format='iso' value=['2021-01-01 11:22:12.463' '2021-01-02 11:18:16.477']>

See also

Ephemerides

property culmination_azimuth
property is_circumpolar

Whether the celestial object is circumpolar at the observer’s latitude.

\[l + \delta \geq 90\,{\rm deg}\]

where \(l\) is the latitude (defined in observer), \(\delta\) is the object’s declination (defined in coordinates).

meridian_transit(t_min=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.528649>, duration=<TimeDelta object: scale='None' format='sec' value=86400.0>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>, fast_compute=True)[source]

Computes the Target meridian transit time(s). This method returns all the transit times found in the time window ranging from t_min to t_min + duration.

Parameters:
  • t_min (Time) – Starting time of the temporal window within which meridian transits are looked for. Default is current time.

  • duration (TimeDelta) – Width of the temporal window within which meridian transits are looked for. Default is 1 day.

  • precision (TimeDelta) – Temporal precision of the returned meridian transit values. Default is 5 sec.

  • fast_compute (bool) – If set to True, a fast approximation is used during the computation of Local Sidereal Time. Default is True.

Returns:

Meridian transit times. If no transit times are found (because the requested time window doesn’t contain any) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.meridian_transit(
        t_min=Time("2021-01-01"),
        duration=TimeDelta(86400*2, format="sec")
    )
<Time object: scale='utc' format='iso' value=['2021-01-01 13:05:47.868' '2021-01-02 13:01:51.882']>

See also

Ephemerides

next_meridian_transit(time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.529206>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>, fast_compute=True)[source]

Computes the Target next meridian transit time. This method returns the next transit time found after time.

Parameters:
  • time (Time) – Relative time used to searching for the next meridian transit.

  • precision (TimeDelta) – Temporal precision of the returned meridian transit value. Default is 5 sec.

  • fast_compute (bool) – If set to True, a fast approximation is used during the computation of Local Sidereal Time. Default is True.

Returns:

Next meridian transit time.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.next_meridian_transit(
        time=Time("2021-01-01 12:00:00")
    )
<Time object: scale='utc' format='iso' value=2021-01-01 13:05:47.868>
next_rise_time(time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.529779>, elevation=<Quantity 0. deg>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target next rise time above elevation. This method returns the next rise time found after time.

Parameters:
  • time (Time) – Relative time used to searching for the next rise time. Default is current time.

  • elevation (Quantity) – Elevation above which the rise time is computed. Default is 0 deg.

  • precision (TimeDelta) – Temporal precision of the returned rise time value. Default is 5 sec.

Returns:

Next rise time. If no rise time is found (because the source does not cross the elevation) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.next_rise_time(
        time=Time("2021-01-01"),
        elevation=40*u.deg,
    )
<Time object: scale='utc' format='iso' value=2021-01-01 08:20:16.447>
next_set_time(time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.530361>, elevation=<Quantity 0. deg>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target next set time below elevation. This method returns the next set time found after time.

Parameters:
  • time (Time) – Relative time used to searching for the next set time. Default is current time.

  • elevation (Quantity) – Elevation below which the set time is computed. Default is 0 deg.

  • precision (TimeDelta) – Temporal precision of the returned set time value. Default is 5 sec.

Returns:

Next set time. If no set time is found (because the source does not cross the elevation) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.next_set_time(
        time=Time("2021-01-01"),
        elevation=40*u.deg,
    )
<Time object: scale='utc' format='iso' value=2021-01-01 17:51:17.312>
previous_meridian_transit(time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.529371>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>, fast_compute=True)[source]

Computes the Target previous meridian transit time. This method returns the previous transit time found before time.

Parameters:
  • time (Time) – Relative time used to searching for the previous meridian transit. Default is current time.

  • precision (TimeDelta) – Temporal precision of the returned meridian transit value. Default is 5 sec.

  • fast_compute (bool) – If set to True, a fast approximation is used during the computation of Local Sidereal Time. Default is True.

Returns:

Previous meridian transit time.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.previous_meridian_transit(
        time=Time("2021-01-01 12:00:00")
    )
Time object: scale='utc' format='iso' value=2020-12-31 13:09:43.855>
previous_rise_time(time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.529953>, elevation=<Quantity 0. deg>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target previous rise time above elevation. This method returns the previous rise time found after time.

Parameters:
  • time (Time) – Relative time used to searching for the previous rise time. Default is current time.

  • elevation (Quantity) – Elevation above which the rise time is computed. Default is 0 deg.

  • precision (TimeDelta) – Temporal precision of the returned rise time value. Default is 5 sec.

Returns:

Previous rise time. If no rise time is found (because the source does not cross the elevation) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.previous_rise_time(
        time=Time("2021-01-01"),
        elevation=40*u.deg,
    )
<Time object: scale='utc' format='iso' value=2020-12-31 08:24:12.434>
previous_set_time(time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.530531>, elevation=<Quantity 0. deg>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target previous set time below elevation. This method returns the next set time found before time.

Parameters:
  • time (Time) – Relative time used to searching for the previous set time. Default is current time.

  • elevation (Quantity) – Elevation below which the set time is computed. Default is 0 deg.

  • precision (TimeDelta) – Temporal precision of the returned set time value. Default is 5 sec.

Returns:

Previous set time. If no set time is found (because the source does not cross the elevation) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.previous_set_time(
        time=Time("2021-01-01"),
        elevation=40*u.deg,
    )
<Time object: scale='utc' format='iso' value=2020-12-31 17:55:12.639>
rise_time(t_min=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.529532>, elevation=<Quantity 0. deg>, duration=<TimeDelta object: scale='None' format='sec' value=86400.0>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target rise time(s) above elevation. This method returns all the rise times found in the time window ranging from t_min to t_min + duration.

Parameters:
  • t_min (Time) – Starting time of the temporal window within which rise times are looked for. Default is current time.

  • elevation (Quantity) – Elevation above which the rise time is computed. Default is 0 deg.

  • duration (TimeDelta) – Width of the temporal window within which rise times are looked for. Default is 1 day.

  • precision (TimeDelta) – Temporal precision of the returned meridian transit values. Default is 5 sec.

Returns:

Rise times above a given elevation. If no rise times are found (because the requested time window doesn’t contain any) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.rise_time(
        t_min=Time("2021-01-01"),
        elevation=0*u.deg,
        duration=TimeDelta(86400*2, format="sec")
    )
<Time object: scale='utc' format='iso' value=['2021-01-01 02:28:51.926' '2021-01-02 02:24:56.599']>

See also

Ephemerides

separation(other)[source]

Computes the angular separation between two Target instances. This method is a wrapper around astropy.coordinates.SkyCoord.separation().

Parameters:

other (Target) – Other Target from which the angular separation should be computed.

Returns:

Angular separation.

Return type:

Angle

Example:
from nenupy.astro.target import FixedTarget, SolarSystemTarget
from astropy.time import Time, TimeDelta
import numpy as np

src = FixedTarget.from_name("Cyg A")
times = Time("2022-01-01T12:00:00") + np.arange(180)*TimeDelta(2, format="jd")
seps = src.separation(
    SolarSystemTarget.from_name(
        "Sun",
        time=times
    )
)
set_time(t_min=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.530130>, elevation=<Quantity 0. deg>, duration=<TimeDelta object: scale='None' format='sec' value=86400.0>, precision=<TimeDelta object: scale='None' format='sec' value=5.0>)[source]

Computes the Target set time(s) below elevation. This method returns all the set times found in the time window ranging from t_min to t_min + duration.

Parameters:
  • t_min (Time) – Starting time of the temporal window within which set times are looked for. Default is current time.

  • elevation (Quantity) – Elevation below which the set time is computed. Default is 0 deg.

  • duration (TimeDelta) – Width of the temporal window within which set times are looked for. Default is 1 day.

  • precision (TimeDelta) – Temporal precision of the returned meridian transit values. Default is 5 sec.

Returns:

Set times below a given elevation. If no set times are found (because the requested time window doesn’t contain any) an empty Time object is returned.

Return type:

Time

Example:
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time, TimeDelta
>>> import astropy.units as u
>>> cyg_a = FixedTarget.from_name("Cyg A")
>>> cyg_a.set_time(
        t_min=Time("2021-01-01"),
        elevation=0*u.deg,
        duration=TimeDelta(86400*2, format="sec")
    )
<Time object: scale='utc' format='iso' value=['2021-01-01 23:42:41.174' '2021-01-02 23:38:45.188']>

See also

Ephemerides

property time