Commit ad87ab33c3c175d5d452191f84f7eee05115e99c
1 parent
e0f89134
fixed solid angle formula
Showing
1 changed file
with
2 additions
and
1 deletions
cscripts/csscs.py
| @@ -415,6 +415,7 @@ class csscs(ctools.csobservation): | @@ -415,6 +415,7 @@ class csscs(ctools.csobservation): | ||
| 415 | masked_obs = self._mask_evlist(obs,ra,dec,rad) | 415 | masked_obs = self._mask_evlist(obs,ra,dec,rad) |
| 416 | elif self['method'].string() == 'ONOFF': | 416 | elif self['method'].string() == 'ONOFF': |
| 417 | pass | 417 | pass |
| 418 | + pass | ||
| 418 | # TODO: implement Onoff analysis | 419 | # TODO: implement Onoff analysis |
| 419 | # masked_obs = self._mask_onoff(obs, ra, dec, rad) | 420 | # masked_obs = self._mask_onoff(obs, ra, dec, rad) |
| 420 | new_obs.append(masked_obs) | 421 | new_obs.append(masked_obs) |
| @@ -501,7 +502,7 @@ class csscs(ctools.csobservation): | @@ -501,7 +502,7 @@ class csscs(ctools.csobservation): | ||
| 501 | # Multiply by flux from spatial component in ROI | 502 | # Multiply by flux from spatial component in ROI |
| 502 | flux *= source.spatial().flux(roi) | 503 | flux *= source.spatial().flux(roi) |
| 503 | # Divide by solid angle of ROI | 504 | # Divide by solid angle of ROI |
| 504 | - flux /= 1 - math.cos(math.radians(self._roisz)) | 505 | + flux /= gammalib.twopi * (1 - math.cos(math.radians(self._roisz))) |
| 505 | result[name]['flux'] = flux | 506 | result[name]['flux'] = flux |
| 506 | 507 | ||
| 507 | # Get flux error | 508 | # Get flux error |