Physical/Magnetic Property Management System

This module contains a function for handling Physical/Magnetic Property Management System (PPMS/MPMS) data. The function takes a PPMS/MPMS .dat file, detects its measurement type, and extracts relevant metadata and data columns. The measurement types are based on the specific configurations of the PPMS/MPMS machine used.

PPMS/MPMS Parser

ppmsmpmsparser takes a PPMS/MPMS .dat file as input, extracts the data, and writes it to a .csv file. Here is an example of how the function ppmsmpmsparser can be used:

from project_chameleon.ppmsmpms import ppmsmpmsparser
ppmsmpmsparser('measurement.dat', 'data.csv')

In this example, ‘measurement.dat’ is the input file containing the PPMS/MPMS data. ‘data.csv’ is the CSV file where the extracted data will be saved. The CSV file should be empty before writing. If a file named ‘data.csv’ does not already exist, one will be created. No metadata is extracted or displayed by this function.

Below is more information on the main function:

ppmsmpms.ppmsmpmsparser(inputfile, outputfile)

ppmsmpmsparser() is a function that allows users to separate out relevant columns for 4 different mpms and ppms file types. Relevant columns are saved from the input file into the output file. The user also has the option to pick between 4 different kinds of files: heat capacity, magnetic suceptibility, 4-prode resistivity, and thermal transport.

Args:

inputfile should be a string or path to a PPMS/MPMS file ending with ‘.dat’. outputfile should be a string ending with ‘.txt’ or ‘.csv’ which will be the name of the final output file.

Returns:

this fucntion does not return anything. It saves outputs into a file called outputfile.

Exceptions:

input_file must be a file. input_file must end with ‘.dat’. output_file must end with ‘.txt’ or ‘.csv’.