Conversation
|
Ah this is great! I don't know when I will have time to try it but I will do for sure! |
|
@oscarxblanco I have tested it and it works very nicely! Here is the script I used: Single CPU: FF: ~10s, GA: ~25s It does present an advantage for one or few CPUs to use this method
Few differences observed wrt to the standard method, but overall the results are very consistent. |
|
Some feedback on the implementation: |
OK, I'll have a look. |
|
@swhite2401 , I have modified floodfill to provide all the tracked points, a bool set to one if the particle is lost and the number of turns the particle did. Also, floodfill is partially integrated in get_acceptance with a flag. I have to discard the number of turns in order to make it compatible with the current output. The boundary and the order of the particles is still to be defined. Is this OK for you ? And if so, what is the method that calculates the boundary ? Floodfll tracks from unstable to stable, so, the boundary implementation probably needs to be modified. |
|
Yes I think this is fine, you could even have created a GridMode.FLOODFILL to avoid too many test cases. Concerning the boundary, the floodfill method returns it already, no need to compute it! The only point is to properly order the points such that you can draw a line through them. I believe this can be done by ordering them by ascending angle. |
|
@swhite2401 , I have done the changes you requested. Please, let me know if there is anything I should modify. |
|
All looks good to me! |
swhite2401
left a comment
There was a problem hiding this comment.
The ordering in the floodfill() function could be improved in order to plot a boundary line easily but I live it up to you since this is fixed in get_acceptance().
|
I am very much in favour of the best integration of
@oscarxblanco and @swhite2401 : any of you interested in looking at that? |
|
Dear @lfarv , sorry, I hurried and didn't wait for your comments. |
|
@oscarxblanco : don't worry, I reacted very late and it's easy to create a new PR. My comments about argument naming were also concerning I can add other points:
Those are details but I think that consistency makes the user's life easier! |
Overall I would be in favor of keeping the interface of get_acceptance() unchanged (also for backward compatibility) and adapt the flood_fill option to it which does not look to complicated. I agree that another PR is fine. |



Dear all,
this PR adds a function called 'atfloodfill' to AT matlab and 'floodfill' to pyat in order to explore the region of acceptance from the unstable to the stable area. It has been discussed previously here #1011 .
In MATLAB it can be used in this way.
and the acceptance region can be plot with the following commands
The boundary of the acceptance region is not provided but could be calculated from the output. Typically it could be done by filtering, interpolation over angular sectors from the mid-point of the acceptance, or with a rule similar to the game of life and joining the remaining dots. The user could decide which suits the best the needs depending on calculation time, precision and so on.
Similarly, in pyat it could be called like:
pyat allows to parallelize the calculation with a custom tracking that chooses what particles to track next depending on the tracking results of previous particles.