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

Remove all hillas_paramters but version 5, fixes #866 #904

Merged
merged 5 commits into from
Jan 4, 2019

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Dec 14, 2018

No description provided.

@maxnoe maxnoe changed the title Remove all hillas_paramters but version 5 Remove all hillas_paramters but version 5, fixes #866 Dec 14, 2018
@codecov
Copy link

codecov bot commented Dec 14, 2018

Codecov Report

Merging #904 into master will decrease coverage by 0.39%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #904     +/-   ##
========================================
- Coverage    82.7%   82.3%   -0.4%     
========================================
  Files         186     186             
  Lines       10978   10709    -269     
========================================
- Hits         9079    8814    -265     
+ Misses       1899    1895      -4
Impacted Files Coverage Δ
ctapipe/image/tests/test_hillas.py 100% <100%> (ø) ⬆️
ctapipe/image/hillas.py 100% <100%> (+2.45%) ⬆️
ctapipe/instrument/camera.py 95.8% <0%> (-1.8%) ⬇️
...apipe/reco/tests/test_regressor_classifier_base.py 93.93% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1fc0eb...f76a2b8. Read the comment docs.

kosack
kosack previously approved these changes Dec 14, 2018
@maxnoe
Copy link
Member Author

maxnoe commented Dec 17, 2018

codacy does not seam to support type annotations, can we change that? @kosack

@maxnoe maxnoe requested a review from a team December 17, 2018 09:29
@kosack
Copy link
Contributor

kosack commented Dec 18, 2018

codacy does not seam to support type annotations, can we change that? @kosack

Yes, I've had this problem before - it seems to detect ctapipe as python 2.7... I couldn't find a way to change it - their help system was not useful (it just says it auto-detects it), and recommends an option to pylint that seem to have no effect. Maybe we can contact them.

https://support.codacy.com/hc/en-us/articles/115002330985-Specifying-your-Python-version

@maxnoe
Copy link
Member Author

maxnoe commented Dec 18, 2018

It could also be that their python 3 is < 3.5 which added type annotations.

@@ -690,7 +77,7 @@ def hillas_parameters_5(geom: CameraGeometry, image):
width, length = np.sqrt(eig_vals)

# psi is the angle of the eigenvector to length to the x-axis
psi = np.arctan2(eig_vecs[1, 1], eig_vecs[0, 1])
psi = np.arctan(eig_vecs[1, 1] / eig_vecs[0, 1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a change in implementation, I assume. Could you just shortly comment in the PR discussion (for later reference) why this change was needed and maybe which test was affected by this change (if at all).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I assume test_with_toy() (since it is a new test) discovered this little error and hence it was fixed within this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this was also discussed in Dortmund. It is basically the question what the support of the psi angle is. The size of the support was always π, but it was at different offsets.

Using np.arctan instead of arctan2 makes sure the interval is [-π/2, π/2]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an error, just a very small improvement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for still writing it down here for reference

Copy link
Member

@dneise dneise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Can be merged. Just a little clarification in the PR discussion could help for later reference.

@maxnoe maxnoe merged commit c5f609b into cta-observatory:master Jan 4, 2019
@maxnoe maxnoe deleted the remove_hillas branch January 4, 2019 10:34
watsonjj added a commit to watsonjj/ctapipe that referenced this pull request Jan 7, 2019
* master: (22 commits)
  Remove all hillas_paramters but version 5, fixes cta-observatory#866  (cta-observatory#904)
  Fix docstring of EventSeeker, fixes cta-observatory#768 (cta-observatory#914)
  Do not set autodownload, fixes doc build (cta-observatory#910)
  Import bokeh.palletes correctly, fixes cta-observatory#911 (cta-observatory#912)
  Fix SST-1M to be DC and not SC. Solves cta-observatory#905 (cta-observatory#908)
  Fix a few test warnings (cta-observatory#902)
  Updates of NectarCam and LSTCam real data eventsource class (cta-observatory#812)
  Implemented FACT image cleaning (cta-observatory#862)
  remove `config=None, tool=None` in some tests (cta-observatory#897)
  Remove flow submodule (got moved to its own package) (cta-observatory#893)
  Cleaning the ctapipe folder. this has been empty for 3 years. (cta-observatory#892)
  Additional metadata from pyhessio, similar to cta-observatory#655 (cta-observatory#895)
  add scikit-learn to install_requires (cta-observatory#877)
  Add .mailmap (cta-observatory#894)
  Fix subarray peek. No more warnings. (cta-observatory#841)
  SimTelEventSource using pyeventio (cta-observatory#864)
  Use sparse neighbor matrix (cta-observatory#826)
  Add test how it should be (cta-observatory#842)
  fix errordef > 0. (cta-observatory#839)
  Fix warning about already closed hessio file (cta-observatory#834)
  ...

# Conflicts:
#	ctapipe/analysis/camera/chargeresolution.py
#	ctapipe/tools/extract_charge_resolution.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants