EMAN Reference: util Class


addHTMLSectionvoid addHTMLSection(string sourcefile, FILE out, string secid)
agaussfloat agauss(float a, float dx, float dy, float dz, float d)
appinitvoid appinit(list argv)
All applications should call this before parsing the command line
appusagevoid appusage(string argv0)
bestfftsizeint bestfftsize(int low)
returns a good fft size >= than low
bilinfloat bilin(float p1, float p2, float p3, float p4, float t, float u)
cycint cyc(int i, int n)
errorvoid error(string msg, int pri)
file_lockint file_lock(FILE file)
file_lock_waitint file_lock_wait(FILE file)
file_unlockvoid file_unlock(FILE file)
floor2int floor2(float x)
frandfloat frand(float min, float max)
FSsendint FSsend(int command, int datalen, string filename, string data,int fileno=0)
grandfloat grand(float mean, float sigma)
hypot2float hypot2(float x, float y)
hypot3float hypot3(float x,float y,float z)
interpolatefloat interpolate(float xl, int n, list x_list, list y_list)
isvalidfftint isvalidfft(int low)
LOGbeginint LOGbegin(list argv, int ppid=0)
LOGerrorvoid LOGerror(int ref, int err, string text)
LOGvoid LOG(int ref, string filename, int mode, string text)
lsqfitlsqfit(int n, list dx, list dy, Float m, Float b, int ign0 = 1)
least squares fit returns slope, m, and intercept, b
maxffloat maxf(float f1, float f2)
minffloat minf(float f1,float f2,float f3=1.0e30)
npfaint npfa(int low)
p5peakfloat p5peak(float v1, float v2, float v3, float v4,float v5)
this will interpolate a peak location. v3 is considered to be at x=0. The other points are nearest neighbors returns 0 if not well defined
resolvunsigned long resolv(string host = NULL)
roteulertbvoid py_roteulertb(Float alt, Float az, Float phi, float dx, float dy)
runint run(string program);
save_datavoid py_save_data(list x_list, list y_list, int n, string filename);
sock_openint sock_open(unsigned long addr, unsigned short port)
SQRfloat SQR(float x)
tmpnam2string tmpnam2()
writesockint writesock(int sock, string data, int len)