_safe_write_tac#
- petpal.cli.cli_tac_interpolation._safe_write_tac(tac_times: numpy.ndarray, tac_values: numpy.ndarray, filename: str) None#
Writes time-activity curves (TAC) to a file.
Tries to write a TAC to the specified file and raises an exception if unable to do so. The TAC is expected to be a numpy array where the first index corresponds to the times, and the second corresponds to the activity.
- Parameters:
tac_times (np.ndarray) – A numpy array containing the time points of the TAC.
tac_values (np.ndarray) – A numpy array containing the activity values of the TAC.
filename (str) – The name of the file to write to.
- Raises:
Exception – An error occurred writing the TAC.