Commit c20f69bc423c361789ec9dde435259caeda1d621
1 parent
e60f80cc
Adapt to GammaLib-00-08-00
Showing
3 changed files
with
6 additions
and
6 deletions
examples/make_binned_analysis.py
| ... | ... | @@ -329,7 +329,7 @@ def plot_counts(observations): |
| 329 | 329 | offset2 = [(i+0.5)*doffset2 for i in range(nx)] |
| 330 | 330 | counts = [0.0 for i in range(nx)] |
| 331 | 331 | for bin in cube: |
| 332 | - off = GCTAInstDir(bin.dir()).dist_deg(crab) | |
| 332 | + off = GCTAInstDir(bin.dir()).dir().dist_deg(crab) | |
| 333 | 333 | off2 = off*off |
| 334 | 334 | index = int(off2/doffset2) |
| 335 | 335 | if index < nx: |
| ... | ... | @@ -348,7 +348,7 @@ def plot_counts(observations): |
| 348 | 348 | sys.stdout.write("- "+m.name()+"\n") |
| 349 | 349 | model = [0.0 for i in range(nx)] |
| 350 | 350 | for bin in cube: |
| 351 | - off = GCTAInstDir(bin.dir()).dist_deg(crab) | |
| 351 | + off = GCTAInstDir(bin.dir()).dir().dist_deg(crab) | |
| 352 | 352 | off2 = off*off |
| 353 | 353 | index = int(off2/doffset2) |
| 354 | 354 | if index < nx: | ... | ... |
examples/make_unbinned_analysis.py
| ... | ... | @@ -314,7 +314,7 @@ def plot_counts(observations): |
| 314 | 314 | offset2 = [(i+0.5)*doffset2 for i in range(nx)] |
| 315 | 315 | counts = [0.0 for i in range(nx)] |
| 316 | 316 | for atom in list: |
| 317 | - off = GCTAInstDir(atom.dir()).dist_deg(crab) | |
| 317 | + off = GCTAInstDir(atom.dir()).dir().dist_deg(crab) | |
| 318 | 318 | off2 = off*off |
| 319 | 319 | index = int(off2/doffset2) |
| 320 | 320 | if index < nx: |
| ... | ... | @@ -333,7 +333,7 @@ def plot_counts(observations): |
| 333 | 333 | print "- "+m.name() |
| 334 | 334 | model = [0.0 for i in range(nx)] |
| 335 | 335 | for atom in list: |
| 336 | - off = GCTAInstDir(atom.dir()).dist_deg(crab) | |
| 336 | + off = GCTAInstDir(atom.dir()).dir().dist_deg(crab) | |
| 337 | 337 | off2 = off*off |
| 338 | 338 | index = int(off2/doffset2) |
| 339 | 339 | if index < nx: | ... | ... |
scripts/obsutils.py
| ... | ... | @@ -182,7 +182,7 @@ def cntmap(obs, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \ |
| 182 | 182 | |
| 183 | 183 | # Determine sky pixel |
| 184 | 184 | skydir = GCTAInstDir(event.dir()).dir() |
| 185 | - pixel = map.dir2pix(skydir) | |
| 185 | + pixel = map.dir2inx(skydir) | |
| 186 | 186 | |
| 187 | 187 | # Set pixel |
| 188 | 188 | map[pixel] += 1.0 |
| ... | ... | @@ -234,7 +234,7 @@ def modmap(obs, eref=0.1, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \ |
| 234 | 234 | for pixel in range(map.npix()): |
| 235 | 235 | |
| 236 | 236 | # Get sky direction |
| 237 | - skydir = map.pix2dir(pixel) | |
| 237 | + skydir = map.inx2dir(pixel) | |
| 238 | 238 | instdir.dir(skydir) |
| 239 | 239 | |
| 240 | 240 | # Create event atom for map pixel | ... | ... |