示例#1
0
def input_temp_dhm():
    sampledir = join(dirname(realpath(__file__)), 'testData', r"hfo2_MFM",
                     "H9_x9y4_1e4_S3_temps")
    file = r'H9 die (9,4) S3 31C 100Hz 3V 1Average Table2.tsv'
    data = hd.HysteresisData()
    data.tsv_read(join(sampledir, file))
    return data
示例#2
0
def file_input():
    testdatadir = join(dirname(dirname(realpath(__file__))), "tests",
                       "testData")
    filedir = join(testdatadir, "Typical_AB_Data_RT")
    file = join(filedir, "TypABdata.Hysteresis.2.txt")
    data = hd.HysteresisData()
    data.read_RTHyst(file)
    return data
示例#3
0
pp = pprint.PrettyPrinter(indent=2, width=120, depth=4, compact=True)

# %% [markdown] pycharm={"name": "#%% md\n"}
# ## TSV import
#
# TSV import is the simplest method of loading data into ferro, requiring only a table with time,
# voltage, and current data. When using this method, the data loading function will search for the frequency and
# temperature in the filename in the format `r'\d+Hz'` and `r'\d+C'` or `r'\d+K'`- one or more digits followed by a unit.
# If no temperature is specified, a default value of 300K (27C / 80F) is assigned.
#
# For example, the file **H9 die (9,4) 500Hz 4V 1Average Table17.tsv** when imported would automatically be assigned a
# frequency of 500 Hz and a temperature of 300K:

# %% pycharm={"name": "#%%\n"}
data = hd.HysteresisData()
data.tsv_read(join(freqdir, 'H9 die (9,4) 500Hz 4V 1Average Table17.tsv'))
print(data.freq)
print(data.temp)

# %% [markdown] pycharm={"name": "#%% md\n"}
# To see a quick overview of the measurement without inspecting each property, it is also possible to print the object
# directly:

# %% pycharm={"name": "#%%\n"}
print(data)

# %% [markdown]
# To import a number of individual tsv measurement tables at once, ferro also provides dir_read and list_read functions
# for hysteresisData. `dir_read()` will return a list of files in a directory, which can be passed to `list_read()`, which
# will return a list of hysteresisData objects. If a list of both DHM and IV data is passed, `list_read()` will attempt
示例#4
0
hfo2.rho_calc(freqData)

# %% pycharm={"name": "#%%\n"}
hfo2.a0 = hfo2.a0_calc(tempData)

# %% pycharm={"name": "#%%\n"}
freqDataLkgComp = hd.list_read(freqfiles, templkgfiles)
cCompDataLkgComp = freqDataLkgComp[0]
hd.hyst_plot([cCompData, cCompDataLkgComp],
             ["With Leakage", "Without Leakage"],
             plot_e=1)

# %% pycharm={"name": "#%%\n"}
### FORC Calculation

hfo2_forc = hd.HysteresisData(area=6579E-8, thickness=13E-7)
hfo2_forc.tsv_read(forcFile)
hfo2_forc.hyst_plot(plot_e=1)
e, er, probs = hfo2_forc.forc_calc(plot=False)

domains = hfo2.domain_gen(e, er, probs, n=100, plot=False)

esweep = np.linspace(-4.5E6, 4.5E6, num=1000)
esweep = np.append(esweep, esweep[::-1])
hfo2.calc_efe_preisach(esweep, domains, plot=1)

# %% pycharm={"name": "#%%\n"}
# Following code plots a series of diff freq hystdata files on same plot

hystData = []
legend = []