-
Notifications
You must be signed in to change notification settings - Fork 32
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
SSD cannot handle arbitrary contact IDs #288
Comments
So we have currently two PRs, #290 and #306 facing this issue differently. Regarding the So we just have to deal with how to store the weighting potentials. So I would favor the sim.weighting_potentials = Table(
contact_id = [1, 200, 34],
weighting_potential = [wp_1, wp_200, wp_34]
) Another possibility (which could go along with one of the other approaches) is to define struct ContactID
id::Int
end Such that we can overload certain Please share opinions on this @oschulz @fhagemann @schustermartin @SebastianRuffert |
So, the main issue right now is that SSD cannot handle config files in which the contacts are not labelled from In addition, the current implementation is not type stable (it is just a I think we need to address these two things separately:
In my opinion, we should realize 1.i in a small PR (to remove the bug from the code for now) and think about a long-term solution that covers 1.ii and 2. I am fine with using both
However, this does also not really seem type stable to me. |
I don't think type stability actually matters here. wp = sim.weighting_potentials[1] # <- This is fine if it is not type stable.
for event in evt_table
get_signal(event, wp)
end The only way (as far as I know) of making it entirely really type stabile would be to use a Tuple of all weighting potentials. I can imagine some use cases where it might makes sense for the user to specify contact IDs which are not labelled from I agree with your opinion with realizing 1.i for now and then think about a long-term solution a bit more. |
Right now, a config file can only be read in, if the contacts of the detector are enumerated in order from
1
toN
(where
N
is the number of contacts).Choosing something different from this results in an error when trying to display the
Simulation
:We also get an error running the simulation:
simulate!(sim)
It might be great to allow for arbitrary contact IDs (I guess that was implemented in one of the very first versions of SSD),
especially for users with a Python background who would like to give their first contact the ID
0
instead of1
.The text was updated successfully, but these errors were encountered: