matcal.core.data_analysis

Functions

determine_line_intersection(m1, b1, m2, b2)

This function determines the intersection point location for two two-dimensional lines given their slopes and intercepts.

determine_pt2_offset_yield(...[, ...])

This function calculates the 0.2% offset yield stress values for a given data set.

determine_slope_and_intercept(data, ...)

This function will determine the intercept and slope of a line through two consecutive points in a data set.

matcal.core.data_analysis.determine_slope_and_intercept(data, first_index, independent_field_name, dependent_field_name)[source]

This function will determine the intercept and slope of a line through two consecutive points in a data set.

Parameters:
  • data (Data) – the data for which the slope and intercept will be determined.

  • first_index (int) – the index of the first point of the consecutive points of interest

  • x_field (str) – the independent variable field name

  • y_field (str) – the independent variable field name

Returns:

slope and intercept

Return type:

tuple(float, float)

matcal.core.data_analysis.determine_line_intersection(m1, b1, m2, b2)[source]

This function determines the intersection point location for two two-dimensional lines given their slopes and intercepts.

Parameters:
  • m1 (float) – the slope of the first line

  • b1 – the intercept of the first line

  • m2 (float) – the slope of the second line

  • b2 – the intercept of the second line

Returns:

intersection point independent and dependent field values

Return type:

tuple(float, float)

matcal.core.data_analysis.determine_pt2_offset_yield(stress_strain_data, elastic_mod, strain_field='engineering_strain', stress_field='engineering_stress', plot=False, show_plot=True, blocking_plot=True)[source]

This function calculates the 0.2% offset yield stress values for a given data set.

Parameters:
  • stress_strain_data (Data) – the data set that the function will operate on and use to calculate the 0.2% offset stress.

  • elastic_mod – the elastic modulus for the material from which the data was collected. The units must match the units of the provided experimental stress strain data.

  • strain_field (str) – the name of the field for the strain values in the data set

  • stress_field (str) – the name of the field for the stress values in the data set

  • plot (bool) – optionally plot the provided stress strain data, the 0.2% offset elastic data, and the 0.2% yield stress for the data set.

  • show_plot – boolean to show or not show the plot when the function is called.

  • blocking_plot (bool) – If True, this stops the code until the figure is closed. If False, the code continues after the figure is made

Returns:

the 0.2% offset strain (first index) and stress (second index)

Return type:

tuple(float, float)