Plot the range of energies selected for processing. The range may be optionally provided as arguments. The range values that are not provided, are read from globally accessible dictionary of parameters. The values passed as arguments are mainly used if the function i
(self, *, e_low=None, e_high=None)
| 697 | pass |
| 698 | |
| 699 | def plot_selected_energy_range_original(self, *, e_low=None, e_high=None): |
| 700 | """ |
| 701 | Plot the range of energies selected for processing. The range may be optionally |
| 702 | provided as arguments. The range values that are not provided, are read from |
| 703 | globally accessible dictionary of parameters. The values passed as arguments |
| 704 | are mainly used if the function is called during interactive update of the |
| 705 | range, when the order of update is undetermined and the parameter dictionary |
| 706 | may be updated after the function is called. |
| 707 | """ |
| 708 | # The range of energy selected for analysis |
| 709 | if e_low is None: |
| 710 | e_low = self.param_model.param_new["non_fitting_values"]["energy_bound_low"]["value"] |
| 711 | if e_high is None: |
| 712 | e_high = self.param_model.param_new["non_fitting_values"]["energy_bound_high"]["value"] |
| 713 | |
| 714 | n_x = 4096 # Set to the maximum possible number of points |
| 715 | |
| 716 | # Generate the values for 'energy' axis |
| 717 | x_v = ( |
| 718 | self.param_model.param_new["e_offset"]["value"] |
| 719 | + np.arange(n_x) * self.param_model.param_new["e_linear"]["value"] |
| 720 | + np.arange(n_x) ** 2 * self.param_model.param_new["e_quadratic"]["value"] |
| 721 | ) |
| 722 | |
| 723 | ss = (x_v < e_high) & (x_v > e_low) |
| 724 | y_min, y_max = -1e30, 1e30 # Select the max and min values for plotted rectangles |
| 725 | |
| 726 | # Remove the plot if it exists |
| 727 | if self.plot_energy_barh in self._ax.collections: |
| 728 | self.plot_energy_barh.remove() |
| 729 | |
| 730 | # Create the new plot (based on new parameters if necessary |
| 731 | # self.plot_energy_barh = PolyCollection.span_where( |
| 732 | # x_v, ymin=y_min, ymax=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1 |
| 733 | # ) |
| 734 | # self._ax.add_collection(self.plot_energy_barh) |
| 735 | self.plot_energy_barh = self._ax.fill_between( |
| 736 | x_v, y1=y_min, y2=y_max, where=ss, facecolor="white", edgecolor="yellow", alpha=1 |
| 737 | ) |
| 738 | |
| 739 | def plot_multi_exp_data(self): |
| 740 | while len(self.plot_exp_list): |
no outgoing calls
no test coverage detected