nenupy.astro.pointing
Pointing
|
Class to handle instrument pointing. |
- class nenupy.astro.pointing.Pointing(coordinates, time, duration=<TimeDelta object: scale='None' format='sec' value=1.0>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
AstroObject
Class to handle instrument pointing.
- Parameters:
coordinates (
SkyCoord
) – Pointing coordinates (in the equatorial frame).time (
Time
) – Pointing times.duration (
TimeDelta
) – Pointing duration.observer (
EarthLocation
) – Earth location from where the pointing is made.
See also
Instrument Pointing for more details on how to instantiate and use this class.
Added in version 2.0.0.
Attributes Summary
Pointing start times.
Pointing durations.
Methods Summary
plot
(**kwargs)Plots the elevation and azimuth versus time for the current pointing.
from_file
(file_name[, beam_index, ...])Instantiates a
Pointing
object from a NenuFAR pointing file.from_bst
(bst[, beam, analog, max_points])target_tracking
(target, time[, duration, ...])Instantiates a
Pointing
object that tracks a given celestial source target.target_transit
(target, t_min[, duration, ...])Instantiates a
Pointing
object around a source transit.zenith_tracking
(time[, duration, observer])Instantiates a
Pointing
object at the local zenith.Attributes and Methods Documentation
- property duration
Pointing durations. If this attribute is scalar, it means that the same duration should be applied to all the start times defined in
time
.- Setter:
Pointing durations.
- Getter:
Pointing durations.
- Type:
- classmethod from_file(file_name, beam_index=0, include_corrections=True)[source]
Instantiates a
Pointing
object from a NenuFAR pointing file. Several beam pointings (analog and/or numerical) could be described infile_name
. The argumentbeam_index
allows for the selection of one of them.- Parameters:
file_name (
str
) – NenuFAR pointing file, either analog (ending with.altazA
) or numerical (ending with.altazB
).beam_index (
int
) – Beam number to take into account.include_corrections (
bool
) – Include or not the pointing corrections (default isTrue
). Only has an effect on analog beam corrections.
- Returns:
Pointing derived from a NenuFAR pointing file.
- Return type:
- Example:
>>> from nenupy.astro.pointing import Pointing >>> pointing = Pointing.from_file( file_name=".../20211104_170000_20211104_200000_JUPITER_TRACKING.altazA", beam_index=1 )
- property horizontal_coordinates
Horizontal coordinates as seen from
observer
attime
.- Getter:
Horizontal coordinates.
- Type:
- plot(**kwargs)[source]
Plots the elevation and azimuth versus time for the current pointing.
- Parameters:
figsize (
tuple
) – Size of the figure. Default is(10, 5)
.figname (
str
) – File name of the figure to save. Default is''
, i.e. show the figure without saving it.title (
str
) – Set the title of the figure.display_duration (
bool
) – Switch the display ofduration
. If set toTrue
a grey time window is added to all pointing point, representing the duration of each individual pointing. Default isFalse
.
- classmethod target_tracking(target, time, duration=<TimeDelta object: scale='None' format='sec' value=3600.0>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Instantiates a
Pointing
object that tracks a given celestial source target.- Parameters:
target (
Target
) – Celestial source target to track.time (
Time
) – Start times of the pointing aiming attarget
.duration (
TimeDelta
) – Duration of each individual pointing. If this argument is a scalar, then it will be applied to every start time (defined intime
). Default is one hour.observer (
EarthLocation
) – Earth location from where the target is observed. Default is NenuFAR’s location.
- Returns:
Pointing derived while tracking a specific target.
- Return type:
- Example:
>>> from nenupy.astro.pointing import Pointing >>> from nenupy.astro.target import FixedTarget >>> from astropy.time import Time, TimeDelta >>> import numpy as np >>> cyg_a = FixedTarget.from_name("Cyg A") >>> pointing = Pointing.target_tracking( target=cyg_a, time=Time("2021-01-01 00:00:00") + np.arange(10)*TimeDelta(1800, format="sec"), duration=TimeDelta(np.ones(10)*1200, format="sec") )
- classmethod target_transit(target, t_min, duration=<TimeDelta object: scale='None' format='sec' value=3600.0>, dt=<TimeDelta object: scale='None' format='sec' value=10.0>, azimuth=<Quantity 180. deg>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Instantiates a
Pointing
object around a source transit. The next transit at a givenazimuth
is search fromt_min
. The pointing is then centered at the transit, for aduration
period. The pointing is made in steps numbered asduration/dt
.- Parameters:
target (
Target
) – Celestial source target transiting.t_min (
Time
) – Time from which the next transit is searched for.duration (
TimeDelta
) – Total duration of the pointing, centered on the transit time. Default is one hour.dt (
TimeDelta
) – Time steps of individual pointings. Default is 10 sec.azimuth (
Quantity
) – Azimuth at which the transit is computed. AValueError
exception is raised if the selectedtarget
does not cross the requiredazimuth
value. Default is 180 deg (i.e., South).observer (
EarthLocation
) – Earth location from where the target is observed. Default is NenuFAR’s location.
- Returns:
Pointing centered around a given target transit.
- Return type:
- Example:
>>> from nenupy.astro.pointing import Pointing >>> from astropy.time import Time, TimeDelta >>> pointing = Pointing.target_transit( target=cyg_a, time=Time("2021-01-01 00:00:00"), duration=TimeDelta(7200, format="sec"), azimuth=180*u.deg )
- classmethod zenith_tracking(time, duration=<TimeDelta object: scale='None' format='sec' value=1.0>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Instantiates a
Pointing
object at the local zenith.- Parameters:
time – Start times of the zenith pointing.
duration (
TimeDelta
) – Duration of each individual pointing. If this argument is a scalar, then it will be applied to every start time (defined intime
). Default is one hour.observer (
EarthLocation
) – Earth location from where the target is observed. Default is NenuFAR’s location.
- Returns:
Pointing fixed at the local zenith.
- Return type:
- Example:
>>> from nenupy.astro.pointing import Pointing >>> from astropy.time import Time, TimeDelta >>> pointing = Pointing.target_transit( target=cyg_a, time=Time("2021-01-01 00:00:00"), duration=TimeDelta(7200, format="sec"), azimuth=180*u.deg )