FixedPointingInfo#

class gammapy.data.FixedPointingInfo(meta)[source]#

Bases: object

IACT array pointing info.

Data format specification: POINTING

Parameters
metameta

Meta header info from Table on pointing

Examples

>>> from gammapy.data import PointingInfo
>>> path = '$GAMMAPY_DATA/tests/pointing_table.fits.gz'
>>> pointing_info = PointingInfo.read(path)
>>> print(pointing_info)
Pointing info:

Location:     GeodeticLocation(lon=<Longitude 16.50022222 deg>, lat=<Latitude -23.27177778 deg>, height=<Quantity 1835. m>)
MJDREFI, MJDREFF, TIMESYS = (51910, 0.000742870370370241, 'TT')
Time ref:     2001-01-01T00:01:04.184
Time ref:     51910.00074287037 MJD (TT)
Duration:     1586.0000000000018 sec = 0.44055555555555603 hours
Table length: 100

START:
Time:  2004-01-21T19:50:02.184
Time:  53025.826414166666 MJD (TT)
RADEC: 83.6333 24.5144 deg
ALTAZ: 11.4575 41.3409 deg


END:
Time:  2004-01-21T20:16:28.184
Time:  53025.844770648146 MJD (TT)
RADEC: 83.6333 24.5144 deg
ALTAZ: 3.44573 42.1319 deg

Note: In order to reproduce the example you need the tests datasets folder. You may download it with the command gammapy download datasets --tests --out $GAMMAPY_DATA

Attributes Summary

altaz

ALT/AZ pointing position computed from RA/DEC (SkyCoord) for the midpoint of the run.

altaz_frame

ALT / AZ frame (AltAz).

duration

Pointing duration (TimeDelta).

fixed_altaz

The fixed coordinates in AltAz of the observation.

fixed_icrs

The fixed coordinates in ICRS of the observation.

location

Observatory location (EarthLocation).

mode

See PointingMode, if not present, assume POINTING

obstime

Average observation time for the observation (Time).

radec

RA/DEC pointing position from table (SkyCoord).

time_ref

Time reference (Time).

time_start

Start time (Time).

time_stop

Stop time (Time).

Methods Summary

get_altaz(obstime)

Get the pointing position in AltAz frame for a given time.

get_icrs(obstime)

Get the pointing position in ICRS frame for a given time.

read(filename[, hdu])

Read pointing information table from file to obtain the metadata.

Attributes Documentation

altaz#

ALT/AZ pointing position computed from RA/DEC (SkyCoord) for the midpoint of the run.

Use get_altaz to get the pointing at a specific time, correctly handling different pointing modes.

altaz_frame#

ALT / AZ frame (AltAz).

duration#

Pointing duration (TimeDelta).

The time difference between the TSTART and TSTOP.

fixed_altaz#

The fixed coordinates in AltAz of the observation.

None if not a DRIFT observation

fixed_icrs#

The fixed coordinates in ICRS of the observation.

None if not a POINTING observation

location#

Observatory location (EarthLocation).

mode#

See PointingMode, if not present, assume POINTING

obstime#

Average observation time for the observation (Time).

radec#

RA/DEC pointing position from table (SkyCoord).

Use get_icrs to get the pointing at a specific time, correctly handling different pointing modes.

time_ref#

Time reference (Time).

time_start#

Start time (Time).

time_stop#

Stop time (Time).

Methods Documentation

get_altaz(obstime)[source]#

Get the pointing position in AltAz frame for a given time.

If the observation was performed tracking a fixed position in ICRS, the icrs pointing is transformed at the given time using the location of the observation.

If the observation was performed in drift mode, the fixed altaz coordinate is returned with obstime attached.

Parameters
obstime: `astropy.time.Time`

Time for which to get the pointing position in AltAz frame

get_icrs(obstime)[source]#

Get the pointing position in ICRS frame for a given time.

If the observation was performed tracking a fixed position in ICRS, the icrs pointing is returned with the given obstime attached.

If the observation was perfomed in drift mode, the fixed altaz coordinates are transformed to ICRS using the observation location and the given time.

Parameters
obstime: `astropy.time.Time`

Time for which to get the pointing position in ICRS frame

classmethod read(filename, hdu='EVENTS')[source]#

Read pointing information table from file to obtain the metadata.

Parameters
filenamestr

File name

hduint or str

HDU number or name

Returns
pointing_infoPointingInfo

Pointing info object