I have an analog question of this one : Generate an uniform distribution on the sky

I generate an uniform distribution on the sky, but just a patch of it, with $$\alpha_{min} \leq \alpha \leq \alpha_{max}$$ and $$\delta_{min} \leq \delta \leq \delta_{max}$$

for Right Ascention, I just have to take uniform distribution between $\alpha_{min}$and $ \alpha_{max}$.

For declination it works if I take $$\delta_{random} = \sin^{-1}\left( \mathrm{Uniform}(\sin\delta_{min},\, \sin\delta_{max}) \right)$$

My problem is that I don't know how to demonstrate this formula for the generation of delinations. Any idea how to make the proof of this formula ?

I saw in Generate an uniform distribution on the sky @RobJeffries post which gives an expression of $P(\delta)$ and demonstrates that $\delta = \sin^{-1}(2P-1)$ where $P$ is a random number between 0 and 1, which is compatible to my formula with $\delta_{min} = -\frac{\pi}{2}$ and $ \delta_{max} = +\frac{\pi}{2}$, but I was not able to generalize his demonstration.

Thanks in advance for your help!

  • $\begingroup$ Can you explain a little more exactly what you are looking for in an answer? "Any idea how to demonstrate this formula ?" Are you looking for a proof, or a test, or how to use it? $\endgroup$
    – uhoh
    Jun 28 '18 at 11:12
  • 1
    $\begingroup$ Hi, thanks for your answer, yes I am looking for a proof. I found this formula making tests, ans it works, but I have no clue how to make a proof of it. I mean how to prove $\delta_{random} = \sin^{-1}\left( \mathrm{Uniform}(\sin\delta_{min},\, \sin\delta_{max}) \right)$ $\endgroup$ Jun 28 '18 at 12:57
  • 1
    $\begingroup$ Okay, yes I think the idea is quite reasonable and will work (I haven't checked the details). Since the mapping is monotonic, if you are throwing away the results outside your limits, it's safe to throw away the random numbers that would lead there as well; I think the monotonicity is probably central to a proof. You might consider asking in math.stackexchange.com instead of here for a better discussion of math and proofs. $\endgroup$
    – uhoh
    Jun 28 '18 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.