Get test data from Granta MI
Connect to Granta MI and specify a database and tables.table.bulk_fetch() to efficiently populate the attributes for each test record and filter out records that do
not have values for the attributes required by this analysis.
pandas DataFrame and populate it with data from the functional attribute Tensile Response (11 axis), as
well as Specimen ID and Test Temperature.
To produce a usable DataFrame, the functional data must:
- Have the headers removed
- Be converted from a range into a single value
Process the data and calculate statistics
For easier plotting, interpolate each series onto the union of all the parameter values (pandas uses the strain
parameter as an index for the union). Any NaN inside the populated area for this column is interpolated by the
interpolate() method with limit_area="inside".
Group the data by Test Temperature, then use scipy to calculate the 95% confidence intervals by passing the count,
mean and standard deviation of the grouped data.
Use the .T property to transpose the data frame before the .groupby() operation and after the .count(),
.mean(), and .std() operations.
matplotlib, creating a grid of subplots with identical (shared) axes to easily
compare the tensile response at different temperatures.

Import roll-up data into Granta MI
Define two helper functions: one that resamples a DataFrame linearly based on a target column’s values, and one that creates a series of range values. (Althoughpandas has a built-in resample() function, it only operates on time-series data.)
path_from() to create a folder path, and then create a
statistical data record as a child of the final folder. Populate the Test Temperature and Tensile Response Analysis
(11 axis) attributes using the helper functions.
Write the new record into a Granta MI database using Session.update(), then link the newly-created attribute to the
relevant test results. Finally, write the new links to the Granta MI database using Session.update_links().