diff --git a/docs/paper/the-karl-code/referee_report_2.md b/docs/paper/the-karl-code/referee_report_2.md
index 9b6d31c..3d86573 100644
--- a/docs/paper/the-karl-code/referee_report_2.md
+++ b/docs/paper/the-karl-code/referee_report_2.md
@@ -5,7 +5,7 @@ gr { color: Green }
cs { color: Red; background-color: White }
fs { color: Yellow; background-color: Black}
csfs {color: Orange; background-color: #5f6a6a }
-done {color: green}
+done {color: green; font-style: italic}
reply {color: blue; font-weight: bold}
note {color: red; background-color: Black; font-style: italic; font-weight: bold}
@@ -25,23 +25,23 @@ The paper omits much of the information that is the most interesting about this
Following the two referee reports we have made a large number of changes. While doing so we have tried to clarify the logic, avoided repetitions and focussed on the new developments. As far as we know the KARL code is the only freely available code for the simulation of tritium experiments - this is the point that makes it most interesting.
We have reduced the explaination of basic concepts to a minimum, but we believe that a minimal explaination is required for context.
-2. C, F: Almost all the "results" are referred out to Ref [7], which makes the reader wonder why it is necessary to have two papers rather than one. I would like to encourage the authors to bring the results forward into this text. I also encourage them to include the scripts that generate these as documented examples in the code repository, since these are the actual code use cases that an external user may want to recreate.
+2. Almost all the "results" are referred out to Ref [7], which makes the reader wonder why it is necessary to have two papers rather than one. I would like to encourage the authors to bring the results forward into this text. I also encourage them to include the scripts that generate these as documented examples in the code repository, since these are the actual code use cases that an external user may want to recreate.
-3. C, F: Barely any performance estimates are given. For the two stepper algorithms, for example, how different are the simulation results, and at what relative CPU cost? What degree of uncertainty is associated with granularity of the geometry? How many events need be simulated for a typical application in KATRIN and how long does this take? Which of the processes carry the most time cost, and can any of them be neglected for faster simulations without losing too much accuracy?
-
+3. Barely any performance estimates are given. For the two stepper algorithms, for example, how different are the simulation results, and at what relative CPU cost? What degree of uncertainty is associated with granularity of the geometry? How many events need be simulated for a typical application in KATRIN and how long does this take? Which of the processes carry the most time cost, and can any of them be neglected for faster simulations without losing too much accuracy?
+
We have added a performance estimate for the two mover algorithms. These do not include any sort of estimate about the physical time for a simulation, however, a scaling graph is provided in the paper. All of the remaining issues depend very strongly on the specific setup of a simulation. E.g. the uncertainty of the geometry depends a lot on the gradients within the provided profile of the background gas and the most costly process depends on the magnitude of the background gas, since that determines the mean free path.
4. I took a look at the source code. There are almost no comments anywhere, in either the headers or source, and this is especially problematic when many of the functions accept an argument that is simply named "object". It seems to me it would be good practice to add comments to at least add comments to explain what each function does, what it accepts as input and gives as output.
We have written extensive comments for the source code. Our main objective was to make the functions readable, some of the inner workings are not that well documented.
-5. C, F: There are some example scripts given in the codebase, but they are not referenced in the paper, do not come with documentation, and it is not clear what they do in terms of expected input, processing and output. Somewhere it should be made clear how one should run these examples, what they do, and what the expected output is. Furthermore, the examples should contain at least some semi-realistic use cases of the code for addressing relevant physics questions for tritium experiments.
+5. There are some example scripts given in the codebase, but they are not referenced in the paper, do not come with documentation, and it is not clear what they do in terms of expected input, processing and output. Somewhere it should be made clear how one should run these examples, what they do, and what the expected output is. Furthermore, the examples should contain at least some semi-realistic use cases of the code for addressing relevant physics questions for tritium experiments.
We have added a section to the README in karl that explains a bit what the different given json files are. A semi-realistic use case is always included with katrin_parameter_example.json.
I now proceed to give some line-by-line comments -
Page 3:
-Line 27: C: Please define what is meant by "high" energy electrons. How dominant is elastic scattering over inelastic in this energy range?
+Line 27: Please define what is meant by "high" energy electrons. How dominant is elastic scattering over inelastic in this energy range?
We have rephrased this completely. High-energy electrons usually refers to energies near the endpoint of beta decay.
Line 32: I don't know what is meant by "ab initio" in this sentence.
@@ -65,14 +65,14 @@ Line 24: mention the mean free path used to sample a poisson process (as w
Line 28: C: "density is proportional to cumulated time" - presumably it depends not only on the time but also on the flux into the segment and also the volume of the segment? How large are the segments? Is there variability of density across those segments? text changes necessary? Stuff is explaned in the non-introduction part Sag was dazu!
-Line 31: "likeliness of recombination" → "rate of recombination"? Reworded the sentence to make the original intent clearer
+Line 31: "likeliness of recombination" → "rate of recombination"?
We have reworded the sentence to make the original intent clearer
Page 5:
-Line 21: mean free path has been used earlier, introduce the acronym then.
Done
+Line 21: mean free path has been used earlier, introduce the acronym then.
We have removed the acronym earlier in the text.
Page 9:
-C: "Additionally, the particle class only accepts…" → the relevance of this comment is not clear to me. What would be the alternative?
removed that sentence
+C: "Additionally, the particle class only accepts…" → the relevance of this comment is not clear to me. What would be the alternative?
We have removed that sentence since it was indeed superfluous.
Page 10: F: "The density fields need a higher resolution than the density difference". Why? Can you be quantitative about the scale of error introduced with some different resolutions? Perhaps a plot showing the accuracy for a few choices?
@@ -81,26 +81,26 @@ Page 11-12: F: It reads oddly that the drift mover is treated in so much m
Page 13:
I see that trapped particles are killed by the simulation. But doesnt this invalidate the density field calculation, since trapped particles should have a very long retention time and hence contribute a lot to the density? Do trapped particles also
You are essentially correct: Dumping particles could invalidate the density fields. This is a somewhat delicate choice of the max interaction counter. We have added some plots showing which max interaction numbers yield correct density fields.
-Line 36: C: what does "macroscopic" mean in this sentence? changed; let someone read over to check if better
+Line 36: what does "macroscopic" mean in this sentence?
We have removed the mention of the "macroscopic cross section" entirely and have specified, that it is the cross section scaled by the density of the target specie.
-Figure 1: C, F: Don't the ions and electrons - especially trapped ones - contribute to the space charge in the volume, and hence affect the E and B fields? So shouldn't there be a line "into" the E and B fields box from somewhere? How are the effects of space charge handled in general?
+Figure 1: Don't the ions and electrons - especially trapped ones - contribute to the space charge in the volume, and hence affect the E and B fields? So shouldn't there be a line "into" the E and B fields box from somewhere? How are the effects of space charge handled in general?
-General comment: C: for each kind of interaction I recommend to include an equation so its clear to the reader what the process is, e.g. "elastic scattering e + X -> e+ X, where X=[T2, ….or whatever else]". I understand that the code is written to allow flexibility so these can be extended, but explaining what is implemented now will help the reader understand the role of each process. Included prototypical interaction examples and changed text a bit
+General comment: for each kind of interaction I recommend to include an equation so its clear to the reader what the process is, e.g. "elastic scattering e + X -> e+ X, where X=[T2, ….or whatever else]". I understand that the code is written to allow flexibility so these can be extended, but explaining what is implemented now will help the reader understand the role of each process.
We have included an example for each interaction in the proposed way. However, we refrained from the usage of "X" since that would unnecessarily complicate the examples.
Page 14: Elastic scattering: please include figures of the various cross sections, indicating the models that are combined, the data, and the version recommended for use in simulations in KARL.
This has been updated.
Line 40: "for tracked particles the drift velocity is assumed to be zero and the density field". Why is this a valid assumption? I can imagine a particle making gyro orbits has a typical velocity much larger than its mean drift velocity, for example.
This sentence has been extremely misleading - we have removed it completely.
-Line 44: C, F: the description here is confusing. Presumably theta and phi are drawn in the COM frame and then mapped to lab frame, not vice versa, right? It reads here as if they are randomly drawn in the lab frame, if thats so please explain why and how.
+Line 44: the description here is confusing. Presumably theta and phi are drawn in the COM frame and then mapped to lab frame, not vice versa, right? It reads here as if they are randomly drawn in the lab frame, if thats so please explain why and how.
As before we have clarified the use of lab and COM frame, which should solve this problem.
-Clustering: F: please include a figure with the cross sections. It is actually not totally clear here what clustering interactions are considered (what exactly is the initial state and what is the final state), can you explain it more explicitly? Please also briefly explain the approaches taken in refs 15,16 to evaluate these cross sections.
As for many other processes also here more plots and equations are given. %Reference 19&20
+Clustering: please include a figure with the cross sections. It is actually not totally clear here what clustering interactions are considered (what exactly is the initial state and what is the final state), can you explain it more explicitly? Please also briefly explain the approaches taken in refs 15,16 to evaluate these cross sections.
As for many other processes also here more plots and equations are given. %Reference 19&20
-Page 15: F: Recombination: please include a figure giving the cross sections from data and recommended cross section for use in KARL. Briefly explain the approaches taken in 17,18,19 to measure or evaluate these cross sections. Also, can you comment on whether recombination strictly two body or if three body effects are improtant, for example?
+Page 15: Recombination: please include a figure giving the cross sections from data and recommended cross section for use in KARL. Briefly explain the approaches taken in 17,18,19 to measure or evaluate these cross sections. Also, can you comment on whether recombination strictly two body or if three body effects are improtant, for example?
Charge exchange: please give figures, equation for process, brief discussion on how its measured.
Figures have been added.
-Excitation: C, F: same comment as above.
+Excitation: same comment as above.
Page 16: Line 15: Shouldn't the ionization energy threshold be applied in the center of mass frame? Text suggests it is in the lab frame. Please also give plots of cross sections etc.
You are completely right, this has been corrected. "A few" cross section plots have been added.
@@ -112,43 +112,43 @@ First paragraph of this section seems verbose, can be trimmed down.
Line 41: I don't understand why the sentence begins "However," -this seems to imply something in contradiction to the previous paragraph, but it is not. Instead consider "Alternatively,"
We have rephrased this paragraph.
-Line 53: F: what is the meaning of either "reasonable" and "robust" in this context?
We have changed this to physically correct and low-noise
+Line 53: what is the meaning of either "reasonable" and "robust" in this context?
We have changed this to physically correct and low-noise
-Line 55: F: This is the first mention of rotation. Where is the physics of molecular rotation included? Is it improbable? How much so? Please expand.
After internal discussions we have reached the conclusion that mentioning molecular rotation at this stage is unnecessary.
+Line 55: This is the first mention of rotation. Where is the physics of molecular rotation included? Is it improbable? How much so? Please expand.
After internal discussions we have reached the conclusion that mentioning molecular rotation at this stage is unnecessary.
Page 19:
-Line 40: C, F: I think "however" is an odd construction here. I would suggest to begin with "the injector class can be configured in a number of ways. The most commonly used is…". And later, "another approach to injection is…"
The "however" was removed
+Line 40: I think "however" is an odd construction here. I would suggest to begin with "the injector class can be configured in a number of ways. The most commonly used is…". And later, "another approach to injection is…"
The "however" was removed
-Figure 3: C: Please explain "weak scaling" and "Ideal" in this figure.
+Figure 3: Please explain "weak scaling" and "Ideal" in this figure.
We have added a short explanation of the figure in the text.
Page 21:
-Line 16: C: less than 1Gb, but for how many events? text change necessary? It is mentioned that only derived properties (density, current, deletions) are stored, for which the size does not depend on the number of events. Maybe mention the parameters for the largest output?
+Line 16: C: less than 1Gb, but for how many events?
text change necessary? It is mentioned that only derived properties (density, current, deletions) are stored, for which the size does not depend on the number of events. Maybe mention the parameters for the largest output?
-Lines 20-21: I find it hard to understand what this sentence is trying to tell me.
We are unsure which sentence was meant here>
+Lines 20-21: I find it hard to understand what this sentence is trying to tell me.
We are unsure which sentence was meant here
-Line 37: C: Value has to be provided by its value and its unit; dual use of the word value, seems circular? changed, proof-reading necessary
+Line 37: Value has to be provided by its value and its unit; dual use of the word value, seems circular?
We have rephrased this sentence to be more clear in the division of physical vs numerical value.
Line 42: "Functions are an integral part of the code", is this not a statement about code in general, or perhaps even mathematics in general?
We have removed this more philosophical statement.
-Line 42: C, F: More generally in this section it seems far too many words are spent explaining concepts that any user of this code will already know, and can be easily inferred from reading the source code, for example, explaining what a scalar or vector field is. It seems that lines P21 L42 - Page 22 L33 could be replaced with a single sentence, "the code implements utility classes for functions returning scalar fields, and three kinds of vector fields (constant vector, Z-pointing vector, and generic vector)", for example.
+Line 42: More generally in this section it seems far too many words are spent explaining concepts that any user of this code will already know, and can be easily inferred from reading the source code, for example, explaining what a scalar or vector field is. It seems that lines P21 L42 - Page 22 L33 could be replaced with a single sentence, "the code implements utility classes for functions returning scalar fields, and three kinds of vector fields (constant vector, Z-pointing vector, and generic vector)", for example.
Page 24:
- C, F
+
The particle queue is introduced, and then it is clarified that it is not a queue. The code design seems appropriate, but can't the authors then rename it to something other than a queue, since it is not one?? Queue2List
Test cases section:
- C, F
-The test provided is one useful unit test. But it does not seem to me to be as generic a test as the authors claim, since recovery of the Maxwell Boltzmann distribution after thermalization is a very generic expectation and would happen in any energy and momentum-conversing system where the particle kinematics are randomized by interactions with background gas - this test would pass even if the various interactions, geometry, etc were implemented dramatically wrongly. Some more strenuous tests (compared to either data or calculated expectations) would seem to me to be appropriate to validate the code, here.
+
+The test provided is one useful unit test. But it does not seem to me to be as generic a test as the authors claim, since recovery of the Maxwell Boltzmann distribution after thermalization is a very generic expectation and would happen in any energy and momentum-conversing system where the particle kinematics are randomized by interactions with background gas - this test would pass even if the various interactions, geometry, etc were implemented dramatically wrongly. Some more strenuous tests (compared to either data or calculated expectations) would seem to me to be appropriate to validate the code, here.
We have extended the test cases section by a test for each of the implemented interactions.
Page 26:
-F: Ref [7] is referenced heavily here. I think it is not really appropriate to defer all discussions of tests and results to another paper - if it is not a self contained reference to the code, its not so clear what the purpose of the current paper is. I suggest:
+ Ref [7] is referenced heavily here. I think it is not really appropriate to defer all discussions of tests and results to another paper - if it is not a self contained reference to the code, its not so clear what the purpose of the current paper is. I suggest:
Include results of tests here and
Ensure they are implemented as example scripts in the code base.
We have followed your suggestion and moved a number of results and many tests - the majority of those are not included in [7] - in the paper. We would like to point out that the primary purpose of this paper is the distribution of simulation tools which are required by the community.
Page 27:
-Line 15-24 F: a lot of claims are given here in a short space it is not obvious from the results presented that this is the interpretation. Can the authors provide more plots or quantitative arguments to demonstrate that the observed distributions are a result of the expected dynamics of clustering?
We have now added the cross section graph for the clustering and also several plots showing the composition of the species. It seems evident for us that with growing distance from the center the tritium ions undergo clustering processes.
\ No newline at end of file
+Line 15-24 a lot of claims are given here in a short space it is not obvious from the results presented that this is the interpretation. Can the authors provide more plots or quantitative arguments to demonstrate that the observed distributions are a result of the expected dynamics of clustering?
We have now added the cross section graph for the clustering and also several plots showing the composition of the species. It seems evident for us that with growing distance from the center the tritium ions undergo clustering processes.
\ No newline at end of file