ZFC, FC, ZFCFC
ZFCFC
A single ZFCFC experiment at a given field. Unlikely to be called directly,
instead use ZFC
or FC
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dat_file |
str, Path, or DatFile
|
The .dat file containing the data for the experiment. |
required |
experiment |
Literal['zfc', 'fc']
|
The type of experiment. Either "zfc" or "fc". |
"zfc"
|
field |
int or float
|
The magnetic field of the experiment in Oe. Requied if the .dat file contains
multiple uncommented experiments at different fields. If |
None
|
parse_raw |
bool
|
If |
False
|
**kwargs |
dict
|
Keyword arguments used for algorithmic separation of data at the requested field. - n_digits : int, optional - suppress_warnings : bool, optional |
{}
|
Attributes:
Name | Type | Description |
---|---|---|
origin_file |
str
|
The name of the .dat file from which the data was parsed. |
field |
float
|
The field of the experiment in Oe. |
data |
pandas.DataFrame
|
The data from the experiment. Columns are taken directly from the .dat file. |
scaling |
list of str
|
The scaling applied to the data. If no scaling has been applied, this will be
an empty list. Possible values are: |
temperature_range |
tuple of float
|
The minimum and maximum temperature values in the data. |
Raises:
Type | Description |
---|---|
NonMatchingFieldError
|
Raised if the requested field is not in the data. |
Source code in magnetopy\experiments\zfcfc.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
|
scale_moment(mass=0, eicosane_mass=0, molecular_weight=0, diamagnetic_correction=0)
Adds the following columns to the DataFrame
in the data
attribute:
"moment"
, "moment_err"
, "chi"
, "chi_err"
, "chi_t"
, and
"chi_t_err"
. A record of what scaling was applied is added to the
scaling
attribute.
See magnetopy.experiments.utils.scale_dc_data
for more information.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mass |
float
|
mg of sample, by default 0. |
0
|
eicosane_mass |
float
|
mg of eicosane, by default 0. |
0
|
molecular_weight |
float
|
Molecular weight of the material in g/mol, by default 0. |
0
|
diamagnetic_correction |
float
|
Diamagnetic correction of the material in cm^3/mol, by default 0. |
0
|
Source code in magnetopy\experiments\zfcfc.py
simplified_data()
Returns a simplified version of the data, removing unnecessary columns and renaming the remaining columns to more convenient names.
Returns:
Type | Description |
---|---|
pd.DataFrame
|
The simplified data. Contains the columns:
- Where units are not specified, they are determined by the scaling applied to the
data (see |
Source code in magnetopy\experiments\zfcfc.py
plot_raw(scan='up', center='free', colors=('blue', 'red'), label=True, title='')
Plots the raw voltage data from the experiment. Ensures that the data is ordered from low to high temperature so that the default color gradient (blue to red) is appropriate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scan |
Literal['up', 'up_raw', 'down', 'down_raw', 'procssed']
|
Which data to plot. |
'up'
|
center |
Literal['free', 'fixed']
|
Only used if |
'free'
|
colors |
tuple[str, str]
|
The (start, end) colors for the color gradient. |
('blue', 'red')
|
label |
bool
|
Default |
True
|
title |
str
|
The title of the plot. |
''
|
Returns:
Type | Description |
---|---|
tuple[plt.Figure, plt.Axes]
|
|
Source code in magnetopy\experiments\zfcfc.py
plot_raw_residual(scan='up', center='free', colors=('blue', 'red'), label=True, title='')
Plots the residual of the raw voltage data from the experiment. Ensures that the data is ordered from low to high temperature so that the default color gradient (blue to red) is appropriate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
scan |
Literal['up', 'up_raw', 'down', 'down_raw', 'procssed']
|
Which data to plot. |
'up'
|
center |
Literal['free', 'fixed']
|
Only used if |
'free'
|
colors |
tuple[str, str]
|
The (start, end) colors for the color gradient. |
('blue', 'red')
|
label |
bool
|
Default |
True
|
title |
str
|
The title of the plot. |
''
|
Returns:
Type | Description |
---|---|
tuple[plt.Figure, plt.Axes]
|
|
Source code in magnetopy\experiments\zfcfc.py
as_dict()
Returns a dictionary representation of the MvsH
object.
Returns:
Type | Description |
---|---|
dict[str, Any]
|
Keys are: |
Source code in magnetopy\experiments\zfcfc.py
get_all_zfcfc_in_file(dat_file, experiment, n_digits=0, parse_raw=False)
classmethod
Given a .dat file that contains one or more ZFC or FC experiments, returns a
list of ZFC
or FC
objects, one for each experiment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dat_file |
str | Path | DatFile
|
The .dat file containing the data for the experiment. |
required |
experiment |
str
|
The type of experiment. Either "zfc" or "fc". |
"zfc"
|
n_digits |
int
|
The number of digits after the decimal point to round the field to. Defaults
to |
0
|
parse_raw |
bool
|
If |
False
|
Returns:
Type | Description |
---|---|
list[ZFC] | list[FC]
|
A list of |
Source code in magnetopy\experiments\zfcfc.py
ZFC
Bases: ZFCFC
A single ZFC experiment at a given field.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dat_file |
str, Path, or DatFile
|
The .dat file containing the data for the experiment. |
required |
field |
int or float
|
The magnetic field of the experiment in Oe. Requied if the .dat file contains
multiple uncommented experiments at different fields. If |
None
|
parse_raw |
bool
|
If |
False
|
**kwargs |
dict
|
Keyword arguments used for algorithmic separation of data at the requested field. - n_digits : int, optional - suppress_warnings : bool, optional |
{}
|
Attributes:
Name | Type | Description |
---|---|---|
origin_file |
str
|
The name of the .dat file from which the data was parsed. |
field |
float
|
The field of the experiment in Oe. |
data |
pandas.DataFrame
|
The data from the experiment. Columns are taken directly from the .dat file. |
scaling |
list of str
|
The scaling applied to the data. If no scaling has been applied, this will be
an empty list. Possible values are: |
temperature_range |
tuple of float
|
The minimum and maximum temperature values in the data. |
Raises:
Type | Description |
---|---|
NonMatchingFieldError
|
Raised if the requested field is not in the data. |
Source code in magnetopy\experiments\zfcfc.py
FC
Bases: ZFCFC
A single FC experiment at a given field.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dat_file |
str, Path, or DatFile
|
The .dat file containing the data for the experiment. |
required |
field |
int or float
|
The magnetic field of the experiment in Oe. Requied if the .dat file contains
multiple uncommented experiments at different fields. If |
None
|
parse_raw |
bool
|
If |
False
|
**kwargs |
dict
|
Keyword arguments used for algorithmic separation of data at the requested field. - n_digits : int, optional - suppress_warnings : bool, optional |
{}
|
Attributes:
Name | Type | Description |
---|---|---|
origin_file |
str
|
The name of the .dat file from which the data was parsed. |
field |
float
|
The field of the experiment in Oe. |
data |
pandas.DataFrame
|
The data from the experiment. Columns are taken directly from the .dat file. |
scaling |
list of str
|
The scaling applied to the data. If no scaling has been applied, this will be
an empty list. Possible values are: |
temperature_range |
tuple of float
|
The minimum and maximum temperature values in the data. |
Raises:
Type | Description |
---|---|
NonMatchingFieldError
|
Raised if the requested field is not in the data. |
Source code in magnetopy\experiments\zfcfc.py
plot_zfcfc(zfc, fc, y_val='moment', normalized=False, colors='auto', labels='auto', title='', **kwargs)
Plots either a single ZFC
/FC
pair or several on the same axes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zfc |
ZFC | list[ZFC]
|
The ZFC data to plot. Must be the same length as |
required |
fc |
FC | list[FC]
|
The FC data to plot. Must be the same length as |
required |
normalized |
bool
|
If |
False
|
colors |
str | list[str]
|
A list of colors corresponding to the |
'auto'
|
labels |
str | list[str] | None
|
The labels to assign the |
'auto'
|
title |
str
|
The title of the plot, by default "". |
''
|
**kwargs |
Keyword arguments mostly meant to affect the plot style. See
|
{}
|
Returns:
Type | Description |
---|---|
tuple[plt.Figure, plt.Axes]
|
|
Source code in magnetopy\experiments\zfcfc.py
662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 |
|
plot_single_zfcfc(zfc, fc, y_val='moment', normalized=False, color='black', label='auto', title='', **kwargs)
Plots a single ZFC
/FC
pair.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zfc |
ZFC
|
The ZFC data to plot. |
required |
fc |
FC
|
The FC data to plot. |
required |
normalized |
bool
|
If |
False
|
color |
str | list[str]
|
A list of colors corresponding to the |
'black'
|
label |
str | list[str] | None
|
The labels to assign the |
'auto'
|
title |
str
|
The title of the plot, by default "". |
''
|
**kwargs |
Keyword arguments mostly meant to affect the plot style. See
|
{}
|
Returns:
Type | Description |
---|---|
tuple[plt.Figure, plt.Axes]
|
|
Source code in magnetopy\experiments\zfcfc.py
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 |
|
plot_multiple_zfcfc(zfc, fc, y_val='moment', normalized=False, colors='auto', labels=None, title='', **kwargs)
Plots several ZFC
/FC
pairs on the same axes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
zfc |
list[ZFC]
|
The ZFC data to plot. Must be the same length as |
required |
fc |
list[FC]
|
The FC data to plot. Must be the same length as |
required |
normalized |
bool
|
If |
False
|
colors |
str | list[str]
|
A list of colors corresponding to the |
'auto'
|
labels |
str | list[str] | None
|
The labels to assign the |
None
|
title |
str
|
The title of the plot, by default "". |
''
|
**kwargs |
Keyword arguments mostly meant to affect the plot style. See
|
{}
|
Returns:
Type | Description |
---|---|
tuple[plt.Figure, plt.Axes]
|
|
Source code in magnetopy\experiments\zfcfc.py
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
|