Skip to content

Commit

Permalink
Merge pull request #221 from cta-observatory/lst_positions
Browse files Browse the repository at this point in the history
Add LST-2 to 4 positions
  • Loading branch information
morcuended committed Jul 22, 2024
2 parents b526efb + 84a0a35 commit b7753bb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
49 changes: 46 additions & 3 deletions src/ctapipe_io_lst/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,54 @@

PIXEL_INDEX = np.arange(N_PIXELS)

#: location of lst-1 as `~astropy.coordinates.EarthLocation`
#: Distance from central pin to elevation axis
ELEVATION_AXIS_PIN_DISTANCE = 15.885 * u.m
#: location of LSTN-01 as `~astropy.coordinates.EarthLocation`
#: Taken from Abelardo's Coordinates of LST-1 & MAGIC presentation
#: https://redmine.cta-observatory.org/attachments/65827
LST1_LOCATION = EarthLocation(
lon=-17.89149701 * u.deg,
lat=28.76152611 * u.deg,
# height of central pin + distance from pin to elevation axis
height=2184 * u.m + 15.883 * u.m
height=2184 * u.m + ELEVATION_AXIS_PIN_DISTANCE
)

#: Official location of LSTN-01 as `~astropy.coordinates.EarthLocation`.
#:
#: Taken from https://gitlab.cta-observatory.org/cta-science/array-element-positions/-/blob/main/CTAN_ArrayElements_Positions.ecsv?ref_type=heads
#: EPSG coordinates transformed to lon/lat using pyproj
LST1_LOCATION_CTAO = EarthLocation(
lon=-17.891496913272913 * u.deg,
lat=28.761526467885083 * u.deg,
# height of central pin + distance from pin to elevation axis
height=2184 * u.m + ELEVATION_AXIS_PIN_DISTANCE
)

#: Official location of LSTN-02 as `~astropy.coordinates.EarthLocation`.
#:
#: See `LST1_LOCATION_CTAO` for details
LST2_LOCATION_CTAO = EarthLocation(
lon=-17.892707541577614 * u.deg,
lat=28.761847808998038 * u.deg,
height=2172.5 * u.m + ELEVATION_AXIS_PIN_DISTANCE,
)

#: Official location of LSTN-03 as `~astropy.coordinates.EarthLocation`
#:
#: See `LST1_LOCATION_CTAO` for details
LST3_LOCATION_CTAO = EarthLocation(
lon=-17.892546711522133 * u.deg,
lat=28.762845266359122 * u.deg,
height=2168.2 * u.m + ELEVATION_AXIS_PIN_DISTANCE,
)

#: Official location of LSTN-04 as `~astropy.coordinates.EarthLocation`
#:
#: See `LST1_LOCATION_CTAO` for details
LST4_LOCATION_CTAO = EarthLocation(
lon=-17.89137994602903 * u.deg,
lat=28.76244451041423 * u.deg,
height=2172.8 * u.m + ELEVATION_AXIS_PIN_DISTANCE,
)

#: Area averaged position of LST-1, MAGIC-1 and MAGIC-2 (using 23**2 and 17**2 m2)
Expand All @@ -42,7 +82,10 @@
)

LST_LOCATIONS = {
1: LST1_LOCATION,
1: LST1_LOCATION_CTAO,
2: LST2_LOCATION_CTAO,
3: LST3_LOCATION_CTAO,
4: LST4_LOCATION_CTAO,
}


Expand Down
2 changes: 1 addition & 1 deletion src/ctapipe_io_lst/tests/test_lsteventsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_subarray():
# mc uses slightly different reference location and z is off
# so only test x/y distance
distance = np.linalg.norm(mc_position[:2] - position[:2])
assert distance < 0.5 * u.m
assert distance < 0.6 * u.m

with tempfile.NamedTemporaryFile(suffix='.h5') as f:
subarray.to_hdf(f.name)
Expand Down

0 comments on commit b7753bb

Please sign in to comment.