Working with Instrumental Descriptions

the instrumental description is loaded by the event source, and consists of a hierarchy of classes in the ctapipe.instrument module, the base of which is the SubarrayDescription

[1]:
from ctapipe.utils.datasets import get_dataset_path
from ctapipe.io import EventSource
import numpy as np

#filename = get_dataset_path("gamma_test_large.simtel.gz") # try this one as well
filename = get_dataset_path("gamma_test_large.simtel.gz")

with EventSource(filename, max_events=1) as source:
    subarray = source.subarray
/usr/local/lib/python3.8/site-packages/setuptools_scm/git.py:68: UserWarning: "/github/workspace" is shallow and may cause errors
  warnings.warn('"{}" is shallow and may cause errors'.format(wd.path))
Downloading gamma_test_large.simtel.gz:  97%|█████████▋| 40.2M/41.7M [00:02<00:00, 12.8MB/s]

the SubarrayDescription:

[2]:
subarray.info()
Subarray : MonteCarloArray
Num Tels : 98
Footprint: 4.92 km2

                TYPE  Num IDmin  IDmax
=====================================
      LST_LST_LSTCam    4    1 ..   4
    MST_MST_FlashCam   25    5 ..  29
  SST_ASTRI_ASTRICam   69   30 ..  98
[3]:
subarray.to_table()
[3]:
Table length=98
tel_idpos_xpos_ypos_znametypenum_mirrorscamera_typetel_description
mmm
int16float64float64float64str5str3int64str8str18
1-20.065.016.0LSTLST1LSTCamLST_LST_LSTCam
2-20.0-65.016.0LSTLST1LSTCamLST_LST_LSTCam
380.00.016.0LSTLST1LSTCamLST_LST_LSTCam
4-120.00.016.0LSTLST1LSTCamLST_LST_LSTCam
50.00.010.0MSTMST1FlashCamMST_MST_FlashCam
60.0151.199996948242210.0MSTMST1FlashCamMST_MST_FlashCam
70.0-151.199996948242210.0MSTMST1FlashCamMST_MST_FlashCam
8146.6559906005859475.599998474121110.0MSTMST1FlashCamMST_MST_FlashCam
9146.65599060058594-75.599998474121110.0MSTMST1FlashCamMST_MST_FlashCam
...........................
89956.7870483398438739.8229980468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
90956.7870483398438-739.8229980468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
91-239.196990966796881109.73498535156255.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
92-239.19699096679688-1109.73498535156255.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
93-956.7870483398438739.8229980468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
94-956.7870483398438-739.8229980468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
951195.9840087890625369.91198730468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
961195.9840087890625-369.91198730468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
97-1195.9840087890625369.91198730468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam
98-1195.9840087890625-369.91198730468755.0ASTRISST2ASTRICamSST_ASTRI_ASTRICam

You can also get a table of just the OpticsDescriptions (CameraGeometry is more complex and can’t be stored on a single table row, so each one can be converted to a table separately)

[4]:
subarray.to_table(kind='optics')
[4]:
Table length=3
descriptionnametypemirror_areanum_mirrorsnum_mirror_tilesequivalent_focal_length
m2m
str18str5str3float64int64int64float64
SST_ASTRI_ASTRICamASTRISST14.562566757202148222.1500000953674316
MST_MST_FlashCamMSTMST103.8305587768554718416.0
LST_LST_LSTCamLSTLST386.7332458496094119828.0

Make a sub-array with only SC-type telescopes:

[5]:
tab = subarray.to_table()
sc_tels = tab[tab['num_mirrors'] == 2]['tel_id']  # select tel_id of entries where the mirror type is SC
newsub = subarray.select_subarray("SCTels", sc_tels)
newsub.info()
Subarray : SCTels
Num Tels : 69
Footprint: 4.92 km2

                TYPE  Num IDmin  IDmax
=====================================
  SST_ASTRI_ASTRICam   69   30 ..  98

can also do this by using Table.group_by

[6]:
gtab = tab.group_by('num_mirrors')
sc = gtab.groups[0]
newsub = subarray.select_subarray("SCTels", sc['tel_id'])
newsub.info()
Subarray : SCTels
Num Tels : 29
Footprint: 1.06 km2

                TYPE  Num IDmin  IDmax
=====================================
      LST_LST_LSTCam    4    1 ..   4
    MST_MST_FlashCam   25    5 ..  29

Explore some of the details of the telescopes

[7]:
tel = subarray.tel[5]
tel
[7]:
TelescopeDescription(type=MST, name=MST, optics=MST, camera=FlashCam)
[8]:
tel.optics.mirror_area
[8]:
$103.83056 \; \mathrm{m^{2}}$
[9]:
tel.optics.num_mirror_tiles
[9]:
84
[10]:
tel.optics.equivalent_focal_length
[10]:
$16 \; \mathrm{m}$
[11]:
tel.camera
[11]:
CameraDescription(camera_name=FlashCam, geometry=FlashCam, readout=FlashCam)
[12]:
tel.camera.geometry.pix_x
[12]:
$[-0.028867999,~-0.072168998,~0.057735,~\dots,~-0.54848301,~-0.50518101,~-0.54848301] \; \mathrm{m}$
[13]:
%matplotlib inline
from ctapipe.visualization import CameraDisplay
CameraDisplay(tel.camera.geometry)
Downloading gamma_test_large.simtel.gz: 100%|██████████| 41.7M/41.7M [00:03<00:00, 12.6MB/s]
[13]:
<ctapipe.visualization.mpl_camera.CameraDisplay at 0x7f5db95c9ca0>
../_images/examples_InstrumentDescription_18_2.png
[14]:
CameraDisplay(subarray.tel[98].camera.geometry)
[14]:
<ctapipe.visualization.mpl_camera.CameraDisplay at 0x7f5db3333220>
../_images/examples_InstrumentDescription_19_1.png

Plot the subarray

We’ll make a subarray by telescope type and plot each separately, so they appear in different colors. We also calculate the radius using the mirror area (and exagerate it a bit).

This is just for debugging and info, for any “real” use, a visualization.ArrayDisplay should be used

[15]:
subarray.peek()
../_images/examples_InstrumentDescription_21_0.png
[16]:
subarray.footprint
[16]:
$4.9235437 \; \mathrm{km^{2}}$

Get info about the subarray in general

[17]:
subarray.telescope_types
[17]:
[TelescopeDescription(type=SST, name=ASTRI, optics=ASTRI, camera=ASTRICam),
 TelescopeDescription(type=MST, name=MST, optics=MST, camera=FlashCam),
 TelescopeDescription(type=LST, name=LST, optics=LST, camera=LSTCam)]
[18]:
subarray.camera_types
[18]:
[CameraDescription(camera_name=FlashCam, geometry=FlashCam, readout=FlashCam),
 CameraDescription(camera_name=ASTRICam, geometry=ASTRICam, readout=ASTRICam),
 CameraDescription(camera_name=LSTCam, geometry=LSTCam, readout=LSTCam)]
[19]:
subarray.optics_types
[19]:
[OpticsDescription(name=ASTRI, equivalent_focal_length=2.15 m, num_mirrors=2, mirror_area=14.56 m2),
 OpticsDescription(name=MST, equivalent_focal_length=16.00 m, num_mirrors=1, mirror_area=103.83 m2),
 OpticsDescription(name=LST, equivalent_focal_length=28.00 m, num_mirrors=1, mirror_area=386.73 m2)]
[20]:
from astropy.coordinates import SkyCoord
from ctapipe.coordinates import GroundFrame
center = SkyCoord("10.0 m", "2.0 m", "0.0 m", frame='groundframe')
coords = subarray.tel_coords  # a flat list of coordinates by tel_index
coords.separation(center)
[20]:
[$95^\circ38{}^\prime18.0015{}^{\prime\prime}$ $117^\circ35{}^\prime31.273{}^{\prime\prime}$ $15^\circ56{}^\prime32.527{}^{\prime\prime}$ $166^\circ24{}^\prime15.7253{}^{\prime\prime}$ $90^\circ00{}^\prime00{}^{\prime\prime}$ $78^\circ42{}^\prime54.1682{}^{\prime\prime}$ $101^\circ17{}^\prime05.8318{}^{\prime\prime}$ $16^\circ19{}^\prime25.416{}^{\prime\prime}$ $38^\circ42{}^\prime43.3493{}^{\prime\prime}$ $138^\circ18{}^\prime26.2816{}^{\prime\prime}$ $160^\circ45{}^\prime08.6066{}^{\prime\prime}$ $45^\circ50{}^\prime11.5818{}^{\prime\prime}$ $68^\circ26{}^\prime09.4249{}^{\prime\prime}$ $11^\circ27{}^\prime33.9556{}^{\prime\prime}$ $111^\circ33{}^\prime50.5751{}^{\prime\prime}$ $134^\circ09{}^\prime48.4182{}^{\prime\prime}$ $168^\circ32{}^\prime26.0444{}^{\prime\prime}$ $78^\circ41{}^\prime43.7281{}^{\prime\prime}$ $101^\circ18{}^\prime16.2719{}^{\prime\prime}$ $16^\circ02{}^\prime24.2016{}^{\prime\prime}$ $38^\circ36{}^\prime32.8491{}^{\prime\prime}$ $141^\circ23{}^\prime27.1509{}^{\prime\prime}$ $163^\circ57{}^\prime35.7984{}^{\prime\prime}$ $45^\circ48{}^\prime42.2049{}^{\prime\prime}$ $68^\circ25{}^\prime33.0227{}^{\prime\prime}$ $11^\circ21{}^\prime07.5916{}^{\prime\prime}$ $111^\circ34{}^\prime26.9773{}^{\prime\prime}$ $134^\circ11{}^\prime17.7951{}^{\prime\prime}$ $168^\circ38{}^\prime52.4084{}^{\prime\prime}$ $49^\circ01{}^\prime53.8821{}^{\prime\prime}$ $130^\circ58{}^\prime06.1179{}^{\prime\prime}$ $153^\circ34{}^\prime33.8961{}^{\prime\prime}$ $57^\circ29{}^\prime13.3129{}^{\prime\prime}$ $80^\circ06{}^\prime19.0782{}^{\prime\prime}$ $99^\circ53{}^\prime40.9218{}^{\prime\prime}$ $122^\circ30{}^\prime46.6871{}^{\prime\prime}$ $1^\circ21{}^\prime19.7674{}^{\prime\prime}$ $23^\circ51{}^\prime29.0911{}^{\prime\prime}$ $156^\circ08{}^\prime30.9089{}^{\prime\prime}$ $178^\circ38{}^\prime40.2326{}^{\prime\prime}$ $78^\circ41{}^\prime26.1515{}^{\prime\prime}$ $101^\circ18{}^\prime33.8485{}^{\prime\prime}$ $34^\circ34{}^\prime02.3914{}^{\prime\prime}$ $57^\circ11{}^\prime07.3317{}^{\prime\prime}$ $122^\circ48{}^\prime52.6683{}^{\prime\prime}$ $145^\circ25{}^\prime57.6086{}^{\prime\prime}$ $15^\circ57{}^\prime57.3762{}^{\prime\prime}$ $38^\circ34{}^\prime56.9335{}^{\prime\prime}$ $141^\circ25{}^\prime03.0665{}^{\prime\prime}$ $164^\circ02{}^\prime02.6238{}^{\prime\prime}$ $78^\circ41{}^\prime25.2281{}^{\prime\prime}$ $101^\circ18{}^\prime34.7719{}^{\prime\prime}$ $11^\circ18{}^\prime54.9244{}^{\prime\prime}$ $168^\circ41{}^\prime05.0756{}^{\prime\prime}$ $45^\circ48{}^\prime11.2618{}^{\prime\prime}$ $68^\circ25{}^\prime20.4612{}^{\prime\prime}$ $111^\circ34{}^\prime39.5388{}^{\prime\prime}$ $134^\circ11{}^\prime48.7382{}^{\prime\prime}$ $63^\circ12{}^\prime03.8214{}^{\prime\prime}$ $85^\circ49{}^\prime13.7063{}^{\prime\prime}$ $29^\circ21{}^\prime33.4806{}^{\prime\prime}$ $51^\circ58{}^\prime41.6293{}^{\prime\prime}$ $3^\circ09{}^\prime32.0002{}^{\prime\prime}$ $25^\circ45{}^\prime53.6564{}^{\prime\prime}$ $94^\circ10{}^\prime46.2937{}^{\prime\prime}$ $116^\circ47{}^\prime56.1786{}^{\prime\prime}$ $128^\circ01{}^\prime18.3707{}^{\prime\prime}$ $150^\circ38{}^\prime26.5194{}^{\prime\prime}$ $154^\circ14{}^\prime06.3436{}^{\prime\prime}$ $176^\circ50{}^\prime27.9998{}^{\prime\prime}$ $78^\circ41{}^\prime24.8214{}^{\prime\prime}$ $101^\circ18{}^\prime35.1786{}^{\prime\prime}$ $15^\circ57{}^\prime47.4141{}^{\prime\prime}$ $38^\circ34{}^\prime53.4825{}^{\prime\prime}$ $141^\circ25{}^\prime06.5175{}^{\prime\prime}$ $164^\circ02{}^\prime12.5859{}^{\prime\prime}$ $11^\circ18{}^\prime46.4095{}^{\prime\prime}$ $168^\circ41{}^\prime13.5905{}^{\prime\prime}$ $52^\circ49{}^\prime06.0105{}^{\prime\prime}$ $75^\circ26{}^\prime16.4206{}^{\prime\prime}$ $38^\circ57{}^\prime04.2653{}^{\prime\prime}$ $61^\circ34{}^\prime14.3105{}^{\prime\prime}$ $104^\circ33{}^\prime43.5794{}^{\prime\prime}$ $127^\circ10{}^\prime53.9895{}^{\prime\prime}$ $118^\circ25{}^\prime45.6895{}^{\prime\prime}$ $141^\circ02{}^\prime55.7347{}^{\prime\prime}$ $66^\circ31{}^\prime35.8563{}^{\prime\prime}$ $89^\circ08{}^\prime46.5312{}^{\prime\prime}$ $26^\circ24{}^\prime12.8535{}^{\prime\prime}$ $49^\circ01{}^\prime22.348{}^{\prime\prime}$ $90^\circ51{}^\prime13.4688{}^{\prime\prime}$ $113^\circ28{}^\prime24.1437{}^{\prime\prime}$ $130^\circ58{}^\prime37.652{}^{\prime\prime}$ $153^\circ35{}^\prime47.1465{}^{\prime\prime}$ $5^\circ52{}^\prime51.9148{}^{\prime\prime}$ $28^\circ29{}^\prime50.4816{}^{\prime\prime}$ $151^\circ30{}^\prime09.5184{}^{\prime\prime}$ $174^\circ07{}^\prime08.0852{}^{\prime\prime}$]

Telescope IDs vs Indices

Note that subarray.tel is a dict mapped by tel_id (the indentifying number of a telescope). It is possible to have telescope IDs that do not start at 0, are not contiguouous (e.g. if a subarray is selected). Some functions and properties like tel_coords are numpy arrays (not dicts) so they are not mapped to the telescope ID, but rather the index within this SubarrayDescription. To convert between the two concepts you can do:

[21]:
subarray.tel_ids_to_indices([1,5,23])
[21]:
array([ 0,  4, 22])

or you can get the indexing array directly in numpy or dict form:

[22]:
subarray.tel_index_array
[22]:
array([-1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
       16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
       33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
       50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
       67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
       84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97])
[23]:
subarray.tel_index_array[[1,5,23]]
[23]:
array([ 0,  4, 22])
[24]:
subarray.tel_indices[1]  # this is a dict of tel_id -> tel_index, so we can only do one at once
[24]:
0
[25]:
ids = subarray.get_tel_ids_for_type(subarray.telescope_types[0])
ids
[25]:
[30,
 31,
 32,
 33,
 34,
 35,
 36,
 37,
 38,
 39,
 40,
 41,
 42,
 43,
 44,
 45,
 46,
 47,
 48,
 49,
 50,
 51,
 52,
 53,
 54,
 55,
 56,
 57,
 58,
 59,
 60,
 61,
 62,
 63,
 64,
 65,
 66,
 67,
 68,
 69,
 70,
 71,
 72,
 73,
 74,
 75,
 76,
 77,
 78,
 79,
 80,
 81,
 82,
 83,
 84,
 85,
 86,
 87,
 88,
 89,
 90,
 91,
 92,
 93,
 94,
 95,
 96,
 97,
 98]
[26]:
idx = subarray.tel_ids_to_indices(ids)
idx
[26]:
array([29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
       46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
       63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
       80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
       97])
[27]:
subarray.tel_coords[idx]
[27]:
<SkyCoord (GroundFrame): (x, y, z) in m
    [(  205.5       ,  -158.8999939 , 5.),
     ( -205.5       ,   158.8999939 , 5.),
     ( -205.5       ,  -158.8999939 , 5.),
     (  164.82301331,   424.82397461, 5.),
     (  164.82301331,  -424.82397461, 5.),
     ( -164.82301331,   424.82397461, 5.),
     ( -164.82301331,  -424.82397461, 5.),
     (  494.46899414,   110.        , 5.),
     (  494.46899414,  -110.        , 5.),
     ( -494.46899414,   110.        , 5.),
     ( -494.46899414,  -110.        , 5.),
     (    0.        ,   519.79498291, 5.),
     (    0.        ,  -519.79498291, 5.),
     (  391.60601807,   403.73898315, 5.),
     (  391.60601807,  -403.73898315, 5.),
     ( -391.60601807,   403.73898315, 5.),
     ( -391.60601807,  -403.73898315, 5.),
     (  618.07299805,   318.61099243, 5.),
     (  618.07299805,  -318.61099243, 5.),
     ( -618.07299805,   318.61099243, 5.),
     ( -618.07299805,  -318.61099243, 5.),
     (    0.        ,   723.52703857, 5.),
     (    0.        ,  -723.52703857, 5.),
     (  820.        ,     0.        , 5.),
     ( -820.        ,     0.        , 5.),
     (  435.3039856 ,   673.18603516, 5.),
     (  435.3039856 ,  -673.18603516, 5.),
     ( -435.3039856 ,   673.18603516, 5.),
     ( -435.3039856 ,  -673.18603516, 5.),
     (  220.8440094 ,   796.9029541 , 5.),
     (  220.8440094 ,  -796.9029541 , 5.),
     (  662.53295898,   569.21600342, 5.),
     (  662.53295898,  -569.21600342, 5.),
     (  883.37701416,   227.68699646, 5.),
     (  883.37701416,  -227.68699646, 5.),
     ( -220.8440094 ,   796.9029541 , 5.),
     ( -220.8440094 ,  -796.9029541 , 5.),
     ( -662.53295898,   569.21600342, 5.),
     ( -662.53295898,  -569.21600342, 5.),
     ( -883.37701416,   227.68699646, 5.),
     ( -883.37701416,  -227.68699646, 5.),
     (    0.        ,   944.30102539, 5.),
     (    0.        ,  -944.30102539, 5.),
     (  915.92297363,   472.15100098, 5.),
     (  915.92297363,  -472.15100098, 5.),
     ( -915.92297363,   472.15100098, 5.),
     ( -915.92297363,  -472.15100098, 5.),
     ( 1100.        ,     0.        , 5.),
     (-1100.        ,     0.        , 5.),
     (  471.01199341,   971.21002197, 5.),
     (  471.01199341,  -971.21002197, 5.),
     (  706.51794434,   849.80895996, 5.),
     (  706.51794434,  -849.80895996, 5.),
     ( -471.01199341,   971.21002197, 5.),
     ( -471.01199341,  -971.21002197, 5.),
     ( -706.51794434,   849.80895996, 5.),
     ( -706.51794434,  -849.80895996, 5.),
     (  239.19699097,  1109.73498535, 5.),
     (  239.19699097, -1109.73498535, 5.),
     (  956.78704834,   739.82299805, 5.),
     (  956.78704834,  -739.82299805, 5.),
     ( -239.19699097,  1109.73498535, 5.),
     ( -239.19699097, -1109.73498535, 5.),
     ( -956.78704834,   739.82299805, 5.),
     ( -956.78704834,  -739.82299805, 5.),
     ( 1195.98400879,   369.9119873 , 5.),
     ( 1195.98400879,  -369.9119873 , 5.),
     (-1195.98400879,   369.9119873 , 5.),
     (-1195.98400879,  -369.9119873 , 5.)]>

so, with that method you can quickly get many telescope positions at once (the alternative is to use the dict positions which maps tel_id to a position on the ground

[28]:
subarray.positions[1]
[28]:
$[-20,~65,~16] \; \mathrm{m}$

Manipulate the subarray With Pandas

If you prefer working with Pandas DataFrames instead of AstroPy Tables, you can always convert between the two:

[29]:
tel_string = "LST_LST_LSTCam" # an LST with LST structure and LSTCam camera
df = subarray.to_table().to_pandas()
df.set_index('tel_id')
[29]:
pos_x pos_y pos_z name type num_mirrors camera_type tel_description
tel_id
1 -20.000000 65.000000 16.0 LST LST 1 LSTCam LST_LST_LSTCam
2 -20.000000 -65.000000 16.0 LST LST 1 LSTCam LST_LST_LSTCam
3 80.000000 0.000000 16.0 LST LST 1 LSTCam LST_LST_LSTCam
4 -120.000000 0.000000 16.0 LST LST 1 LSTCam LST_LST_LSTCam
5 0.000000 0.000000 10.0 MST MST 1 FlashCam MST_MST_FlashCam
... ... ... ... ... ... ... ... ...
94 -956.787048 -739.822998 5.0 ASTRI SST 2 ASTRICam SST_ASTRI_ASTRICam
95 1195.984009 369.911987 5.0 ASTRI SST 2 ASTRICam SST_ASTRI_ASTRICam
96 1195.984009 -369.911987 5.0 ASTRI SST 2 ASTRICam SST_ASTRI_ASTRICam
97 -1195.984009 369.911987 5.0 ASTRI SST 2 ASTRICam SST_ASTRI_ASTRICam
98 -1195.984009 -369.911987 5.0 ASTRI SST 2 ASTRICam SST_ASTRI_ASTRICam

98 rows × 8 columns

[30]:
g = df.groupby('tel_description')
g.groups
[30]:
{'LST_LST_LSTCam': [0, 1, 2, 3], 'MST_MST_FlashCam': [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28], 'SST_ASTRI_ASTRICam': [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97]}
[31]:
g.groups[tel_string]
[31]:
Int64Index([0, 1, 2, 3], dtype='int64')
[32]:
df.loc[g.groups[tel_string]]
[32]:
tel_id pos_x pos_y pos_z name type num_mirrors camera_type tel_description
0 1 -20.0 65.0 16.0 LST LST 1 LSTCam LST_LST_LSTCam
1 2 -20.0 -65.0 16.0 LST LST 1 LSTCam LST_LST_LSTCam
2 3 80.0 0.0 16.0 LST LST 1 LSTCam LST_LST_LSTCam
3 4 -120.0 0.0 16.0 LST LST 1 LSTCam LST_LST_LSTCam
[33]:
lsts = subarray.select_subarray("LSTs", df.loc[g.groups[tel_string]]['tel_id'])
lsts.info()
lsts.peek()
lsts.footprint
Subarray : LSTs
Num Tels : 4
Footprint: 0.05 km2

                TYPE  Num IDmin  IDmax
=====================================
      LST_LST_LSTCam    4    1 ..   4
[33]:
$0.045238934 \; \mathrm{km^{2}}$
../_images/examples_InstrumentDescription_44_2.png
[ ]:

[ ]: