openformat.sp package

openformat.sp.load_sp(filename, byte_order='<')

Load a Perkin Elmer spectrum 1.

Note

This function returns a dictionary with keys listed in the Returns section.

Parameters
  • filename (str) – path to the Perkin Elmer spectrum file

  • byte_order (str) – byte order of the encoded binary data

Returns

  • description (bytes) – description of the dataset

  • start (float) – value at which the spectrum starts (inclusive). See xlabel for the units.

  • end (float) – value at which the spectrum ends (inclusive). See xlabel for the units.

  • delta (float) – difference between consecutive abscissa data points. See xlabel for the units.

  • num_points (int) – number of datapoints

  • xlabel (str) – units of the abscissa

  • ylabel (str) – units of the ordinate

  • yvalues (np.array) – values of the spectrum corresponding to xvalues

  • xvalues (np.array) – xvalues corresponding to yvalues

  • DataSetHistoryRecordMember (bytes) – unparsed value

  • DataSetChecksumMember (bytes) – unparsed value

  • DataSetDataTypeMember (bytes) – unparsed value

  • DataSetNameMember (bytes) – unparsed value

  • DataSetYAxisUnitTypeMember (bytes) – unparsed value

  • DataSetSamplingMethodMember (bytes) – unparsed value

  • DataSetFileTypeMember (bytes) – unparsed value

  • DataSetAliasMember (bytes) – unparsed value

  • DataSetXAxisUnitTypeMember (bytes) – unparsed value

  • DataSetOrdinateRangeMember (bytes) – unparsed value

References

1

Ben Perston. “PerkinElmer IR data file import tools”, https://uk.mathworks.com/matlabcentral/fileexchange/22736-perkinelmer-ir-data-file-import-tools