API Reference#

MagentroData#

class magentropy.MagentroData#

Representation of DC magnetization data.

Magnetization data is collected for a sample by varying the temperature monotonically for each of many magnetic field strengths. This class provides methods for reading, processing, and plotting the data.

Uses the pint package internally for unit convertsions.

Notes

All DataFrame attributes (raw_df, converted_df, etc.) are immutable and return copies of the internal instance attributes. If repeated access is required, for example to a DataFrame’s columns, it is best to first save the DataFrame as a local variable to avoid repeatedly copying large amounts of data.

Attributes

converted_df

A copy of the converted data (SI units).

converted_df_with_units

A copy of the converted data (SI units) with a second header level indicating units.

last_presets

The most recently used process_data() presets, or None if process_data() has not been run.

presets

The current process_data() presets.

processed_df

A copy of the processed data.

processed_df_with_units

A copy of the processed data with a second header level indicating units.

raw_df

A copy of the raw data.

raw_df_with_units

A copy of the raw data with a second header level indicating units.

sample_mass

The magnitude of the sample mass.

sample_mass_with_units

The magnitude and units of the sample mass.

Methods

bootstrap([n_bootstrap, random_seed])

Calculate bootstrap estimates of the errors in the smoothed magnetic moment output and fill processed_df's 'M_err' and 'M_per_mass_err' columns.

get_map_grid([data_prop, data_version, ...])

Return the temperature, field, and property grids used to construct maps.

get_presets()

Alias for attribute presets.

get_raw_data_units()

The raw data units for T, H, M, and sample mass.

plot(plot_type, **kwargs)

Plot property as lines or as a map.

plot_all()

Plot all combinations of data_prop and data_version for both line plots and maps with default settings.

plot_lines([data_prop, data_version, ax, ...])

Plot the moment per mass, derivative with respect to temperature, or entropy as lines.

plot_map([data_prop, data_version, ax, ...])

Plot the moment per mass, derivative with respect to temperature, or entropy as a map.

plot_processed(plot_type, **kwargs)

Plot processed property as lines or as a map.

plot_processed_lines(processed_df[, ...])

Plot processed data from a DataFrame as lines.

plot_processed_map(processed_df[, ...])

Plot processed data from a DataFrame as a map.

process_data([npoints, temp_range, fields, ...])

Smooth magnetic moment and calculate raw, converted, and processed derivative and entropy.

set_presets(**kwargs)

Set presets for process_data().

set_raw_data_units([T, H, M, sample_mass])

Set the units of the raw data.

sim_data(temps, fields[, sigma_t, sigma_h, ...])

Simulate data for testing and example purposes.

test_grouping([fields, decimals, max_diff])

Test grouping parameters before processing data, if desired.

test_grouping_(raw_df[, fields, decimals, ...])

Class method corresponding to test_grouping().

to_html(**kwargs)

Render as an HTML table.

to_string(**kwargs)

Render as console-friendly output.

__init__(file_or_df, qd_dat=True, comment_col='Comment', T='Temperature (K)', H='Magnetic Field (Oe)', M='Moment (emu)', M_err='M. Std. Err. (emu)', sample_mass=None, units_level=None, raw_data_units=None, presets=None, **read_csv_kwargs)#

Initialize data with a source file or DataFrame.

Parameters:
file_or_dfstr, path object, file-like object, or DataFrame

An input file or DataFrame. A DataFrame should have the specified columns (parameters comment_col through M_err). Files will be read by pandas.read_csv() with additional arguments given in **read_csv_kwargs, and the resultant DataFrame should have the specified columns.

qd_datbool, default True

If True and file_or_df is not a DataFrame, the input file is assumed to be a Quantum Design .dat file with the sample mass given in the header as “INFO,<sample_mass>,SAMPLE_MASS” and the delimited data separated from the header by “\n[Data]\n”. The delimited data will then be read by pandas.read_csv() with additional arguments given in **read_csv_kwargs.

comment_collabel, optional, default ‘Comment’

The name of the input DataFrame’s comment column. If a row has a non-NaN value in the comment column, it will be omitted. Set to None to ignore (do not omit any rows based on comments).

Tlabel, default ‘Temperature (K)’

The name of the input temperature column.

Hlabel, default ‘Magnetic Field (Oe)’

The name of the input magnetic field strength column.

Mlabel, default ‘Moment (emu)’

The name of the input magnetic moment column. (Moment only, not per mass unit.)

M_errlabel, optional, default ‘M. Std. Err. (emu)’

The name of the input moment standard error column.

sample_massfloat, optional

The mass of the sample that was measured. If supplied, this will override any value determined from an input file when qd_dat is True. Defaults to 1.0. Keep default of 1.0 if magnetic moment was already measured per mass unit, and set the units of moment and sample mass so that the dimensionality is correct.

units_levelint or str, optional

If supplied, data is expected to have units specified in this level of the column index. The column name parameters should still account for this level so they each refer to a single Series (i.e., include all levels in the column names).

raw_data_unitsdict, optional

Keyword arguments specifying the units of the raw data that will be passed to set_raw_data_units. If supplied, this will override any units determined from column levels when units_level is supplied.

presetsdict, optional

Keyword arguments to pass to set_presets(). See set_presets() and process_data() for more info.

**read_csv_kwargs

Passed to pandas.read_csv() for reading delimited data.

property raw_df#

A copy of the raw data.

property raw_df_with_units#

A copy of the raw data with a second header level indicating units.

property converted_df#

A copy of the converted data (SI units).

property converted_df_with_units#

A copy of the converted data (SI units) with a second header level indicating units.

property processed_df#

A copy of the processed data.

property processed_df_with_units#

A copy of the processed data with a second header level indicating units.

property sample_mass#

The magnitude of the sample mass.

Can be set with a float.

property sample_mass_with_units#

The magnitude and units of the sample mass.

Can be set with a tuple containing a float (magnitude) and a str (units).

get_raw_data_units()#

The raw data units for T, H, M, and sample mass.

Returns:
dict

Raw data units.

set_raw_data_units(T=None, H=None, M=None, sample_mass=None)#

Set the units of the raw data.

After the units are set, all other data is converted accordingly, so there is no need to re-process data if units are changed retroactively.

Parameters:
T, H, M, sample_massstr, optional

New units for temperature, magnetic field strength, measured moment, and sample mass, respectively. Moment is not per mass. Parameters left as None will not change the corresponding units.

property presets#

The current process_data() presets.

Can be set with a dict.

get_presets()#

Alias for attribute presets.

set_presets(**kwargs)#

Set presets for process_data().

Parameters left as None will not change the corresponding preset.

Parameters:
**kwargs

See process_data() for valid parameters and parameter info.

property last_presets#

The most recently used process_data() presets, or None if process_data() has not been run.

to_string(**kwargs)#

Render as console-friendly output.

Parameters:
**kwargsAny

Passed to DataFrame.to_string() for rendering raw_df_with_units, converted_df_with_units, and processed_df_with_units. Excludes buf parameter.

Returns:
str

Console-friendly output.

to_html(**kwargs)#

Render as an HTML table.

Parameters:
**kwargsAny

Passed to DataFrame.to_html() for rendering raw_df_with_units, converted_df_with_units, and processed_df_with_units. Excludes buf parameter.

Returns:
str

HTML table.

classmethod sim_data(temps, fields, sigma_t=1e-06, sigma_h=1e-06, sigma_m=1e-06, random_seed=None, m_max=0.01, slope=1.5, bump_height=0.1)#

Simulate data for testing and example purposes.

The simulated data model function is a decreasing logistic function with maximum m_max plus a tiny Gaussian bump, the center of which varies linearly with field strength.

The moment error column will the filled with sigma_m.

Parameters:
temps, fieldsarray_like

Temperatures and fields at which to generate data.

sigma_t, sigma_h, sigma_mfloat, default 1e-6

Standard deviation of random normally-distributed errors added to the temperatures, fields, and moments, respectively.

random_seedNone, int, array_like[ints], SeedSequence, BitGenerator, or Generator

Passed to numpy.random.default_rng().

m_maxfloat, default 0.01

The limit as temperature goes to -inf of the moment for the highest field strength.

slopefloat, default 1.5

Controls the steepness of the moment curves. Higher slope results in a faster decrease with temperature.

bump_heightfloat, default 0.1

Amplitude of the Gaussian bump as a proportion of m_max.

Returns:
dfDataFrame

Simulated data for temperature, field, moment, and moment error.

test_grouping(fields=None, decimals=None, max_diff=None)#

Test grouping parameters before processing data, if desired.

See process_data() for parameter info. Default parameters are those in presets.

Returns:
grouping_presetsdict

The field grouping parameters fields, decimals, and max_diff after being checked and any defaults are used.

grouped_byDataFrameGroupBy

Object on which one may test the results of the grouping.

Notes

The pandas.core.groupby.DataFrameGroupBy.count() method is useful for viewing the number of observations in each field group. For example, test_grouping(...)['T'].count() returns a DataFrame of the group counts. Groups with less than min_sweep_len observations are ignored in process_data().

classmethod test_grouping_(raw_df, fields=None, decimals=None, max_diff=None)#

Class method corresponding to test_grouping().

See test_grouping() and process_data() for parameters following raw_df and return values. Default parameters are the class defaults.

A copy of raw_df is grouped, so the returned DataFrameGroupBy cannot modify raw_df.

Parameters:
raw_dfDataFrame

DataFrame on which to test grouping.

process_data(npoints=None, temp_range=None, fields=None, decimals=None, max_diff=None, min_sweep_len=None, d_order=None, lmbds=None, lmbd_guess=None, weight_err=None, match_err=None, min_kwargs=None, add_zeros=None)#

Smooth magnetic moment and calculate raw, converted, and processed derivative and entropy.

Groups raw data, smooths magnetic moment using Tikhonov regularization, and fills processed_df. Calculates derivative 'dM_dT' and entropy 'Delta_SM' for raw and converted data without smoothing, and for processed data using smoothed moment.

Requires that all sweeps are taken on cooling, or all sweeps are taken on warming (monotonic). Warming and cooling sweeps should not both be included in the data.

Note

Rows of zero field and zero moment are prepended to the data before integration, so it is not necessary to include measurements at zero field in the input data. Whether or not the zeros are added to processed_df after processing can be controlled with add_zeros.

Parameters left as the default None will use the corresponding values in presets. All parameters should be given in raw data units if applicable (temp_range, max_diff, etc.).

Parameters:
npointsint, optional

Number of temperature points in temp_range to use to output smoothed 'M_per_mass', 'dM_dT', and 'Delta_SM' for each field strength.

temp_range(2,) array_like, optional

Temperature range (inclusive) in raw data units over which to analyze the data. Bounds less than or greater than the lowest or highest given temperatures, respectively, will be adjusted to the data range when creating output temperatures.

fieldsarray_like, optional

Expected field strengths for grouping data. If fields has length zero, the groups are determined automatically based on decimals and/or max_diff.

decimalsint, optional

The decimal place to which to round the automatically determined field groups. (A negative integer specifies the number of positions to the left of the decimal point. See numpy.around().) Ignored if fields has length greater than zero. If fields has length zero and max_diff is numpy.inf, groups will be determined solely by rounding to this decimal place.

max_difffloat, optional

If fields has length greater than zero, max_diff is the maximum difference allowed between each raw field strength and the closest field in fields. Raw fields too far away from any field group will be omitted, unless max_diff is numpy.inf. If fields has length zero, max_diff is the maximum difference allowed between any two items in each field group, which is used to determine groups automatically. Generally, decimals is enough to determine groups, but max_diff can be used for finer control, e.g. to get exact means.

min_sweep_lenint, optional

Minimum number of observations required for a field to be included in the smoothed output. Field groups with less than this number will be skipped.

d_orderint, optional

Order of derivative used to calculate roughness during regularization. For example, if d_order is 2, the second temperature derivative of magnetic moment is used to calculate the roughness. Generally 2 or 3 work well. Choice of d_order will change optimal regularization parameter \(\lambda\).

lmbdsarray_like, optional

Specifies regularization parameter \(\lambda\). If lmbds is a single number (or array_like of length 1), it will be applied to all magnetic field strengths. If lmbds is numpy.nan or length 0, each \(\lambda\) will be determined automatically. If lmbds is the same length as the number of field strengths, each element (numerical or numpy.nan) will be applied to the corresponding field, in order of increasing field strength.

lmbd_guessfloat, optional

Initial guess for regularization parameter \(\lambda\) when determining automatically.

weight_errbool, optional

If True, weight measurements by the normalized inverse squares of the errors.

match_errbool, array_like, or one of {‘min’, ‘mean’, ‘max’}, optional

Ignored if \(\lambda\) is given in lmbds. If match_err is False, use generalized cross validation (GCV) to find optimal \(\lambda\). If match_err is True, find optimal \(\lambda\) by matching absolute differences between the measured and smoothed values with the errors. If match_err is a single number (or array_like of length 1), match the standard deviation of the absolute differences with this number. If match_err is the same length as the number of field strengths, each element (numeric) will be applied to the corresponding field, in order of increasing field strength. If match_err is one of 'min', 'mean', or 'max', match the standard deviation of the absolute differences with the minimum, mean, or maximum error for each field.

min_kwargsdict, optional

Keyword arguments to pass to scipy.optimize.minimize() when determining optimal \(\lambda\). The parameters fun, x0, and args will be ignored if included. Note that \(\log_{10}\lambda\) is passed to scipy.optimize.minimize(), so arguments such as bounds should be adjusted accordingly. (The same is not true, however, for lmbd_guess.)

add_zerosbool, optional

If True, rows of zeros corresponding to zero field and zero moment will be prepended to processed_df after processing.

bootstrap(n_bootstrap=100, random_seed=None)#

Calculate bootstrap estimates of the errors in the smoothed magnetic moment output and fill processed_df’s 'M_err' and 'M_per_mass_err' columns.

Parameters:
n_bootstrapint, default 100

The number of times to sample from the data and fit a model.

random_seedNone, int, array_like[ints], SeedSequence, BitGenerator, or Generator

Passed to numpy.random.default_rng().

Notes

Bootstrap procedures involve repeatedly sampling N points from data of length N with replacement, fitting a model to each data sample, and computing the parameter of interest from the n_bootstrap fitted models. In this case, the standard deviation of each smoothed magnetic moment point is computed from the values of the n_bootstrap models at each point.

Attention

The bootstrap method presented here is purely experimental and is not detailed in either of the sources listed on the homepage.

Caution

This method is computationally expensive and can take upwards of ten minutes to run on typical magnetization data.

Important

Bootstrap estimates in the context of regularization are dependent on the chosen regularization parameter \(\lambda\). These error estimates should not be viewed as “true” estimates but rather as the estimates for a given \(\lambda\). This should only be used once the user is confident their \(\lambda\)’s are appropriate.

classmethod plot_processed_lines(processed_df, compare_df=None, data_prop='M_per_mass', ax=None, T_range=array([-inf, inf]), H_range=array([-inf, inf]), offset=0, at_temps=None, fields=None, decimals=None, max_diff=None, colormap=None, legend=False, colorbar=False, plot_kwargs=None, compare_kwargs=None, colorbar_kwargs=None)#

Plot processed data from a DataFrame as lines.

This class method allows already-processed data to be easily plotted so that raw data needn’t be re-processed.

See plot_lines() for parameters following compare_df and return values.

Parameters:
processed_dfDataFrame

Processed data. Expected to have column names matching those of the processed_df attribute of an instance of MagentroData.

compare_dfDataFrame, optional

Converted data. Expected to have column names matching those of the converted_df attrubute of an instance of MagentroData. Expected to use the same units as processed_df.

plot_lines(data_prop='M_per_mass', data_version='raw', ax=None, T_range=array([-inf, inf]), H_range=array([-inf, inf]), offset=0, at_temps=None, colormap=None, legend=False, colorbar=False, plot_kwargs=None, compare_kwargs=None, colorbar_kwargs=None)#

Plot the moment per mass, derivative with respect to temperature, or entropy as lines.

All parameter units should correspond to those of the data specified by data_version.

Parameters:
data_prop{‘M_per_mass’, ‘M_per_mass_err’, ‘dM_dT’, ‘Delta_SM’}, default ‘M_per_mass’

The property to plot.

data_version{‘raw’, ‘converted’, ‘processed’, ‘compare’}, default ‘raw’

The version of the data to plot. If 'compare', converted and processed data will be plotted together.

axAxes, optional

Axes on which to plot. If None, new Axes will be created from the current Figure.

T_range, H_range(2,) array_like

Temperature and magnetic field strength ranges to display.

offsetfloat, default 0

If a nonzero offset is supplied, successive lines (fields or temperatures) will have an offset added to them. Good for seeing curve shapes at different fields or temperatures.

at_tempsarray_like, optional

Temperatures to group data. If supplied, data will be plotted versus magnetic field strength instead of temperature, at the temperatures in the data that are closest to the supplied at_temps.

colormapColormap or str, optional

Color map to cycle through when plotting lines.

legendbool, default False

If True, add a legend to the Axes with Axes.legend().

colorbarbool, default False

If True, add a discrete color bar to the Figure containing ax with Figure.colorbar().

plot_kwargsdict or array_like of dicts, optional

Keyword arguments for Axes.plot(). A single dict will be applied to each line. Multiple dicts will be applied to successive lines. Not checked for length; a dict is applied to each line until either the end is reached or there are no more lines to plot.

compare_kwargsdict or array_like of dicts, optional

plot_kwargs for converted data, used if data_version is 'compare'.

colorbar_kwargsdict, optional

Keyword arguments for Figure.colorbar(), excluding mappable.

Returns:
axAxes

If colorbar is False, the Axes on which the data is plotted.

ax, cbarAxes, Colorbar

If colorbar is True, the Axes on which the data is plotted and the Colorbar.

classmethod plot_processed_map(processed_df, data_prop='M_per_mass', ax=None, T_range=array([-inf, inf]), H_range=array([-inf, inf]), T_npoints=1000, H_npoints=1000, interp_method='linear', center=None, contour=False, colorbar=True, imshow_kwargs=None, contour_kwargs=None, colorbar_kwargs=None)#

Plot processed data from a DataFrame as a map.

This class method allows already-processed data to be easily plotted so that raw data needn’t be re-processed.

See plot_map() for parameters following processed_df and return values.

Parameters:
processed_dfDataFrame

Processed data. Expected to have column names matching those of the processed_df attribute of an instance of MagentroData.

get_map_grid(data_prop='M_per_mass', data_version='raw', T_range=array([-inf, inf]), H_range=array([-inf, inf]), T_npoints=1000, H_npoints=1000, interp_method='linear')#

Return the temperature, field, and property grids used to construct maps.

See plot_map() for parameters.

Returns:
T_grid, H_grid, gridndarray

Grids corresponding to temperature, field, and property, respectively.

plot_map(data_prop='M_per_mass', data_version='raw', ax=None, T_range=array([-inf, inf]), H_range=array([-inf, inf]), T_npoints=1000, H_npoints=1000, interp_method='linear', center=None, contour=False, colorbar=True, imshow_kwargs=None, contour_kwargs=None, colorbar_kwargs=None)#

Plot the moment per mass, derivative with respect to temperature, or entropy as a map.

All parameter units should correspond to those of the data specified by data_version.

Note

Different default colormaps are used depending on center. The colormap can be specified manually in imshow_kwargs. For example, imshow_kwargs = {'cmap': 'RdBu_r'}.

Parameters:
data_prop{‘M_per_mass’, ‘M_per_mass_err’, ‘dM_dT’, ‘Delta_SM’}, default ‘M_per_mass’

The property to plot.

data_version{‘raw’, ‘converted’, ‘processed’}, default ‘raw’

The version of the data to plot. ('compare' is not available for maps.)

axAxes, optional

Axes on which to plot. If None, new Axes will be created from the current Figure.

T_range, H_range(2,) array_like

Temperature and magnetic field strength ranges to display.

T_npoints, H_npointsint, default 1000

Number of points to use for grid interpolation in the horizontal (T) and vertical (H) directions.

interp_method{‘linear’, ‘nearest’, ‘cubic’}, default ‘linear’

Map grid interpolation method. See scipy.interpolate.griddata()’s method parameter. The 'cubic' method may give a smoother result, but it is recommended to start with 'linear' interpolation, as artifacts can occasionally occur in the output when using higher-order interpolation.

centerbool, optional

If True, center the pixel values around zero, setting values beyond the central range to the values at the boundaries of the range. This is helpful for ignoring extreme values. None defaults to False when data_prop is 'M_per_mass' or 'M_per_mass_err' and True otherwise.

contourbool, default False

If True, add contours to the plot with Axes.contour().

colorbarbool, default True

If True, add a continuous color bar to the Figure containing ax with Figure.colorbar().

imshow_kwargsdict, optional

Keyword arguments for Axes.imshow().

contour_kwargsdict, optional

Keyword arguments for Axes.contour().

colorbar_kwargsdict, optional

Keyword arguments for Figure.colorbar(), excluding mappable.

Returns:
axAxes

If colorbar is False, the Axes on which the data is plotted.

ax, cbarAxes, Colorbar

If colorbar is True, the Axes on which the data is plotted and the Colorbar.

classmethod plot_processed(plot_type, **kwargs)#

Plot processed property as lines or as a map.

See plot_processed_lines() or plot_processed_map() for parameters and return values.

Parameters:
plot_type{‘lines’, ‘map’}

Plot lines or map.

**kwargsdict, optional

Passed to plot_processed_lines() or plot_processed_map(), depending on plot_type.

plot(plot_type, **kwargs)#

Plot property as lines or as a map.

See plot_lines() or plot_map() for parameters and return values.

Parameters:
plot_type{‘lines’, ‘map’}

Plot lines or map.

**kwargsdict, optional

Passed to plot_lines() or plot_map(), depending on plot_type.

plot_all()#

Plot all combinations of data_prop and data_version for both line plots and maps with default settings.

Line plots grouped by temperature are also plotted, with five evenly-spaced temperature groups.

Each returned Axes gets its own Figure. All Figures are plotted immediately if run in a notebook, so this is a “quick-and-dirty” way to view every plot after initial processing.

Tip

If using a notebook, be sure to put a semicolon (;) after this method to suppress nasty-looking text output!

Returns:
tuple[Axes, …]

The Axes, one for each plot.

Errors#

Exception classes.

exception magentropy.errors.MagentroError#

Base exception class for MagentroData.

exception magentropy.errors.UnitError#

Exception class for invalid units or conversions.

exception magentropy.errors.MissingDataError#

Exception class for attempting to plot or operate on empty data.

Typing#

Type definitions.

class magentropy.typedefs.ColumnDataDict#

Type for dict describing column data, such as temperature and magnetic moment.

Methods

clear()

copy()

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

items()

keys()

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

T#
H#
M#
M_err#
M_per_mass#
M_per_mass_err#
dM_dT#
Delta_SM#
class magentropy.typedefs.Presets#

Type for process_data() presets.

Implementation note

These should all have defaults in _DEFAULT_PRESETS, be parameters in process_data(), and be verified and returned in _validation.check_presets().

Methods

clear()

copy()

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

items()

keys()

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

npoints#
temp_range#
fields#
decimals#
max_diff#
min_sweep_len#
d_order#
lmbds#
lmbd_guess#
weight_err#
match_err#
min_kwargs#
add_zeros#
class magentropy.typedefs.SetterPresets#

Same as Presets, except all are optional.

For presets setter typing.

Methods

clear()

copy()

fromkeys(iterable[, value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

items()

keys()

pop(key[, default])

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem(/)

Remove and return a (key, value) pair as a 2-tuple.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update([E, ]**F)

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values()

npoints#
temp_range#
fields#
decimals#
max_diff#
min_sweep_len#
d_order#
lmbds#
lmbd_guess#
weight_err#
match_err#
min_kwargs#
add_zeros#