Ejemplo n.º 1
0
    def view_corrected(self, lbl=None, vmin=None, vmax=None):
        """
        **Overview:**

            This plots the resulting scattering with the resolution correction.
            The user should make sure they have run the
            :meth:`scatter.resolution_correction` method before using this
            method.

        **Parameters:**

            *lbl:* (str)
                This parameter can be used to change the title of the plot.

            *vmin:* (float|Angstroms^-2)
                This is the minimum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the minimum.

            *vmin:* (float|Angstroms^-2)
                This is the maximum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the maximum.

        """

        view.intensity_plot(
            self.corrected_results, self.space.minimums, self.space.maximums, "Corrected", vmin=vmin, vmax=vmax
        )
        return
Ejemplo n.º 2
0
    def view_corrected(self, lbl=None, vmin=None, vmax=None):
        '''
        **Overview:**

            This plots the resulting scattering with the resolution correction.
            The user should make sure they have run the
            :meth:`scatter.resolution_correction` method before using this
            method.

        **Parameters:**

            *lbl:* (str)
                This parameter can be used to change the title of the plot.

            *vmin:* (float|Angstroms^-2)
                This is the minimum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the minimum.

            *vmin:* (float|Angstroms^-2)
                This is the maximum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the maximum.

        '''

        view.intensity_plot(self.corrected_results,
                            self.space.minimums,
                            self.space.maximums,
                            'Corrected',
                            vmin=vmin,
                            vmax=vmax)
        return
Ejemplo n.º 3
0
    def view_uncorrected(self, lbl=None, vmin=None, vmax=None):
        '''
        **Overview:**

            This plots the resulting scattering without any resolution
            correction applied to the scattering calculation. This can be useful
            for studying the effects that the resolution has on the data
            measured from the instrument.

        **Parameters:**

            *lbl:* (str)
                This parameter can be used to change the title of the plot.

            *vmin:* (float|Angstroms^-2)
                This is the minimum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the minimum.

            *vmin:* (float|Angstroms^-2)
                This is the maximum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the maximum.

        '''
        if lbl != None:
            lbl = 'Uncorrected - ', +lbl
        else:
            lbl = 'Uncorrected'
        if size(shape(self.results)) == 2:
            (view.intensity_plot(self.results,
                                 self.space.minimums,
                                 self.space.maximums,
                                 header=lbl,
                                 vmin=vmin,
                                 vmax=vmax))

        elif size(shape(self.results)) > 2:

            mins = zeros(4)
            maxs = zeros(4)

            for i in range(4):
                mins[i] = (min(
                    log((abs(self.results[i][isfinite(
                        self.results[i])]).real))))

                maxs[i] = (max(
                    log((abs(self.results[i][isfinite(
                        self.results[i])]).real))))

            for i in range(4):

                subplot(2, 2, i + 1)
                (view.intensity_plot(self.results[i],
                                     self.space.minimums,
                                     self.space.maximums,
                                     'Uncorrected',
                                     vmin=vmin,
                                     vmax=vmax))

        return
Ejemplo n.º 4
0
    def view_uncorrected(self, lbl=None, vmin=None, vmax=None):
        """
        **Overview:**

            This plots the resulting scattering without any resolution
            correction applied to the scattering calculation. This can be useful
            for studying the effects that the resolution has on the data
            measured from the instrument.

        **Parameters:**

            *lbl:* (str)
                This parameter can be used to change the title of the plot.

            *vmin:* (float|Angstroms^-2)
                This is the minimum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the minimum.

            *vmin:* (float|Angstroms^-2)
                This is the maximum intensity value plotted on the 2D plot. Any
                intensity value below this value is plotted as the maximum.

        """
        if lbl != None:
            lbl = "Uncorrected - ", +lbl
        else:
            lbl = "Uncorrected"
        if size(shape(self.results)) == 2:
            (
                view.intensity_plot(
                    self.results, self.space.minimums, self.space.maximums, header=lbl, vmin=vmin, vmax=vmax
                )
            )

        elif size(shape(self.results)) > 2:

            mins = zeros(4)
            maxs = zeros(4)

            for i in range(4):
                mins[i] = min(log((abs(self.results[i][isfinite(self.results[i])]).real)))

                maxs[i] = max(log((abs(self.results[i][isfinite(self.results[i])]).real)))

            for i in range(4):

                subplot(2, 2, i + 1)
                (
                    view.intensity_plot(
                        self.results[i], self.space.minimums, self.space.maximums, "Uncorrected", vmin=vmin, vmax=vmax
                    )
                )

        return