Commit e3a3e4b976fc27cc475ba44f2a444a5385dd2f7a

Authored by Jürgen Knödlseder
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,7 +53,7 @@ def get_positions(xmin, xmax, ymin, ymax, step):
53 for row in range(ny): 53 for row in range(ny):
54 54
55 # Determine xstep and number of pointings in row 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 nx = int((xmax-xmin)/xstep+1.5) 57 nx = int((xmax-xmin)/xstep+1.5)
58 rescale = (xmax-xmin)/(xstep*(nx-1)) 58 rescale = (xmax-xmin)/(xstep*(nx-1))
59 xstep *= rescale 59 xstep *= rescale
@@ -63,7 +63,7 @@ def get_positions(xmin, xmax, ymin, ymax, step): @@ -63,7 +63,7 @@ def get_positions(xmin, xmax, ymin, ymax, step):
63 x = xmin 63 x = xmin
64 else: 64 else:
65 x = xmin + 0.5 * xstep 65 x = xmin + 0.5 * xstep
66 - #print(row, x) 66 + #print(row, y, nx)
67 67
68 # Append pointings 68 # Append pointings
69 for pnt in range(nx): 69 for pnt in range(nx):
@@ -209,9 +209,9 @@ def set_extgal(separation=3.0, lst=True): @@ -209,9 +209,9 @@ def set_extgal(separation=3.0, lst=True):
209 obsdef = [] 209 obsdef = []
210 210
211 # Set patch 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 separation=separation, hours=1000, \ 213 separation=separation, hours=1000, \
214 - site="Automatic", lst=lst, autodec=25.0)) 214 + site="Automatic", lst=lst, autodec=10.0))
215 215
216 # Return observation definition 216 # Return observation definition
217 return obsdef 217 return obsdef