cy not defined running ## FRET-2CDE Results example
khoroshyy opened this issue · 1 comments
While running the second notebook, I am getting this error while running ## FRET-2CDE Results.
{
"name": "NameError",
"message": "name 'cy' is not defined",
"stack": "---------------------------------------------------------------------------
NameError Traceback (most recent call last)
c:\Users\Petro\OneDrive - uochb.cas.cz\Documents\UOCHB\HPCG\services\rezacova\terezie_veverka_smfret\soft2install\FRETBursts_notebooks
otebooks\Example - 2CDE Method.ipynb Cell 22 line 1
----> 1 fret_2cde = calc_fret_2cde(tau, ph, mask_d, mask_a, bursts)
c:\Users\Petro\OneDrive - uochb.cas.cz\Documents\UOCHB\HPCG\services\rezacova\terezie_veverka_smfret\soft2install\FRETBursts_notebooks
otebooks\Example - 2CDE Method.ipynb Cell 22 line 3
2 """
3 Compute FRET-2CDE for each burst.
4
(...)
23 containing to few photons to compute FRET-2CDE.
24 """
25 # Computing KDE burst-by-burst would cause inaccuracies at the burst edges.
26 # Therefore, we first compute KDE on the full timestamps array and then
27 # we take slices for each burst.
28 # These KDEs are evaluated on all-photons array ph
(hence the Ti suffix)
29 # using D or A photons during D-excitation (argument ph[mask_d] or ph[mask_a]).
---> 30 KDE_DTi = phrates.kde_laplace(ph[mask_d], tau, time_axis=ph)
31 KDE_ATi = phrates.kde_laplace(ph[mask_a], tau, time_axis=ph)
33 FRET_2CDE = []
File c:\Users\Petro\anaconda3\envs\pysmFRET_310\lib\site-packages\fretbursts\phtools\phrates.py:145, in kde_laplace(timestamps, tau, time_axis)
123 def kde_laplace(timestamps, tau, time_axis=None):
124 """Computes exponential KDE for timestamps
evaluated at time_axis
.
125
126 Computes KDE rates of timestamps
using a laplace distribution kernel
(...)
143 array by 2*tau
(or other conventional x*tau duration).
144 """
--> 145 return cy.kde_laplace_cy(timestamps, tau, time_axis)
NameError: name 'cy' is not defined"
}
Fixed by installing cython and reinstalling fretbursts....