Porting of magnetron simulation from matlab to java, with enhancements.