Miscellaneous “helper” functions (thunor.helpers
)¶
-
thunor.helpers.
format_dose
(num, sig_digits=12, array_as_string=None)¶ Format a numeric dose like 1.2e-9 into 1.2 nM
- Parameters
num (float or np.ndarray) – Dose value, or array of such
sig_digits (int) – Number of significant digits to include
array_as_string (str, optional) – Combine array into a single string using the supplied join string. If not supplied, a list of strings is returned.
- Returns
Formatted dose values
- Return type
str or list of str
-
thunor.helpers.
plotly_to_dataframe
(plot_fig)¶ Extract data from a plotly figure into a pandas DataFrame
- Parameters
plot_fig (plotly.graph_objs.Figure) – A plotly figure object
- Returns
A pandas DataFrame containing the extracted traces from the figure
- Return type
pd.DataFrame