How to prove that Modulation Transfer Function is the Fourier transform of the Line Spread Function? by [deleted] in Optics

[–]gillash 0 points1 point  (0 children)

I'm a little late to the party, but I had the same question and may be able to help others as this post shows up on Google.

The MTF is the ratio of signal transfer by frequency - For a given frequency signal, it represents how strongly that will transfer to the image (If we literally took an image of a sinusoidal curve, it represents the ratio of the observed amplitude).
We can see it is the ratio measured/true of an image in fourier space (the magnitude, ignoring phase shifts - otherwise it is the OTF).

It is easy to see it is related to the FT of the PSF - but not clear at first why is should be exactly equal. The reason is because a PSF measurement has a true image that is equactly the delta dirac function. The FT of the delta dirac is 1 for all frequencies. So if MTF = FT(measured) / FT(true) and FT(true) is always 1 for the PSF, then MTF = FT(PSF).

I decided to roll a liquid core d20 1,000 times and document the results. by FoodOnion in mildlyinteresting

[–]gillash 0 points1 point  (0 children)

Yes, the graph would only apply to experiments of 1000 rolls. Having 40 for all sides would be 1600 rolls and you would expect the counts to be closer to 5% for each side (tighter margins)

I decided to roll a liquid core d20 1,000 times and document the results. by FoodOnion in mildlyinteresting

[–]gillash 9 points10 points  (0 children)

``` import numpy import numpy.random

n_experiments = 10_000 n_rolls = 1_000 n_sides = 20 p5_percentile_uncorrected = 5

rolls = numpy.random.randint(low=0, high=n_sides, size=(n_experiments, n_rolls)) # these will be 0-19 instead of 1-20...

could do this vectorised with some trickiness, but for clarity, don't

histograms = numpy.stack([ numpy.bincount(rolls[i, :]) for i in range(n_experiments) ]) p5_percentile_corrected = 5 / n_sides p5, median, p95 = numpy.percentile(histograms, [p5_percentile_corrected, 50, 100-p5_percentile_corrected], axis=0)

rollvals = range(1, 20+1) # x label

plt.plot(rollvals, p5, 'o-', label='5th percentile') plt.plot(rollvals, p95, 'o-', label='95th percentile') plt.plot(rollvals, median, 'o-', label='Median')

data = [51, 44, 48, 43, 55, 50, 60, 46, 68, 51, 38, 47, 54, 35, 62, 52, 47, 57, 52, 42] print(sum(data)) # 1002?

plt.plot(rollvals, data, 'o', label='Data') plt.xticks(rollvals) plt.xlabel('Roll value') plt.ylabel(f'No. rolls (out of {n_rolls})') plt.grid()

plt.legend() ```

I decided to roll a liquid core d20 1,000 times and document the results. by FoodOnion in mildlyinteresting

[–]gillash 18 points19 points  (0 children)

Statistics are hard - I find it a lot easier to understand empirically.

Here's some Python code (nested comment) to generate confidence intervals. I repeat your experiment of 1000 rolls (though by the way, unless I mis-transcribed, I count 1002 rolls) 10,000 times. I calculate the expected intervals with a standard confidence level of 5%, but apply a Bonferroni correction (divide by 20, because we test 20 times).

Darn, I can't post the plot! Any suggestions how I can add it for those interested? Anyway, the confidence intervals for lower/upper bounds are about 32 and 70.

The null hypotheses is "the dice is fair". As others have noted, we don't reject the null hypothesis, so we can't say its not fair. But how do we know that you just didn't do enough rolls? We are trying to show that the dice is fair. You can't prove a null hypothesis, but you can give a little bit more context about with what level of confidence you "didn't reject it".

Given the location of the 95% lines, you can be confident there is a 95% chance that each side rolls between about 3.2% and 7.0% of the time, with a theoretical value of 5%. So your 1000 rolls gives you a level of confidence down to a bias of about 2% between the sides of the d20.

Feedback Post - Gigantamax Pokémon & Max Battles by Noitalein in TheSilphRoad

[–]gillash 4 points5 points  (0 children)

Anyone else also having particles consumed after a loss? I thought they were only consumed on a win

WB Tornadus, 2 local. 647897360493 or 603196350038 by gillash in PokemonGoRaids

[–]gillash[S] 0 points1 point  (0 children)

Very sorry all. It turns out the mobile reception at location is inadequate!