Ejemplo n.º 1
0
    def plot_2d_OLD(self,
                    axes=('scale', 'maxdist', 'upfreq', 'lowfreq'),
                    show_best=0,
                    skip=None,
                    savefig=None,
                    clim=None):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','maxdist','upfreq','lowfreq' axes: list of axes to be
           represented in the plot. The order will define which parameter will
           be placed on the x, y, z or w axe.
        :param 0 show_best: number of best correlation values to highlight in
           the plot
        :param None skip: if passed (as a dictionary), fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}
        :param None savefig: path to a file where to save the image generated;
           if None, the image will be shown using matplotlib GUI (the extension
           of the file name will determine the desired format).

        """
        results = self._result_to_array()
        plot_2d_optimization_result(
            (('scale', 'maxdist', 'upfreq', 'lowfreq'),
             ([float(i) for i in self.scale_range], [
                 float(i) for i in self.maxdist_range
             ], [float(i) for i in self.upfreq_range
                 ], [float(i) for i in self.lowfreq_range]), results),
            axes=axes,
            dcutoff=self.dcutoff_range,
            show_best=show_best,
            skip=skip,
            savefig=savefig,
            clim=clim)
Ejemplo n.º 2
0
    def plot_2d(self, axes=('scale', 'maxdist', 'upfreq', 'lowfreq'),
                show_best=0, skip=None, savefig=None):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','maxdist','upfreq','lowfreq' axes: list of axes to be
           represented in the plot. The order will define which parameter will
           be placed on the x, y, z or w axe.
        :param 0 show_best: number of best correlation values to highlight in 
           the plot
        :param None skip: if passed (as a dictionary), fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}
        :param None savefig: path to a file where to save the image generated;
           if None, the image will be shown using matplotlib GUI (the extension
           of the file name will determine the desired format).

        """
        results = self._result_to_array()
        plot_2d_optimization_result((('scale', 'maxdist', 'upfreq', 'lowfreq'),
                                     ([float(i) for i in self.scale_range],
                                      [float(i) for i in self.maxdist_range],
                                      [float(i) for i in self.upfreq_range],
                                      [float(i) for i in self.lowfreq_range]),
                                     results), axes=axes, show_best=show_best,
                                    skip=skip, savefig=savefig)
Ejemplo n.º 3
0
    def plot_2d(self, axes=('scale', 'kbending', 'maxdist', 'lowfreq', 'upfreq'),
                show_best=0, skip=None, savefig=None,clim=None, cmap='inferno'):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','kbending','maxdist','lowfreq','upfreq' axes: list of
           axes to be represented in the plot. The order will define which
           parameter will be placed on the x, y, z or w axe.
        :param 0 show_best: number of best correlation values to highlight in
           the plot
        :param None skip: if passed (as a dictionary), fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}
        :param None savefig: path to a file where to save the image generated;
           if None, the image will be shown using matplotlib GUI (the extension
           of the file name will determine the desired format).
        :param None clim: color scale. If None, the max and min values of the input are used.
        :param inferno cmap: matplotlib colormap
        """

        # Case in which there is more than 1 distance cutoff (dcutoff)
        cut = self.get_best_parameters_dict()['dcutoff']
        results = self._result_to_array(float(cut))
        plot_2d_optimization_result((('scale', 'kbending', 'maxdist', 'lowfreq', 'upfreq'),
                                     ([float(i) for i in self.scale_range],
                                      [float(i) for i in self.kbending_range],
                                      [float(i) for i in self.maxdist_range],
                                      [float(i) for i in self.lowfreq_range],
                                      [float(i) for i in self.upfreq_range]),
                                     results), dcutoff=cut, axes=axes, show_best=show_best,
                                    skip=skip, savefig=savefig,clim=clim, cmap=cmap)
Ejemplo n.º 4
0
    def plot_2d(self, axes=('scale', 'maxdist', 'upfreq', 'lowfreq'),
                show_best=0, skip=None):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','maxdist','upfreq','lowfreq' axes: tuple of axes to
           represent. The order will define which parameter will be placed on the
           w, z, y or x axe.
        :param 0 show_best: number of best correlation value to identifie.
        :param None skip: a dict can be passed here in order to fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}

        """
        results = self._result_to_array()
        plot_2d_optimization_result((('scale', 'maxdist', 'upfreq', 'lowfreq'),
                                     (self.scale_range, self.maxdist_range,
                                      self.upfreq_range, self.lowfreq_range),
                                     results), axes=axes,
                                    show_best=show_best, skip=skip)
Ejemplo n.º 5
0
    def plot_2d(self, axes=('scale', 'maxdist', 'upfreq', 'lowfreq'),
                show_best=0, skip=None):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','maxdist','upfreq','lowfreq' axes: list of axes to be
           represented in the plot. The order will define which parameter will
           be placed on the x, y, z or w axe.
        :param 0 show_best: number of best correlation values to highlight in 
           the plot
        :param None skip: if passed (as a dictionary), fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}

        """
        results = self._result_to_array()
        plot_2d_optimization_result((('scale', 'maxdist', 'upfreq', 'lowfreq'),
                                     (self.scale_range, self.maxdist_range,
                                      self.upfreq_range, self.lowfreq_range),
                                     results), axes=axes,
                                    show_best=show_best, skip=skip)
Ejemplo n.º 6
0
    def plot_2d(self,
                axes=('scale', 'maxdist', 'upfreq', 'lowfreq'),
                show_best=0,
                skip=None):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','maxdist','upfreq','lowfreq' axes: tuple of axes to
           represent. The order will define which parameter will be placed on the
           w, z, y or x axe.
        :param 0 show_best: number of best correlation value to identifie.
        :param None skip: a dict can be passed here in order to fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}

        """
        results = self._result_to_array()
        plot_2d_optimization_result(
            (('scale', 'maxdist', 'upfreq', 'lowfreq'),
             (self.scale_range, self.maxdist_range, self.upfreq_range,
              self.lowfreq_range), results),
            axes=axes,
            show_best=show_best,
            skip=skip)
Ejemplo n.º 7
0
    def plot_2d(self,
                axes=('scale', 'maxdist', 'upfreq', 'lowfreq'),
                show_best=0,
                skip=None):
        """
        A grid of heatmaps representing the result of the optimization.

        :param 'scale','maxdist','upfreq','lowfreq' axes: list of axes to be
           represented in the plot. The order will define which parameter will
           be placed on the x, y, z or w axe.
        :param 0 show_best: number of best correlation values to highlight in 
           the plot
        :param None skip: if passed (as a dictionary), fix a given axe,
           e.g.: {'scale': 0.001, 'maxdist': 500}

        """
        results = self._result_to_array()
        plot_2d_optimization_result(
            (('scale', 'maxdist', 'upfreq', 'lowfreq'),
             (self.scale_range, self.maxdist_range, self.upfreq_range,
              self.lowfreq_range), results),
            axes=axes,
            show_best=show_best,
            skip=skip)