Commit ad87ab33c3c175d5d452191f84f7eee05115e99c

Authored by Luigi Tibaldo
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 415 masked_obs = self._mask_evlist(obs,ra,dec,rad)
416 416 elif self['method'].string() == 'ONOFF':
417 417 pass
  418 + pass
418 419 # TODO: implement Onoff analysis
419 420 # masked_obs = self._mask_onoff(obs, ra, dec, rad)
420 421 new_obs.append(masked_obs)
... ... @@ -501,7 +502,7 @@ class csscs(ctools.csobservation):
501 502 # Multiply by flux from spatial component in ROI
502 503 flux *= source.spatial().flux(roi)
503 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 506 result[name]['flux'] = flux
506 507  
507 508 # Get flux error
... ...