Earlier quoted context omitted.
That the subtlety of this post-selection scheme, the state is completely local : By construction (L37) sela only depends on particle a, and (L38) selb only depends on particle b. The measurement of a only depend on sela (and not selb), and the measurement of b only depend on selb (and not sela). There is no exchange of information. The universe already has given you the observations it needed to give you by line 38.…
Ok I think I understand your intention with the code now. Sorry I was wrong before. I think what you're talking about here is what gets called the "detection loophole" in most of the literatire. The idea that if we detect only a small enough fraction of the events then they can be a sufficiently unrepresentative sample that we think we violated a Bell inequality even though the full statistics don't. This has (in my…
In your first paper, fig 1 (a), the "ready" box play the role of the "selected".
The universe tell you whether to select or not (it's not you missing events). It just tells it to you without giving any info on the underlying state. You can build a ready box without problem, and experimenters did, and that's all that is needed to break CHSH.
You've got to see it in an abstract way. Nature's is fuzzy and experimenters will always have to define box boundaries (spatial, temporal, and entanglement-pair selection boxes). This defining create conditioning which makes breaking bell inequalities something totally normal, expected and meaningless.
A related concept that may help you see it is https://en.wikipedia.org/wiki/Correlated_equilibrium :
In a game of Chicken, you can get a better correlations between your actions that would seemingly be possible, by using a random variable oracle to coordinate. No information exchange needed. Measurement devices are kind of playing a continuous version of this game.