<p>Imagine you are patching a plane with circles, instead of patching the sky sphere with circles (which is the same as filling the space with cones). Now, for every circle of diameter D define a square of diagonal D (D=2d). It is easier to patch the plane with squares, isn't it? So you have squares of side D/2*sqrt(2), and that is exactly your DEC_step, for each vertical sweep, and your RA_step, from sweep to sweep.</p>

<p>This will lead to a lot of duplicated examination (in fact you will examinate exactly the same place at the Poles once for each sweep) but you can be sure you'll not leave anything out of your squares.</p>

CC BY-SA 3.0
2013-12-05T22:27:44.193Z
Yeah, I thought I could use that approach I was just looking for the actual formula for DEC_step and RA_step based on the cone angle - I thought maybe it's some well-known formula in astronomy otherwise I guess I have to do some trigonometric calculations myself.
Marcus Junius Brutus
CC BY-SA 3.0
2013-12-05T22:30:49.547Z
I actually gave you the formula: if the side of the square is sqrt(2)*D/2 that is exactly both RA_step and DEC_step
Envite
CC BY-SA 3.0
2013-12-06T00:43:46.513Z
@Envite Do you happen to know the percentage of overlap you get with this configuration? In other words, how much of the analysis would be *redundant/wasted* if you were forced to analyze the entire field with each step?
Robert Cartaino
CC BY-SA 3.0
2013-12-06T19:55:53.227Z
@RobertCartaino Calculate the difference between the surface of a slice of sphere from pole to pole between two meridians and that of a rectangle which is D*sqrt(2) longer than needed. This is inside the squares only, you need to multiply for the relation among that of a circle of radius d and that of a square of side sqrt(2)*D/2.
Envite
CC BY-SA 3.0
2013-12-05T20:54:53.813Z
2013-12-05T20:54:53.813Z
Envite
<p>I am sure I get parts of the terminology wrong but if anyone can shed some light in the following:</p>

<p>I understand that for a given right ascension (RA) and declination (DEC), one has defined a ray (half-line) in the sky starting from the center of the earth towards infinity.</p>

<p>Now, if I also provide a angle, say <code>d</code> degrees around that ray, I have essentially defined a cone in the sky. My question is the following:</p>

<p>Which steps (<code>RA_step</code> and <code>DEC_step</code>) should I use in the following loop, as a function of <code>d</code> to ensure that I cover the entire sky and don't leave any patches anywhere?.</p>

<pre><code>for (RA = 0 ; RA &lt;= 360 ; RA += RA_step)
    for (DEC = -90 ; DEC &lt;= 90 ; DEC += DEC_step)
         examine-cone(RA, DEC, d)
</code></pre>

CC BY-SA 3.0
2013-12-05T13:33:44.830Z
Wouldn't it be easier if you use square sky patchs?
Envite
CC BY-SA 3.0
2013-12-05T13:53:46.527Z
@Envite I don't have a choice, the API I am given uses cones so I need to cover the sky with cones, not "pyramids".
Marcus Junius Brutus
<ascension><inclination>
iteration to cover the whole sky with right ascension, declination, angle
Marcus Junius Brutus
# iteration to cover the whole sky with right ascension, declination, angle

(Asked by: username_0 on 2013-12-05)

I am sure I get parts of the terminology wrong but if anyone can shed some light in the following:
I understand that for a given right ascension (RA) and declination (DEC), one has defined a ray (half-line) in the sky starting from the center of the earth towards infinity.
Now, if I also provide a angle, say d degrees around that ray, I have essentially defined a cone in the sky. My question is the following:
Which steps (RA_step and DEC_step) should I use in the following loop, as a function of d to ensure that I cover the entire sky and don't leave any patches anywhere?.
for (RA = 0 ; RA <= 360 ; RA += RA_step)
    for (DEC = -90 ; DEC <= 90 ; DEC += DEC_step)
         examine-cone(RA, DEC, d)

**Tags:** ascension, inclination
> **Comments:**
> **username_1**: Wouldn't it be easier if you use square sky patchs?  
> **username_0**: @Envite I don't have a choice, the API I am given uses cones so I need to cover the sky with cones, not "pyramids".  

---

## 1 answers

### Answer by username_1 on 2013-12-05. Score: 2

Imagine you are patching a plane with circles, instead of patching the sky sphere with circles (which is the same as filling the space with cones). Now, for every circle of diameter D define a square of diagonal D (D=2d). It is easier to patch the plane with squares, isn't it? So you have squares of side D/2\*sqrt(2), and that is exactly your DEC\_step, for each vertical sweep, and your RA\_step, from sweep to sweep.

This will lead to a lot of duplicated examination (in fact you will examinate exactly the same place at the Poles once for each sweep) but you can be sure you'll not leave anything out of your squares.

> **Comments:**
> **username_0**: Yeah, I thought I could use that approach I was just looking for the actual formula for DEC_step and RA_step based on the cone angle - I thought maybe it's some well-known formula in astronomy otherwise I guess I have to do some trigonometric calculations myself.  
> **username_1**: I actually gave you the formula: if the side of the square is sqrt(2)*D/2 that is exactly both RA_step and DEC_step  
> **username_2**: @Envite Do you happen to know the percentage of overlap you get with this configuration? In other words, how much of the analysis would be *redundant/wasted* if you were forced to analyze the entire field with each step?  
> **username_1**: @RobertCartaino Calculate the difference between the surface of a slice of sphere from pole to pole between two meridians and that of a rectangle which is D*sqrt(2) longer than needed. This is inside the squares only, you need to multiply for the relation among that of a circle of radius d and that of a square of side sqrt(2)*D/2.  

---

