Hi Cole,
There's no easy way of exporting the table in the Results View, but we'll add that for an upcoming release.
In the meantime, you can use this bit of code to get the same values (paste into Python Workspace and Save As a new file):
from iolite.QtGui import QFileDialog
import pandas as pd
# Enter channel to report stats here:
ch_name = 'Final Pb206/U238'
# Note: This will report the MSWD based on propagated uncertainties only.
# Create new pandas dataframe
df = pd.DataFrame(columns=['Selection group', 'Count', 'Outliers rejected', 'Average', 'Uncertainty', 'MSWD (prop)'])
# Get channel object
ch = data.timeSeries(ch_name)
# Assuming you don't want to report stats for the baselines
# Get Ref Mat and Sample selection groups:
rm_grps = data.selectionGroupList(data.ReferenceMaterial)
samp_grps = data.selectionGroupList(data.Sample)
# Then combine them:
all_grps = rm_grps + samp_grps
for grp in all_grps:
# Get group stats. Here's the function signature:
# stats(TimeSeriesDataPyInterface tsd, str outlierMethodString = "None", str avgTypeString = "Mean", str uncertTypeString = "TwoSDabsolute");
# Options for outlierMethodString: "None", "TwoSDRejection", "ThreeSDRejection
# Options for avgTypeString: "Mean", "WeightedMean", "Median"
# Options for uncertTypeString: "TwoSDabsolute", "TwoSDpercent", "TwoSDppm", "TwoSEabsolute", "TwoSEpercent", "TwoSEppm"
stats = grp.stats(ch, "None", "WeightedMean", "TwoSDabsolute")
# Add to dataframe
df = df.append({'Selection group': grp.name,
'Count': stats['totalResults'],
'Outliers rejected': stats['outliers'],
'Average': stats['tidyMean'],
'Uncertainty': stats['tidyUncert'],
'MSWD (prop)': stats['MSWD']},
ignore_index=True)
# And now ask user where to save the file:
file_name = QFileDialog.getSaveFileName(None, "Save Group Stats", "Group_stats.csv", "CSV (*.csv)")
# And save out to csv:
df.to_csv(file_name, index=False)
Please let us know if you have any troubles.
Kind regards,
Bence