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

Updates of NectarCam and LSTCam real data eventsource class #812

Merged
merged 67 commits into from
Dec 14, 2018

Conversation

FrancaCassol
Copy link
Contributor

Added the instrument information to the real data containers. The camera geometry files have been adde to the ctapipe-extra repository. They are:

  • LSTCam-001.camgeom.fits.gz = present geometry of the LST1 camera (001 indicate the version)
  • NectarCam-001.camgeom.fits.gz = present geometry of the NectarCam prototype (001 indicate the version)

The optics is the one of MC data.

FrancaCassol and others added 30 commits September 28, 2017 12:47
…STCameraContainer (Fields: LSTEventContainer and LSTServiceContainer)
…le with version 1.0.2 of the protozfit library
@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

This is because the files in ctapipe-extra have a bug as Carl mentioned before. the VERSION header key word does not match the filename. You should update these first I guess.

@FrancaCassol
Copy link
Contributor Author

Sorry, which version header? I have a pending PR in ctapipe-extra with a new version of the camera geometry, do you mean that? I am indeed what that that PR is a accepted... or do you mean other, that I missed?

@FrancaCassol
Copy link
Contributor Author

I mean: I am waiting (not "what") (this stupid automatic spelling)

@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

the version in the camgeom file name is 001 but the value of the fits header keyword VERSION is 1, .

The current code assumes that both are the same.

@FrancaCassol
Copy link
Contributor Author

Ok, I missed totally this comment of Karl (actually now the geometry is 2), where did he wrote it?

What should I use: 002 or 2? (for both indeed)

@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

I have no strong optionin on that. For sorting the files leading zeros might be nice if you expect more than 9 versions.

@FrancaCassol
Copy link
Contributor Author

Sorry, I am still not sure to understand where is the problem. Could you please indicate me the place where karl peak about that?
Thanks

@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

The issue is #813

@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

If I understood @kosack correctly, it is assumend that the first part of the filename and the CAM_ID are identical, so:

In [1]: from astropy.io import fits
In [2]: f = fits.open('LSTCam-001.camgeom.fits.gz')
In [3]: 'LSTCam-001.camgeom.fits.gz'.split('.')[0] 
Out[3]: 'LSTCam-001'
In [4]: f[1].header['CAM_ID'] 
Out[4]: 'LST1Cam

Is not supported at the moment.

@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

See also this issue:
cta-observatory/ctapipe-extra#13

@FrancaCassol
Copy link
Contributor Author

But I made a PR in ctapipe-extra, so solve this problem solved: https://github.com/cta-observatory/ctapipe-extra/pull/14#issue-231899562

However it seems to me that this PR is blocked because it doesn't find the NectarCAM data in ctapipe-extra:
E FileNotFoundError: Couldn't find resource: 'NectarCAM.Run0890.10events.fits.fz'

?

@maxnoe
Copy link
Member

maxnoe commented Nov 23, 2018

I think you need to wait until this is merged, a new version is tagged and then update the ctapipe-extra version in .travis.yml

@FrancaCassol
Copy link
Contributor Author

Dear all,
is there any chance to get (in a close future ;-) ) a new release of ctapipe-extra (v0.2.16) with the correct LST and NectarCAM camera geometries? This is blocking this pull request since several weeks.

Otherwise, if this is not the correct way to proceed, could you please suggest me how to go further?
Thanks for any hint

Cheers
Franca

…nt they don't work with

the use of a config dictionary but only with the direct set of the "input_url" argument.
@FrancaCassol
Copy link
Contributor Author

Dear all,
I didn't get any reply to my last comment.
LST1 starts to take data and this missing accepted PR is very annoying for a lot of people.

I retry:
As far I understand this PR is blocked by a missing new release of ctapipe-extra. Can somebody help to de-block the situation? (any proposed solution will be welcome)

Thanks very much

Cheers
Franca

@codecov
Copy link

codecov bot commented Dec 12, 2018

Codecov Report

Merging #812 into master will increase coverage by 0.25%.
The diff coverage is 97.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #812      +/-   ##
==========================================
+ Coverage   73.97%   74.22%   +0.25%     
==========================================
  Files         213      213              
  Lines       12286    12397     +111     
==========================================
+ Hits         9088     9202     +114     
+ Misses       3198     3195       -3
Impacted Files Coverage Δ
ctapipe/io/containers.py 100% <100%> (ø) ⬆️
ctapipe/io/tests/test_nectarcameventsource.py 100% <100%> (ø) ⬆️
ctapipe/io/tests/test_lsteventsource.py 100% <100%> (ø) ⬆️
ctapipe/io/nectarcameventsource.py 96.22% <95.34%> (-3.78%) ⬇️
ctapipe/io/lsteventsource.py 94.15% <97.26%> (+5.6%) ⬆️
ctapipe/instrument/camera.py 97.6% <0%> (+0.59%) ⬆️

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 fad39f0...4fbc058. Read the comment docs.

@FrancaCassol
Copy link
Contributor Author

Hi, I wonder if this PR can be accepted like that or I need to make a new push in my fork (where I changed the three remained style errors). I see from the merging the ctapipe HEAD that a lot of things changed and I wonder if this action will make a mess...

@FrancaCassol
Copy link
Contributor Author

In the case the PR can be accepted like that, please can you do it?

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.

Let us merge this and deal with style issues in a dedicated PR

@dneise dneise merged commit a1fc0eb into cta-observatory:master Dec 14, 2018
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.

None yet

4 participants