Revive export data function
The export data function has been commented out in the process of writing the plottable mod as the function was only used to save plots.
A general export_data() function is nevertheless useful and should be revived to export not only plots but also "raw" data, e.g. ray positions, wavefront data, fluence distributions etc. For this, it might be useful to define an enum with variants that hold the respective data to export:
pub enum ExportData{
Plot(PlotType, PlotData)
Image(ImageData)
CSV(CSVData, HeaderInfo)
Raw(RawData, HeaderInfo)
...
}
The function can then use the passed ExportData and handle accordingly
fn export_data(data: &ExportData, export_path: &Path)