Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug of using non-inverse error for weights #70

Merged
merged 2 commits into from
May 27, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions magicctapipe/utils/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def calculate_mean_direction(lon, lat, weights=None):
lon: pandas.core.series.Series
Longitude in a spherical coordinate
lat: pandas.core.series.Series
Latitude in a spherical coodinate
Latitude in a spherical coordinate
weights: pandas.core.series.Series
Weights applied when calculating the mean direction

Expand Down Expand Up @@ -342,7 +342,7 @@ def get_dl2_mean(event_data):
reco_az_mean, reco_alt_mean = calculate_mean_direction(
lon=np.deg2rad(event_data['reco_az']),
lat=np.deg2rad(event_data['reco_alt']),
weights=event_data['reco_disp_err'],
weights=1/event_data['reco_disp_err'],
)

# Compute the mean of the telescope pointing directions:
Expand Down