def write_weight_map(self, model_name=None):
        """Save counts model map to a FITS file.

        """

        if model_name is None:
            suffix = self.config['file_suffix']
        else:
            suffix = '_%s%s' % (model_name, self.config['file_suffix'])

        self.logger.info('Generating model map for component %s.', self.name)

        outfile = os.path.join(self.config['fileio']['workdir'],
                               'wcube%s.fits' % (suffix))

        wmap = self.weight_map()
        wmap.write(outfile, overwrite=True, conv='fgst-ccube')
        return wmap
def write_weight_map ( self , model_name = None ) : if model_name is None : suffix = self . config [ 'file_suffix' ] else : suffix = '_%s%s' % ( model_name , self . config [ 'file_suffix' ] ) self . logger . info ( 'Generating model map for component %s.' , self . name ) outfile = os . path . join ( self . config [ 'fileio' ] [ 'workdir' ] , 'wcube%s.fits' % ( suffix ) ) wmap = self . weight_map ( ) wmap . write ( outfile , overwrite = True , conv = 'fgst-ccube' ) return wmap
Save counts model map to a FITS file.