def load_or_prepare_dmt_results()

in data_measurements/npmi/npmi.py [0:0]


    def load_or_prepare_dmt_results(self):
        # Initialize with no results (reset).
        self.results_dict = {}
        # Filenames for caching and saving
        self._make_fids()
        # If we're trying to use the cache of already computed results
        if self.use_cache:
            # Loads the association results and dataframes used in the display.
            logs.debug("Trying to load...")
            self.results_dict = self._load_dmt_cache()
        # Compute results if we can
        if not self.load_only:
            # If there isn't a solution using cache
            if not self.results_dict:
                # Does the actual computations
                self.prepare_results()
            # Finish
            if self.save:
                # Writes the paired & singleton dataframe out.
                self._write_dmt_cache()