FUNCTION Countrate, tyspec, ma, a
   
   COMMON Rsp, nch, nsc, esc, rsc   ;characteristics of the detector
   
   f = fx_phflux(tyspec, a, esc, nsc, /in_fitspec)
   
   c = rsc#f                 ;do response integration

   RETURN, c
END