Commit e3a3e4b976fc27cc475ba44f2a444a5385dd2f7a
1 parent
2cc8700e
Correct latitude dependence of longitude step size.
Showing
1 changed file
with
4 additions
and
4 deletions
examples/make_pointings.py
| ... | ... | @@ -53,7 +53,7 @@ def get_positions(xmin, xmax, ymin, ymax, step): |
| 53 | 53 | for row in range(ny): |
| 54 | 54 | |
| 55 | 55 | # Determine xstep and number of pointings in row |
| 56 | - xstep = step * math.cos(gammalib.deg2rad * y) | |
| 56 | + xstep = step / math.cos(gammalib.deg2rad * y) | |
| 57 | 57 | nx = int((xmax-xmin)/xstep+1.5) |
| 58 | 58 | rescale = (xmax-xmin)/(xstep*(nx-1)) |
| 59 | 59 | xstep *= rescale |
| ... | ... | @@ -63,7 +63,7 @@ def get_positions(xmin, xmax, ymin, ymax, step): |
| 63 | 63 | x = xmin |
| 64 | 64 | else: |
| 65 | 65 | x = xmin + 0.5 * xstep |
| 66 | - #print(row, x) | |
| 66 | + #print(row, y, nx) | |
| 67 | 67 | |
| 68 | 68 | # Append pointings |
| 69 | 69 | for pnt in range(nx): |
| ... | ... | @@ -209,9 +209,9 @@ def set_extgal(separation=3.0, lst=True): |
| 209 | 209 | obsdef = [] |
| 210 | 210 | |
| 211 | 211 | # Set patch |
| 212 | - obsdef.extend(set_patch(lmin=-90.0, lmax=90.0, bmin=+5.0, bmax=+90.0, \ | |
| 212 | + obsdef.extend(set_patch(lmin=-90.0, lmax=90.0, bmin=+5.0, bmax=+88.0, \ | |
| 213 | 213 | separation=separation, hours=1000, \ |
| 214 | - site="Automatic", lst=lst, autodec=25.0)) | |
| 214 | + site="Automatic", lst=lst, autodec=10.0)) | |
| 215 | 215 | |
| 216 | 216 | # Return observation definition |
| 217 | 217 | return obsdef | ... | ... |