ara-software / AraRoot

ARA data access framework
2 stars 7 forks source link

Error check to avoid A1 pedestal confusion between ATRI and ICRR stations #64

Closed marcomuzio closed 2 months ago

marcomuzio commented 3 months ago

Added a check to make sure the stationId of data matches that of the pedestal file requested by the user, if they have requested a specific pedestal file. This mostly ensures that pedestal files for the A1 ATRI station aren't accidentally assigned to the A1 ICRR station internally, which can cause the wrong (default) pedestal file to be loaded by mistake without the user realizing.

One caveat is that this solution depends on the station calibIndex which is not unique. Namely, ARA_TESTBED and ARA_STATION1B share calibIndex=0, while ARA_STATION1 and ARA_STATION2 share calibIndex=1. This seems unlikely to cause an issue but has been noted in a comment.