Ray tracing electron cyclotron emission (ECE) calculations have been performed for the flexible heliac TJ-II. A new ray tracing code, called TRECE, has been developed, which is able to compute the ECE and the electron cyclotron absorption (EGA) for any device. This code makes use of a promising new tool that represents the magnetic flux by means of a neural network. From geometrical considerations two positions were selected for an ECE diagnostic that were not very sensitive to changes in the plasma configuration of TJ-II and minimizing the Faraday rotation. The simulated ECE, obtained with TRECE for these positions, reproduces the electron temperature profile regardless of the plasma configuration. Special attention has been paid to locating the electrons responsible for the emission process in both real and momentum space, and the effect of the antenna pattern and the rotation of the magnetic field on the emission
Experimental and numerical investigation of suprathermal electron dynamics using vertical electron cyclotron emission