FOV coordinate checks for HAP-HD

Some quick FOV coordinate checks for HAP-HD.

See https://github.com/gammasky/hess-host-analyses/issues/12


In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')

In [2]:
from astropy.table import Table
table = Table.read('hess_event_list_3.fits', hdu='EVENTS')

In [3]:
table.info('stats')


<Table length=8833>
         name                mean              std              min              max      
--------------------- ------------------ ---------------- ---------------- ---------------
             EVENT_ID      1633.36363636    5121.66856254                1          345378
             BUNCH_ID      80.5562096683    45.4904843501                1             159
               OBS_ID            18406.0              0.0            18406           18406
                 TIME      96408134.3159    456.668731377    96407338.6433    96408924.392
               MULTIP      2.54602060455   0.763388934612                2               4
              TELMASK     0.636505151138   0.481005554763            False            True
                   RA             83.682          1.72309           52.989         106.497
                  DEC            24.4868          1.58699         -8.10739            41.7
              DIR_ERR                0.0              0.0              0.0             0.0
           SKYX_RADEC          0.0144652          1.60572         -17.7295         38.5221
           SKYY_RADEC          0.0447215          1.60935         -40.3573         22.9085
                 DETX          0.0224503          1.61008          -17.424         43.9161
                 DETY          0.0460626          1.60402         -34.4186         25.0796
      FOV_ALTAZ_THETA            1.82414          1.29245        0.0141514         44.2412
        FOV_ALTAZ_PHI            0.35789          102.571         -179.929         179.997
        FOV_ALTAZ_LON         -0.0460344          1.58906         -23.6449         31.0001
        FOV_ALTAZ_LAT         0.00655924          1.57661          -16.919         33.3021
      FOV_RADEC_THETA            1.82403          1.29238        0.0141506         44.2378
        FOV_RADEC_PHI           -2.56798          104.582         -179.989         179.986
        FOV_RADEC_LON          0.0449176           1.5889         -35.1596         21.7929
        FOV_RADEC_LAT         -0.0132834          1.57652         -28.7963         17.1935
                  ALT            41.8241          1.56544          24.7476         62.4672
                   AZ            9.94808          30.3018        0.0692331         359.972
                COREX            3.73407          265.654          -1670.8         1387.74
                COREY           -1.72142          243.209         -1590.12         1498.77
             CORE_ERR        2.60219e-36              0.0      2.60219e-36     2.60219e-36
                 XMAX            180.598           103.73      1.73182e-05         715.344
             XMAX_ERR           0.139427         0.219513              0.0         2.10419
               ENERGY            4.00421          11.1989         0.260853         102.404
           ENERGY_ERR           0.275461         0.607313        0.0206973          5.2606
              HIL_MSW           0.121991         0.589088         -1.99959        0.899996
          HIL_MSW_ERR           0.102183        0.0246208        0.0285308        0.190832
              HIL_MSL           0.283814          0.89393         -1.99107         1.99965
          HIL_MSL_ERR           0.144244        0.0353582        0.0306744        0.289097
FOV_RADEC_LON_ASTROPY    0.0443400478952    1.58878237603   -35.1578248604   21.7907000503
FOV_RADEC_LAT_ASTROPY   -0.0177905539829    1.57634999964   -28.7981936822     17.18667566
   FOV_RADEC_LON_DIFF     -2.07926024446   0.792609733345   -8.00939051063   6.52532690282
   FOV_RADEC_LAT_DIFF      -16.225735491   0.608440988983   -24.6793550923  -6.86899057409
           RA_ASTROPY      83.6820322695    1.72309019655    52.9889995666   106.496595676
          DEC_ASTROPY      24.4867638715    1.58698917572   -8.10738650931   41.7000435121
              RA_DIFF  -0.00228730167624 0.00720260391231 -0.0173224898617 0.0125271212539
             DEC_DIFF -0.000683806319566 0.00343228179447 -0.0148859721222 0.0125804299074
FOV_ALTAZ_LON_ASTROPY    -0.146006969255    1.58895806545   -31.1026555805   23.4805935386
FOV_ALTAZ_LAT_ASTROPY    0.0360567151088    1.57644726817   -16.8727848111   33.4161795573
   FOV_ALTAZ_LON_DIFF     -359.901177232    11440.8475397   -223569.834748   169651.849996
   FOV_ALTAZ_LAT_DIFF      106.190906061    32.7736754911   -174.294140858   410.764716824
/Users/deil/Library/Python/3.5/lib/python/site-packages/astropy-1.3.dev16367-py3.5-macosx-10.12-x86_64.egg/astropy/table/column.py:264: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  return self.data.__eq__(other)

In [4]:
plt.plot(table['FOV_RADEC_LON'], table['FOV_RADEC_LON_DIFF'], 'o')
# plt.xlim(-10, 10)
# plt.ylim(-1, 1)


Out[4]:
[<matplotlib.lines.Line2D at 0x1084b0be0>]

In [5]:
plt.plot(table['FOV_RADEC_LAT'], table['FOV_RADEC_LAT_DIFF'], 'o')


Out[5]:
[<matplotlib.lines.Line2D at 0x1086e9828>]

In [6]:
# mask = table['FOV_RADEC_THETA'] < 2
# t = table[mask][:10]
t = table[::50]
# t.pprint()
# print()
scale = 5e-3
plt.quiver(
    t['FOV_RADEC_LON'].data, t['FOV_RADEC_LAT'].data,
    scale * t['FOV_RADEC_LON_DIFF'].data, scale * t['FOV_RADEC_LAT_DIFF'].data,
    scale=1,
)
plt.xlim(-3, 3)
plt.ylim(-3, 3)


Out[6]:
(-3, 3)

In [7]:
# mask = table['FOV_RADEC_THETA'] < 2
# t = table[mask][:10]
t = table[::50]
# t.pprint()
# print()
scale = 1e-5
plt.quiver(
    t['FOV_ALTAZ_LON'].data, t['FOV_ALTAZ_LAT'].data,
    scale * t['FOV_ALTAZ_LON_DIFF'].data, scale * t['FOV_ALTAZ_LAT_DIFF'].data,
    scale=1,
)
plt.xlim(-3, 3)
plt.ylim(-3, 3)


Out[7]:
(-3, 3)

In [8]:
mask = np.abs(table['FOV_ALTAZ_LON']) < 0.3
table[mask].info('stats')


<Table length=1464>
         name                mean              std              min              max       
--------------------- ------------------ ---------------- ---------------- ----------------
             EVENT_ID       2003.7704918    11504.9922177                2           345378
             BUNCH_ID      82.5081967213    45.4608753726                1              159
               OBS_ID            18406.0              0.0            18406            18406
                 TIME      96408154.0378    456.403422053     96407340.309    96408924.3068
               MULTIP      2.59016393443   0.792768873498                2                4
              TELMASK     0.647540983607   0.477735971177            False             True
                   RA            83.6222          0.27005          82.7832           84.679
                  DEC            24.5434          1.40355          17.5322          29.0981
              DIR_ERR                0.0              0.0              0.0              0.0
           SKYX_RADEC         -0.0337305           1.4047         -4.59977          7.01221
           SKYY_RADEC          -0.011396         0.245724        -0.802559         0.924586
                 DETX         -0.0172593          1.41501         -4.60503          7.04921
                 DETY         -0.0139175         0.171898        -0.299709         0.299223
      FOV_ALTAZ_THETA            1.15433         0.836497        0.0141514          7.00297
        FOV_ALTAZ_PHI           -1.59283          93.3048         -178.133          179.947
        FOV_ALTAZ_LON          0.0139207         0.171937        -0.299288         0.299772
        FOV_ALTAZ_LAT         -0.0319276          1.41472         -4.61246          7.00256
      FOV_RADEC_THETA            1.15426         0.836447        0.0141506          7.00255
        FOV_RADEC_PHI             7.7623          92.5807         -178.156          177.356
        FOV_RADEC_LON         -0.0113958          0.24572        -0.802506         0.924506
        FOV_RADEC_LAT          0.0337195          1.40369         -6.97714          4.58974
                  ALT            41.8152          1.42554           37.052          49.0201
                   AZ            7.07954          2.31668           2.9165          11.5223
                COREX          0.0778899          245.483         -1079.24          1110.35
                COREY            -3.5001          150.665         -739.013          602.211
             CORE_ERR        2.60219e-36              0.0      2.60219e-36      2.60219e-36
                 XMAX            179.052          97.7445      1.73182e-05          677.102
             XMAX_ERR           0.141721           0.2067              0.0          1.49097
               ENERGY             2.0625          5.58213         0.376652          100.868
           ENERGY_ERR           0.162235         0.316716        0.0404894          3.81975
              HIL_MSW           0.121607         0.605078         -1.98581         0.899996
          HIL_MSW_ERR           0.109551        0.0275544        0.0288804         0.187233
              HIL_MSL           0.304509         0.861239         -1.98392          1.99146
          HIL_MSL_ERR           0.148538        0.0321087        0.0343502         0.289097
FOV_RADEC_LON_ASTROPY   -0.0119614425391   0.245702877665  -0.803061316183   0.923624982103
FOV_RADEC_LAT_ASTROPY    0.0292087959149     1.4035377846   -6.98091371271    4.58471318629
   FOV_RADEC_LON_DIFF     -2.03638499221   0.674790567474   -3.49372803651  -0.829821212999
   FOV_RADEC_LAT_DIFF     -16.2385932985   0.542590377204   -18.1095404528   -13.5975627798
           RA_ASTROPY      83.6222312016   0.270050227288    82.7831970079    84.6790187522
          DEC_ASTROPY      24.5434125331    1.40355260907    17.5321834055    29.0980846958
              RA_DIFF  -0.00244050989278 0.00723060707689  -0.016447764699  0.0117740412747
             DEC_DIFF -0.000670054088026 0.00353905014322 -0.0114116940281 0.00939264873239
FOV_ALTAZ_LON_ASTROPY    -0.206117604563   0.172113832887  -0.496385194406   0.110534982022
FOV_ALTAZ_LAT_ASTROPY   -0.0025772994036    1.41478210675   -4.57500101694    7.02533219148
   FOV_ALTAZ_LON_DIFF     -792.137885769    1238.48165291   -2863.57540206    1475.36189366
   FOV_ALTAZ_LAT_DIFF      105.661165913    28.2947972762    54.7505857005    157.388415845
/Users/deil/Library/Python/3.5/lib/python/site-packages/astropy-1.3.dev16367-py3.5-macosx-10.12-x86_64.egg/astropy/table/column.py:264: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  return self.data.__eq__(other)

In [ ]: