aces.sefd.plotting¶
Tooling to support the plotting of SEFD figures
Module Contents¶
Functions¶
|
|
|
|
|
Given the bin centers and counts for data that has been binned, an |
|
Estimates and returns the mode of those input data that lie within the limits set by the parameters. |
|
Construct a colour map that is appropriate (targeted) for SEFD plotting |
Attributes¶
- aces.sefd.plotting.fit_gauss(x: numpy.ndarray, y: numpy.ndarray, p0: list[float], fkey: str = 'gau') tuple[tuple[float, Ellipsis], float, float, float][source]¶
Given the bin centers and counts for data that has been binned, an attempt to fit a gaussian to said binned data will be performed.
- Args:
x (np.ndarray): The bin centers of the binned data y (np.ndarray): The bin counts per bins of the binned data p0 (list[float]): Initial guess parameters of the desired model to fit fkey (str, optional): Model to fit to the data. Defaults to ‘gau’.
- Raises:
ValueError: Raised when an unkown key / fit function is suppliede
- Returns:
tuple[tuple[float,…], float, float, float]: Contains the best fit parameters, the x and y of the model evaluated with best fit parameters, and the reduced chi2
- aces.sefd.plotting.find_mode(data: numpy.ma.MaskedArray, parameters: dict[Any, Any]) float[source]¶
Estimates and returns the mode of those input data that lie within the limits set by the parameters. The mode is determined by fitting a guassian function to the peak of the histogram of the logarithms of the values.
- Parameters:
data – np.array of real values
parameters – dictionary giving the data value bounds
- Returns:
- aces.sefd.plotting.make_sefd_cmap(ssl: float, ssu: float) tuple[matplotlib.colors.LinearSegmentedColormap, matplotlib.colors.Normalize][source]¶
Construct a colour map that is appropriate (targeted) for SEFD plotting
- Args:
ssl (float): Lower limit of the SEFD values to plot (Tsys) ssu (float): Upper limit of the SEFD values to plot (Tsys)
- Returns:
tuple[mpl.colors.LinearSegmentedColormap, mpl.colors.Normalize]: The colours and normalise matplotlib instances to use