-
Notifications
You must be signed in to change notification settings - Fork 35
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
Documentation / poetry improvements and fixes #773
Conversation
…mprove-optional-deps
ping @fschlueter - I hope you're happy with the changes. I think I have correctly described the way trigger times work as well in times.rst as well as the |
A general comment/question. You are often always omitting the "." at the end of a sentence. I assume this is on purpose? Is there a PEP rule/suggestion on this? Similarly, you do not start sentences with a capitalised letter. Both of that I would do but I do not care much if we just try to be consistent with that in the future (or decide intentionally to be not consistent with that)? |
To avoid this behavior we often use the following procedure, through the `NuRadioReco.modules.channelStopFilter` module: | ||
|
||
We smoothly filter the first 5% and last 5% of the trace using a Tukey window function. This is a function that goes smoothly from 0 to 1. | ||
To avoid rollover of the pulse, we add 128ns of zeros to the beginning and end of the trace. Steps 2) and 3) are performed by the channelStopFilter module | ||
Both electric fields and channels have a trace_start_time variable. The get_times() function will automatically add the trace_start_time to the time array. | ||
To avoid rollover of the pulse, we add 128ns of zeros to the beginning and end of the trace. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that really true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is what the channelstopfilter does. Whether it is actually used in practice or not is up to the user, I think : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but how it is written within the docu suggests that it is the common/default behaviour. Maybe we can add this module to the list of modules which change the timing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is/was already there. As an aside, it doesn't do what it says here (the trace start time is not adjusted), but I will make a separate bugfix for that.
I agree. Though I would like to point out that |
I was not referring to `times.rst' but the doc-strings in function definitions. |
|
||
[tool.poetry.extras] | ||
documentation = ["Sphinx", "sphinx-rtd-theme", "numpydoc"] | ||
proposal = ["proposal"] | ||
galacticnoise = ['pygdsm'] | ||
ift_reco = ['nifty5', 'pypocketfft'] | ||
muon_flux_calc = ['MCEq', 'crflux'] | ||
RNO_G_DATA = ["mattak", "runtable", "pandas"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why removing runtable and pandas from the RNO_G_DATA dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, frankly, I don't remember. But runtable
is not a public dependency so will fail (and the installation will error out) for some users (probably mainly RNO-G users that don't have their git profile set up via ssh), whereas reading RNO-G data is in theory possible for everyone with mattak
only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a separate rno-g-extras
option now with the runtable, that does not get installed by default. Not sure if there is a better solution; in any case once you try to use the RNO-G reader it suggests installing the run table, I think.
@fschlueter let me know if you're happy with it now. I also fixed the missing tables in the current documentation - not sure why or when the previous way of writing table headers was deprecated (couldn't find it in the Sphinx changelog) but I just changed it to how https://sublime-and-sphinx-guide.readthedocs.io/en/latest/tables.html suggests to write tables (well, more or less...) |
Times in `Channel <NuRadioReco.framework.channel.Channel>`, `ElectricField <NuRadioReco.framework.electric_field.ElectricField>` and | ||
`Trigger <NuRadioReco.framework.trigger.Trigger>` objects are all defined relative to the | ||
`station_time <NuRadioReco.framework.station.Station.get_station_time>` of the Station they are stored in (see the description | ||
of the :doc:`NuRadio data structure </NuRadioReco/pages/event_structure>`). These times are stored as an array of floats. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These times are stored as an array of floats.
To what does this refer?
The global time at which the event takes place is stored as the `event time <NuRadioReco.framework.event.Event.get_event_time>` | ||
in the `Event <NuRadioReco.framework.event.Event>` object. | ||
This time usually corrsponds to the "vertex time" of the first interaction for simulations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For data the event and station time are typically the same, right? The only exception I can think of is that we - as part of an event reconstruction - merge events across stations. Can we add a statement here - just to be very explicit.
@sjoerd-bouma great work, thank you so much! I have a few more minor comments (I think we should make the documentation explicit AF to never touch it again (or at least not for a very long time). |
""" | ||
returns the current primary measurement of the component, reads in the component collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, I think with the PR #788 I am adding a wrapper around this function within the detector class which probably should be used by users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then maybe you can update this docstring / the module docstring in #788? Feel free to copy and paste stuff from here if you think it applies.
For some triggers, in addition to the time of the first trigger, | ||
also all subsequent times where the trigger condition were fulfilled are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not duplicate a remark there that the trigger time is relative to the station_time?
|
||
* hardwareResponseIncorporator (sim to data): | ||
* the channel traces are folded with the amplifier response which also includes some time delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a statement that this time delay is reflected by moving the pulse within the trace and not by adjusting the trace_start_time
@fschlueter hopefully I've addressed your remaining comments. I also reformatted a couple of docstrings that were causing warnings during compilation. |
I suppose technically this could have been two PRs but no functionality should be affected.
pip install nuradiomc[documentation, proposal]
to install the correct optional dependencies. Previously, optional dependencies were implemented as developer dependencies, and would never be installed duringpip
installation.