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

Make is_simulated a property of the event source #1286

Closed
maxnoe opened this issue Apr 21, 2020 · 8 comments
Closed

Make is_simulated a property of the event source #1286

maxnoe opened this issue Apr 21, 2020 · 8 comments
Milestone

Comments

@maxnoe
Copy link
Member

maxnoe commented Apr 21, 2020

I think this is important information that should not be hidden in metadata and be required to be implemented for all event sources.

Opinions?

@vuillaut
Copy link
Member

I agree.

@watsonjj
Copy link
Contributor

I have nothing against it. But we only really have one simulation source, so its quite clear already. Did you encounter a particular need for this information, other than for "metadata" reasons?

@maxnoe
Copy link
Member Author

maxnoe commented Apr 21, 2020

I don't really want to see isinstance(event_source, SimTelEventSource) when it could be
if event_source.is_simulated.

@watsonjj
Copy link
Contributor

But what follows that if statement that is guaranteed to be valid for any simulation event source?

@maxnoe
Copy link
Member Author

maxnoe commented Apr 21, 2020

Yes, e.g. writing the mc container to the DL1 file.

@watsonjj
Copy link
Contributor

Okay, that sounds valid (assuming any simulation event source is guaranteed to have implemented that container)

@maxnoe maxnoe added this to the v0.8.0 milestone Apr 21, 2020
@kosack
Copy link
Contributor

kosack commented May 4, 2020

Sounds good to me. You might also want some other meta info like what data level the event source provides.

print(eventsource.is_simulated).
print(eventsource.data_levels) 
True
['R0', 'R1']

Where eventsource.data_level is a list of what data levels are generated:

  • ["DL1",] for a DL1EventSource, when that exists
  • ["R0","R1"] for SimTelEventSource

@maxnoe
Copy link
Member Author

maxnoe commented May 4, 2020

@kosack that's a good idea, will include that

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

No branches or pull requests

4 participants