Commit af729264256d4179eaf4ab285fa93a50a349d989
Merge branch 'devel' into integration
Showing
1 changed file
with
4 additions
and
4 deletions
scripts/obsutils.py
| ... | ... | @@ -26,7 +26,7 @@ import gammalib |
| 26 | 26 | # Simulate observations # |
| 27 | 27 | # ===================== # |
| 28 | 28 | def sim(obs, log=False, debug=False, edisp=False, seed=0, nbins=0, |
| 29 | - binsz=0.05, npix=200): | |
| 29 | + binsz=0.05, npix=200, proj="TAN", coord="GAL"): | |
| 30 | 30 | """ |
| 31 | 31 | Simulate events for all observations in the container. |
| 32 | 32 | |
| ... | ... | @@ -95,8 +95,8 @@ def sim(obs, log=False, debug=False, edisp=False, seed=0, nbins=0, |
| 95 | 95 | bin["nxpix"].integer(npix) |
| 96 | 96 | bin["nypix"].integer(npix) |
| 97 | 97 | bin["binsz"].real(binsz) |
| 98 | - bin["coordsys"].string("GAL") | |
| 99 | - bin["proj"].string("TAN") | |
| 98 | + bin["coordsys"].string(coord) | |
| 99 | + bin["proj"].string(proj) | |
| 100 | 100 | |
| 101 | 101 | # Optionally open the log file |
| 102 | 102 | if log: |
| ... | ... | @@ -197,7 +197,7 @@ def cntmap(obs, proj="TAN", coord="GAL", xval=0.0, yval=0.0, \ |
| 197 | 197 | |
| 198 | 198 | # Set pixel |
| 199 | 199 | if pixel < maxpixel: |
| 200 | - map[pixel] += 1.0 | |
| 200 | + map[pixel] += event.counts() | |
| 201 | 201 | |
| 202 | 202 | # Save sky map. The clobber flag is set to True, so any existing FITS |
| 203 | 203 | # file will be overwritten. | ... | ... |