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 aDataFrame
’s columns, it is best to first save theDataFrame
as a local variable to avoid repeatedly copying large amounts of data.Attributes
A copy of the converted data (SI units).
A copy of the converted data (SI units) with a second header level indicating units.
The most recently used
process_data()
presets, orNone
ifprocess_data()
has not been run.The current
process_data()
presets.A copy of the processed data.
A copy of the processed data with a second header level indicating units.
A copy of the raw data.
A copy of the raw data with a second header level indicating units.
The magnitude of the sample mass.
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.
Alias for attribute
presets
.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
forprocess_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_df
str
, pathobject
, file-likeobject
, orDataFrame
An input file or
DataFrame
. ADataFrame
should have the specified columns (parameters comment_col through M_err). Files will be read bypandas.read_csv()
with additional arguments given in **read_csv_kwargs, and the resultantDataFrame
should have the specified columns.- qd_datbool, default
True
If
True
and file_or_df is not aDataFrame
, 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 bypandas.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 toNone
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_mass
float
, 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_level
int
orstr
, 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_units
dict
, 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.
- presets
dict
, optional Keyword arguments to pass to
set_presets()
. Seeset_presets()
andprocess_data()
for more info.- **read_csv_kwargs
Passed to
pandas.read_csv()
for reading delimited data.
- file_or_df
- 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 afloat
(magnitude) and astr
(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_mass
str
, 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.
- T, H, M, sample_mass
- property presets#
The current
process_data()
presets.Can be set with a
dict
.
- set_presets(**kwargs)#
Set
presets
forprocess_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, orNone
ifprocess_data()
has not been run.
- to_string(**kwargs)#
Render as console-friendly output.
- Parameters:
- **kwargs
Any
Passed to
DataFrame.to_string()
for renderingraw_df_with_units
,converted_df_with_units
, andprocessed_df_with_units
. Excludesbuf
parameter.
- **kwargs
- Returns:
str
Console-friendly output.
- to_html(**kwargs)#
Render as an HTML table.
- Parameters:
- **kwargs
Any
Passed to
DataFrame.to_html()
for renderingraw_df_with_units
,converted_df_with_units
, andprocessed_df_with_units
. Excludesbuf
parameter.
- **kwargs
- 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_m
float
, default 1e-6 Standard deviation of random normally-distributed errors added to the temperatures, fields, and moments, respectively.
- random_seed
None
,int
, array_like[ints
],SeedSequence
,BitGenerator
, orGenerator
Passed to
numpy.random.default_rng()
.- m_max
float
, default 0.01 The limit as temperature goes to -inf of the moment for the highest field strength.
- slope
float
, default 1.5 Controls the steepness of the moment curves. Higher slope results in a faster decrease with temperature.
- bump_height
float
, default 0.1 Amplitude of the Gaussian bump as a proportion of m_max.
- Returns:
- df
DataFrame
Simulated data for temperature, field, moment, and moment error.
- df
- 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 inpresets
.- Returns:
- grouping_presets
dict
The field grouping parameters fields, decimals, and max_diff after being checked and any defaults are used.
- grouped_by
DataFrameGroupBy
Object on which one may test the results of the grouping.
- grouping_presets
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 aDataFrame
of the group counts. Groups with less than min_sweep_len observations are ignored inprocess_data()
.
- classmethod test_grouping_(raw_df, fields=None, decimals=None, max_diff=None)#
Class method corresponding to
test_grouping()
.See
test_grouping()
andprocess_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.
- 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 inpresets
. All parameters should be given in raw data units if applicable (temp_range, max_diff, etc.).- Parameters:
- npoints
int
, 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.
- decimals
int
, 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 isnumpy.inf
, groups will be determined solely by rounding to this decimal place.- max_diff
float
, 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_len
int
, 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_order
int
, 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 ornumpy.nan
) will be applied to the corresponding field, in order of increasing field strength.- lmbd_guess
float
, 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 isTrue
, 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_kwargs
dict
, optional Keyword arguments to pass to
scipy.optimize.minimize()
when determining optimal \(\lambda\). The parametersfun
,x0
, andargs
will be ignored if included. Note that \(\log_{10}\lambda\) is passed toscipy.optimize.minimize()
, so arguments such asbounds
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.
- npoints
- 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_bootstrap
int
, default 100 The number of times to sample from the data and fit a model.
- random_seed
None
,int
, array_like[ints
],SeedSequence
,BitGenerator
, orGenerator
Passed to
numpy.random.default_rng()
.
- n_bootstrap
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_df
DataFrame
Processed data. Expected to have column names matching those of the
processed_df
attribute of an instance ofMagentroData
.- compare_df
DataFrame
, optional Converted data. Expected to have column names matching those of the
converted_df
attrubute of an instance ofMagentroData
. Expected to use the same units as processed_df.
- 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.- ax
Axes
, optional Axes
on which to plot. IfNone
, newAxes
will be created from the currentFigure
.- T_range, H_range(2,) array_like
Temperature and magnetic field strength ranges to display.
- offset
float
, 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.
- colormap
Colormap
orstr
, optional Color map to cycle through when plotting lines.
- legendbool, default
False
If
True
, add a legend to theAxes
withAxes.legend()
.- colorbarbool, default
False
If
True
, add a discrete color bar to theFigure
containing ax withFigure.colorbar()
.- plot_kwargs
dict
or array_like ofdicts
, optional Keyword arguments for
Axes.plot()
. A singledict
will be applied to each line. Multipledict
s will be applied to successive lines. Not checked for length; adict
is applied to each line until either the end is reached or there are no more lines to plot.- compare_kwargs
dict
or array_like ofdicts
, optional plot_kwargs for converted data, used if data_version is
'compare'
.- colorbar_kwargs
dict
, optional Keyword arguments for
Figure.colorbar()
, excludingmappable
.
- Returns:
- 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_df
DataFrame
Processed data. Expected to have column names matching those of the processed_df attribute of an instance of
MagentroData
.
- processed_df
- 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, grid
ndarray
Grids corresponding to temperature, field, and property, respectively.
- T_grid, H_grid, grid
- 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.)- ax
Axes
, optional Axes
on which to plot. IfNone
, newAxes
will be created from the currentFigure
.- T_range, H_range(2,) array_like
Temperature and magnetic field strength ranges to display.
- T_npoints, H_npoints
int
, 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()
’smethod
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 toFalse
when data_prop is'M_per_mass'
or'M_per_mass_err'
andTrue
otherwise.- contourbool, default
False
If
True
, add contours to the plot withAxes.contour()
.- colorbarbool, default
True
If
True
, add a continuous color bar to theFigure
containing ax withFigure.colorbar()
.- imshow_kwargs
dict
, optional Keyword arguments for
Axes.imshow()
.- contour_kwargs
dict
, optional Keyword arguments for
Axes.contour()
.- colorbar_kwargs
dict
, optional Keyword arguments for
Figure.colorbar()
, excludingmappable
.
- Returns:
- classmethod plot_processed(plot_type, **kwargs)#
Plot processed property as lines or as a map.
See
plot_processed_lines()
orplot_processed_map()
for parameters and return values.- Parameters:
- plot_type{‘lines’, ‘map’}
Plot lines or map.
- **kwargs
dict
, optional Passed to
plot_processed_lines()
orplot_processed_map()
, depending on plot_type.
- plot(plot_type, **kwargs)#
Plot property as lines or as a map.
See
plot_lines()
orplot_map()
for parameters and return values.- Parameters:
- plot_type{‘lines’, ‘map’}
Plot lines or map.
- **kwargs
dict
, optional Passed to
plot_lines()
orplot_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 ownFigure
. AllFigure
s 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!
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 inprocess_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#