code: def _make_scaled_srcmap(self):
          
  
          self.logger.info('Computing scaled source map.')
  
          bexp0 = fits.open(self.files['bexpmap_roi'])
          bexp1 = fits.open(self.config['gtlike']['bexpmap'])
          srcmap = fits.open(self.config['gtlike']['srcmap'])
  
          if bexp0[0].data.shape != bexp1[0].data.shape:
              raise Exception('Wrong shape for input exposure map file.')
  
          bexp_ratio = bexp0[0].data / bexp1[0].data
  
          self.logger.info(
              'Min/Med/Max exposure correction: %f %f %f' % (np.min(bexp_ratio),
                                                             np.median(
                                                                 bexp_ratio),
                                                             np.max(bexp_ratio)))
  
          for hdu in srcmap[1:]:
  
              if hdu.name == 'GTI':
                  continue
              if hdu.name == 'EBOUNDS':
                  continue
              hdu.data *= bexp_ratio
  
          srcmap.writeto(self.files['srcmap'], overwrite=True)
docs: Make an exposure cube with the same binning as the counts map.