Need help or advice ? Come to the Icy club ! - Every other Thursday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur

User reviews

This plugin is not rated yet

Please log-in to post a review

EvaFE In Python

by Wei Ouyang

Define feature extraction function in Jython or CPython (through Exenet)

Publication Id
See technical details
View complete changelog


Feature Extraction Function in python

Update: Support CPython

By using "Jython execnet for Icy", we now can write CPython code to do feature extraction. To using this feature,

you should install python and numpy.


To define a usable feature extraction function, you need to define a function named "process".
It should be defined like this:

def process(input, position):

output = input
# do something here with output

return output


FFT Example

from org.python.modules import jarray
from edu.emory.mathcs.jtransforms.fft import DoubleFFT_1D
from java.lang import Math
import copy

def process(input, position):
    size = len(input)
    output = copy.deepcopy(input)
    fft = DoubleFFT_1D(size)
    for j in range(size/2):
        output[j]= Math.sqrt(Math.pow(output[2*j],2)+Math.pow(output[2*j+1],2));
    return output[:len(input)/2]


Template Library

In order to show the scripts in the library, you need to name the file with the pattern "" or "",
replace XXXXXX with your own name.

if your code is Jython code, you should use "" a naming rule, otherwise, you should use "".