-
Notifications
You must be signed in to change notification settings - Fork 15
Update bicone gain file to correct phase bug #2
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
base: master
Are you sure you want to change the base?
Conversation
|
The following is a dump of the python script used to fix the phase values. The most relevant function being the |
|
Hello Ben! This looks fine to me honestly though Jorge or Brian would be better placed to check it since they have worked with AraSim more than I have. |
|
This looks good! Thanks Ben! Three quick questions:
|
I don't think it's quite right to characterize it as wrapping at -100, because the slope is also inverted from what it should be. Maybe another example would make it a bit clearer: If there was a sequence of phases in the file that should have been
I didn't change the file names in the code yet. In fact, when I just went to look it seems like the file that's currently loaded is still
I agree that's probably a good idea, but I'd prefer if someone with more AraSim experience could make this comparison. Any volunteers? |
|
|
It's possible someone has a version of AraSim with another antenna mode that uses the Actually, expecting that everyone will understand to change it themselves is probably unreasonable, and I think it's reasonably clear that the newer files are "more correct". Still there should be some test that the newer files don't break anything. Maybe after some testing of the simulation (e.g. the effective volume tests) we can convince ourselves that it's okay to change which files are hardcoded. If we don't make the change, it's possible it will just never happen. I can understand that probably there is little to no manpower left for actually running through the changes it makes to effective volume. Unfortunately I think the overhead for learning to run and interpret the AraSim outputs is probably too high on my end. Maybe the effective volume change can be left to a less busy time. (If one ever comes!) For the comparison Jorge and I are running this shouldn't be a problem. I think as long as we are using the same file then that element of the comparison is known to be the same and (ideally) won't affect the outcome. Concluding thoughts since the above ended up being a bit more like a stream of consciousness than I expected it to: |
|
I personally think that people before might have done the same i.e. left the file for later check and then never really got to it and then it was forgotten. It might be me being naive but I do not see how putting in the "more correct" file name might break anything in the simulation. I think we should do the merge and then change the hardcoded filenames now so that no one else in the future has to go through the hassle of going through this exercise. The error in the code (100 instead of 180) to me seems clearly like a transcribing error. I would vote for changing the hardcoded filenames too. I would leave it to Brian to make the decision on this. |
|
Thanks for this discussion. I don't think I'm worried about it breaking the simulation. I'm worried about it changing the veff in a way that is hard to predict or understand looking back in retrospect. But also, it's strictly more correct, so maybe that's life. And it probably goes in the direction we want, if Ben's prediction is right. In any case, I don't wanna be the final arbiter. Let me see if I can find the bandwidth in the next few days to throw the simulation jobs and do a veff comparison. Then we can say "Ben found a problem, we assessed the effect of the change, and we're pushing it." Does that sound reasonable? |
|
That sounds good to me. Thanks for taking on this comparison on top of what I know is a busy schedule for you. I'll go ahead and make the filename changes in this branch so that you can simply submit jobs from the two different branches. |
|
Great, thanks Ben. This is super helpful. |
toej93
left a comment
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.
Seems fine. Brian just submitted sims to the Michigan State cluster, as Ohio's one is swamped. We'll see how this changes the veff and the approve the merge if nothing substantial changes.
|
This is what we found by comparing the two implementations. Seems that the fixing doesn't change the veffs (at least noticeably). Should we merge the pull request? |
|
That looks good. Do you think you could also plot a ratio or relative difference between the two lines? It might make any differences easier to see |
|
Agreed. This effect is so small, I'm suddenly doubtful that I used the change correctly! @bhokansonfasig, the new file will be loaded with |
|
As far as I can see it should. You could add a quick debugging line in |
|
@toej93, can we get the ratio plot made? |
|
I just checked, I think somehow the git checkout didn't work, and those might me the same. I've downloaded new clean copies and will throw new jobs today. Hang tight... |
|
I can't work out if the difference is statistically significant... And I'm a little surprised that fixing the bug makes it worse, not better. @toej93 , stupid question, but are you sure the labels are right? |
|
I just double checked, and the labels are fine. |
|
We never finished reviewing this. We need to come back to it. |
|
What do we need to do to resolve this? Do we just need more statistics? I can also perform the test "from scratch" again if necessary. |
More statistics, or re-simulate from scratch. |
|
Okay, let me see if I can do both. |





This pull request addresses a bug in the
ARA_bicone6in_output.txtandARA_bicone6in_output_updated2016.txtfiles. For some reason phases with value <=-100 degrees end up losing their negative sign (e.g. -99 is okay, but -101 becomes 101 instead). It's not clear to me why this happens, but it is evident by plotting the phases for a given angle across frequencies (see plot below).I fixed the phases in
ARA_bicone6in_output_updated2016.txtand created a new fileARA_bicone6in_output_updated2019.txtwith these values. The fix was implemented based on the knowledge that the error only occurs for phases <=-100 degrees by checking for the minimum difference between the inverted phase and the previous two phase points.The plots below illustrate the difference in phases between the "old file" (2016) and the "new file" (2019) for a couple of different angles:


I also checked on the phase values of



ARA_dipoletest1_output_updated2016.txt, but found that this file does not show the same error. In fact, for most angles the phase never drops below -100 degrees anyway, except for the single case of theta=180. The plots below show no difference after applying my script to fix phase angles:Since there was no change,
ARA_dipoletest1_output_updated2016.txtwas left alone.In regards to the physics effect of this change, the new corrected phases result in less "ringing" in the waveform. This is to be expected, since large spikes in phase angle (as in the old files) will result in ringing. The plots below illustrate the effect, taking a sample Askaryan signal and passing it through just the directional gain, and then the entire Vpol signal chain:



In the end, I expect the amplitudes of the pulses on the antennas to change slightly, and this may result in a small increase in the effective volume.