side_functions module

side_functions.correction(data, elem, internal_std)

Calculates internal standard correction.

Parameters:
  • data (DataFrame) – DataFrame with quantified values where columns are measured isotopes

  • el (str) – Element used as internal standard

  • internal_std (DataFrame) – DataFrame of values of internal standard where columns are elements for correction and each row represents one measurement e.g. Spot.

side_functions.elem_resolution(elem)

formatting of element name to remove resolution for ELEMENT2 instrument

side_functions.element_formater(elem, lst_of_elems)

matches the given element format to the one used in list

side_functions.element_strip(elem)

formatting of element name to match colnames of reference material

side_functions.formatted_export(frame, path)
side_functions.get_diff_lst(iolite)

return list of times in seconds from start to every start and end of laser ablation for spots

side_functions.get_diff_lst_line(iolite)

return list of times in seconds from start to every start and end of laser ablation for lines

side_functions.get_difference(start, now)

return time in seconds between 2 timestamps

side_functions.get_index(data, time)

return closest index of MS time given time in seconds

side_functions.get_logger(pathname)

Create log file similar to Ilaps-GUI log file

Parameters:
  • pathname (str) –

  • created. (Path to a log file(.txt). If file doesn't exists it is) –

side_functions.get_timestamp(strTime)

format string time from iolite to timestamp

side_functions.multivariate_outliers(df, cols=['Na2O (%)', 'MgO (%)', 'Al2O3 (%)', 'SiO2 (%)', 'P2O5 (%)', 'K2O (%)', 'CaO (%)', 'MnO (%)', 'Fe2O3 (%)', 'CuO (%)'], threshold=3)
side_functions.plot_data(data, isotopes=None, ax=None, *args, **kwargs)

Create a plot of MS time dependant data.

Parameters:
  • data (DataFrame) – Dataframe of ms data where column names are names of measured isotopes and index is time.

  • isotopes (list) – List of isotopes to plot. (Optional)

  • ax (matplotlib axes) – Matplotlib axes to show the plot. (Optional)

side_functions.remove_outliers(data, offset, width)

Function to filter data by percentile value.

Parameters:
  • data (nparray) – array of data

  • offset (float) – 1-offset = upper treshold for percentile filtering. Accepts values between 0 and 1.

  • width (float) – Width od returned values, where 1-offset-width = lower treshold for percentile filtering. Accepts values between 0 and 1.

Returns:

data_out – Filtered data.

Return type:

nparray

side_functions.report(x, LoD, elem)

Replace values lower than limit of detection. If the value is above LoD, round to specific decimal place.

side_functions.z_score_method(df, variable_name, threshold=3)