def read_metadata(self, directory, dm2inf):
        """
        Read all given PRESTO style .inf files in directory.
        """

        metadata_map = {}
        for dm, f in dm2inf.iteritems():
            metadata_map[dm] = inf.inf_reader(os.path.join(directory, f))

        return metadata_map
Exemple #2
0
    def grab_metadata_map(self, dms, inf_file, binwidth_map):
        '''
        Grab the metadata for all intersting DMs.
        '''
        metadata = inf.inf_reader(inf_file)
        metadata_map = {}
        for dm in dms:
            metadata_map[dm] = copy.deepcopy(metadata)
            # LOTAAS specific HACK to get around missing .inf files while
            # still having access to a delay for each DM.
            metadata_map[dm].binwidth = binwidth_map[dm] 

        return metadata_map