Note
Functions for analyzing current voltage data.
Module author: Adam Gagorik <adam.gagorik@gmail.com>
A class to analyze IV curves.
Attr | Description |
---|---|
i | current |
v | voltage |
p | power |
a | area |
j | current density |
r | irradiance |
See also
Construct IV curve.
Parameters: |
|
---|
>>> v = np.linspace(0, 100, 10)
>>> i = np.tanh(v)
>>> a = 1024 * 256
>>> ivcurve = lm.ivcurve.IVCurve(i, v, a)
Construct IV curve from pandas DataFrame.
Parameters: | frame (pandas.DataFrame) – dataframe object |
---|
>>> frame = lm.common.load_pkl('calculated.pkl.gz')
>>> ivcurve = lm.ivcurve.IVCurve(frame)
See also
Construct IV curve from pandas Panel.
Parameters: | panel (pandas.Panel) – panel object |
---|
>>> pkls = lm.find.pkls('.', stub='gathered*', r=True)
>>> panel = lm.analyze.create_panel(lm.common.load_pkls(pkls))
>>> ivcurve = lm.ivcurve.IVCurve.from_panel(panel)
See also
Construct IV curve from pkl file.
Parameters: | pkl (str) – name of file |
---|
>>> ivcurve = lm.ivcurve.IVCurve.load_pkl('gathered.pkl.gz')
Construct IV curve from a list of pkl files.
Parameters: | pkls (list) – list of filenames. |
---|
>>> pkls = lm.find.pkls('.', stub='gathered*', r=True)
>>> ivcurve = lm.ivcurve.IVCurve.load_pkls(pkls)
Convert data into a pandas.DataFrame
Convert data into a pandas.Series
A class to analyze IV curves for solar cells. Calculates the fill factor.
Attr | Description |
---|---|
v_oc | open circuit voltage |
v_mp | voltage at max power |
i_sc | short circuit current |
i_mp | current at max power |
p_th | theoretical power |
p_mp | max power |
fill | fill factor |
Construct IV curve. See arguments for IVCurve.
Parameters: | v_shift (float) – amount to shift voltage axis by |
---|
>>> v = np.linspace(0, 100, 10)
>>> i = np.tanh(v)
>>> a = 1024 * 256
>>> ivcurve = lm.ivcurve.IVCurveSolar(i, v, a)
Calculate fill factor. kwargs are passed to fitting functions.
Parameters: |
---|
Mode | Option |
---|---|
power | order=8 |
tanh | |
erf | |
interp1d | kind=’cubic’ |
spline | k=5 |
>>> ivcurve = lm.ivcurve.IVCurve.load_pkl('gathered.pkl.gz')
>>> ivcurve.calculate(mode='interp1d', kind='linear')
>>> print ivcurve.fill