You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the function looks for and extracts fc_data, zfc_data, rtsirm_cool_data, and rtsirm_warm_data. It needs to also look for and extract Js T data that is often measured upon cooling.
def extract_mpms_data(df, specimen_name):
"""
Extracts and separates MPMS (Magnetic Property Measurement System) data
for a specific specimen from a dataframe.
This function filters data for a given specimen and separates it based on
different MagIC measurement method codes. It specifically looks for data
corresponding to 'LP-FC' (Field Cooled), 'LP-ZFC' (Zero Field Cooled),
'LP-CW-SIRM:LP-MC' (Room Temperature SIRM measured upon cooling), and
'LP-CW-SIRM:LP-MW' (Room Temperature SIRM measured upon Warming).
Parameters:
df (pandas.DataFrame): The dataframe containing MPMS measurement data.
specimen_name (str): The name of the specimen to filter data for.
Returns:
tuple: A tuple containing four pandas.DataFrames:
- fc_data: Data filtered for 'LP-FC' method.
- zfc_data: Data filtered for 'LP-ZFC' method.
- rtsirm_cool_data: Data filtered for 'LP-CW-SIRM:LP-MC' method.
- rtsirm_warm_data: Data filtered for 'LP-CW-SIRM:LP-MW' method.
Example:
>>> fc, zfc, rtsirm_cool, rtsirm_warm = extract_mpms_data(measurements_df, 'Specimen_1')
"""
specimen_df = df[df['specimen'] == specimen_name]
fc_data = specimen_df[specimen_df['method_codes'].str.contains('LP-FC')]
zfc_data = specimen_df[specimen_df['method_codes'].str.contains('LP-ZFC')]
rtsirm_cool_data = specimen_df[specimen_df['method_codes'].str.contains('LP-CW-SIRM:LP-MC')]
rtsirm_warm_data = specimen_df[specimen_df['method_codes'].str.contains('LP-CW-SIRM:LP-MW')]
return fc_data, zfc_data, rtsirm_cool_data, rtsirm_warm_data
The text was updated successfully, but these errors were encountered:
Swanson-Hysell
changed the title
need to update extract_mpms_data() to take Js_T data
need to update extract_mpms_data() and plot_mpms_data() to take Js_T data
Feb 12, 2024
Need to make it so that it is an option to plot the Js-T data as well.
Possibly low-temperature loops as well. This is a good example of where the rockmag_functions library comes in helpful, as the functions for the VSM data can also be used on the low-temperature loops. Requires the upload of a loop correction file for the field steps.
Agreed. My thought here is that developing the functions for the VSM data first (more likely to be used during IRM Summer School) makes sense. Those can then be brought in to enable plotting of low-temperature loops developed on the MPMS.
It likely makes sense to change the name of the extract_mpms_data to be more specific about what data are being extracted as this function is currently specific to dc temperature cycling data.
Currently the function looks for and extracts fc_data, zfc_data, rtsirm_cool_data, and rtsirm_warm_data. It needs to also look for and extract Js T data that is often measured upon cooling.
The text was updated successfully, but these errors were encountered: