-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
…nt structure. -There is now only one module for this job. It is the equivalent to the old efieldToVoltageConverterPerChannel, with the added capability to handle CR events -The electric field class now also stores signal direction
…o electricFieldBandPassFilter
…ames it to electricFieldSignalReconstructor
… efield_object
… efield_object
…osmic_ray_mode parameter. Cosmic ray flag in station is used instead
…to electricFieldParameters
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.
Thanks for all the changes! I went through all of them and found a few things.
We should never reassign a enum number (same as in Offline). So in parameter.py, the parameters that stay in the file, should not be changed.
Also the file version needs to be bumped up, maybe even the major file version as this change is not backward compatible. If we anyway change that, we can also implement the change of the filename extension to 'nur'
In readCoreas.py: don't hand over the detector in the begin method. It is anyway unsave to buffer the number of channels as this is a time dependent quantity that might change with a different coreas event time (although currently never used). Instead, the give the detector as argument to the run method and request the number of channels for each event.
I think we should even hand over a list of the station ids to the make_sim_station function because channels might not named increasingly. For some reason, channel 2 could be missing as an example. Does the detector already has a function to return the ids of the channels of a station?
For documentation: A discussion that we had via email before starting this pull request: Hi, I have added a zenith and azimuth parameter to the E-field parameter storage for now, so E_theta and E_phi are well-defined. As I wrote previously, if we want to we can later overwrite the set_trace and get_trace functions. I agree that a coordinate system tool would be very useful, but I would like to finish the changes to the electric field first. Messing around with that is already disruptive enough, so I would not want to make it more complicated by changing the coordinate system at the same time. We can then work on the coordinate system once we are reasonably sure that the new E-field works fine. About not saving more than we need, I want to point out that right now, the electric field has an E_r component. It is of course 0, but it exists and takes up storage. Should we get rid of it? Unfortunately, I don't think the cs transformations in the radiotools can handle that right now, so maybe wait until coordinate system tools are implemented in NuRadioReco? As for what these tools should look like, how about some vector class like it is done in Offline? That seemed to work pretty well (at least for me). I also came across another detail that I am not quite happy with. If we assiciate E-fields with channels, we imply that these are what the field (and the signal direction) is at the antenna position, but this is not true for cosmic rays because of refraction at the air/ice boundary. It is not a big problem, but I can see how this could easily confuse people, so if anyone has an idea about how to clear this up, please tell me. Cheers, Christoph On 08.01.19 10:32, Anna Nelles wrote:
|
don't we want to remove the channels from sim_station? Or is it needed for anything? |
I like the suggestion to use this opportunity to rename the default to .nur files. This will make it transparent, that we are breaking backwards compatibility with this change. |
Update:
|
I am all in on making the EventWriter obey to .nur. And at least have the EventReader throw a warning, if an non .nur file is read in. Any thoughts, @cg-laser Christian? |
I think not saving E_r is not so critical but if it can be done transparently that the missing dimension is added on the fly in any getter function, I'm ok with it. We could even just do it in the (de)serialization function to save disk space. As we anyway don't consume a lot of memory, we could always have the three dimensions in memory. how would you implement splitting files up into chunks without adding something like "part_02" at the end of the filename? The ability to split up the datafile into chunks of e.g. 1GB is a very useful feature. And yes you need to change it in "modules/io/ARIANNAio.py". |
and fine for me to enforce the *.nur file ending in the eventWriter. Then the user only needs to specify the first part of the filename but not the extension. @christophwelling how do you suggest to split up events into multiple files. |
I think adding _part02 to the filename is fine, it just looks weird that it is part of the file extension. I think "filename_part02.ari" makes more sense than "filename.ari_part02". Other than that I think it's working fine. |
Update:
|
I leave this pull request open for a while in case we still need to add something. |
We definitely need to fix the efieldToVoltageConverter. The way cable delays are handled is inconsistent and it does not work correctly for cosmic ray events because it does not take signal delay because of different travel times into account. |
this brings up actually another general problem: the signal time of the efield. For neutrinos, each efield has a start time that corresponds to the travel time from the vertex to the particular channel. Then the efieldToVoltageConverter can calculate additional delays from the displacement of the channel to the efield reference point if necessary. |
Adds electricField class to store electric fields. They can be accessed by station.get_electric_fields and station.get_electric_fields_for_channels. Each electricField object stores a list of IDs of the channels it was reconstructed from, or for which it was simulated as well as it ray_path_type (for simulated E-fields).
The individual modules can mostly be used as before, with the following changes: