nenupy.astro.pointing.Pointing
- class nenupy.astro.pointing.Pointing(coordinates, time, duration=None, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
AstroObjectClass 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.
Horizontal coordinates as seen from
observerattime.Methods Summary
plot(**kwargs)Plots the elevation and azimuth versus time for the current pointing.
from_file(file_name[, beam_index, ...])Instantiates a
Pointingobject from a NenuFAR pointing file.from_bst(bst[, beam, analog, max_points])target_tracking(target, time[, duration, ...])Instantiates a
Pointingobject that tracks a given celestial source target.target_transit(target, t_min[, duration, ...])Instantiates a
Pointingobject around a source transit.zenith_tracking(time[, duration, observer])Instantiates a
Pointingobject at the local zenith.Attributes and Methods Documentation
- __init__(coordinates, time, duration=None, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Methods
__init__(coordinates, time[, duration, observer])azel_driftscan(time, az, alt[, duration, ...])Return an instance of
Pointingin drift scan mode.from_bst(bst[, beam, analog, max_points])from_file(file_name[, beam_index, ...])Instantiates a
Pointingobject from a NenuFAR pointing file.hour_angle([fast_compute])local_sidereal_time([fast_compute])plot(**kwargs)Plots the elevation and azimuth versus time for the current pointing.
target_tracking(target, time[, duration, ...])Instantiates a
Pointingobject that tracks a given celestial source target.target_transit(target, t_min[, duration, ...])Instantiates a
Pointingobject around a source transit.zenith_tracking(time[, duration, observer])Instantiates a
Pointingobject at the local zenith.Attributes
Allows to modify horizontal coordinates without messing up with the actual coordinates object.
Pointing durations.
test de doc
ground_projectionHorizontal coordinates as seen from
observerattime.Pointing start times.
coordinatespolarizationvalueobserver- classmethod azel_driftscan(time, az, alt, duration=None, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Return an instance of
Pointingin drift scan mode. Azimuthazand elevationaltare fixed at everytimestep.- Parameters:
time (
Time) – Time steps of the pointing.az (
float) – Pointed azimuth in degrees.alt (
float) – Pointed elevation in degrees.duration (
TimeDelta, optional) – Duration of the pointings (if a scalar is given it is applied to all time steps), by defaultNone(the duration is set to the difference between each time steps, the last one set at 0).observer (
EarthLocation, optional) – Earth location from where the target is observed, by defaultnenufar_position.
- Returns:
The drift scan pointing instance.
- Return type:
- property custom_ho_coordinates
Allows to modify horizontal coordinates without messing up with the actual coordinates object.
- 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:
- property frequency
test de doc
- classmethod from_file(file_name, beam_index=0, include_corrections=True)[source]
Instantiates a
Pointingobject from a NenuFAR pointing file. Several beam pointings (analog and/or numerical) could be described infile_name. The argumentbeam_indexallows 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
observerattime.- 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 toTruea grey time window is added to all pointing point, representing the duration of each individual pointing. Default isFalse.
- classmethod target_tracking(target, time, duration=None, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Instantiates a
Pointingobject 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). If set to None, the duration is set to the difference between two time steps, the last being set at 0. Default isNone.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
Pointingobject around a source transit. The next transit at a givenazimuthis search fromt_min. The pointing is then centered at the transit, for adurationperiod. 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. AValueErrorexception is raised if the selectedtargetdoes not cross the requiredazimuthvalue. 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=None, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Instantiates a
Pointingobject 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 )