def get_detector_locations(country=None, cluster=None, subcluster=None, station=None, stations=None): latitudes = [] longitudes = [] if station is not None: station_numbers = [station] elif stations is not None: station_numbers = stations else: station_numbers = NETWORK.station_numbers(country=country, cluster=cluster, subcluster=subcluster) cluster = HiSPARCStations(station_numbers, force_stale=True) for station_number in station_numbers: station = cluster.get_station(station_number) for detector in station.detectors: lat, lon, _ = detector.get_lla_coordinates() if abs(lat) <= 0.01 or abs(lon) <= 0.01: continue latitudes.append(lat) longitudes.append(lon) return latitudes, longitudes
def get_detector_locations(station): """Detector LLA locations for the detectors of a single station""" latitudes = [] longitudes = [] cluster = HiSPARCStations([station], force_stale=True) station = cluster.get_station(station) for timestamp in station.detectors[0].timestamps: cluster.set_timestamp(timestamp) for detector in station.detectors: lat, lon, _ = detector.get_lla_coordinates() if abs(lat) <= 0.01 or abs(lon) <= 0.01: continue latitudes.append(lat) longitudes.append(lon) return latitudes, longitudes
coincidence_events = next( cq.events_from_stations([coincidence], STATIONS)) reconstruction = cq._get_reconstruction(coincidence) core_x = reconstruction['x'] core_y = reconstruction['y'] plot = Plot() ref_extts = coincidence_events[0][1]['ext_timestamp'] distances = arange(1, 370, 1) times = (2.43 * (1 + distances / 30.)**1.55) + 20 plot.plot(distances, times, mark=None) for station_number, event in coincidence_events: station = CLUSTER.get_station(station_number) offsets = OFFSETS[station_number] t = relative_detector_arrival_times(event, ref_extts, offsets=offsets) core_distances = [] for d in station.detectors: x, y = d.get_xy_coordinates() core_distances.append(distance_between(core_x, core_y, x, y)) plot.scatter(core_distances, t, mark='*', markstyle=COLORS[station_number]) plot.set_ylabel('Relative arrival time [ns]') plot.set_xlabel('Distance from core [m]') plot.save_as_pdf('relative_arrival_times')