diff Meerwald/pollen_stuff.c @ 3:acb6967ee76d

update to 0.5
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Tue, 14 Aug 2007 21:11:21 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Meerwald/pollen_stuff.c	Tue Aug 14 21:11:21 2007 +0200
@@ -0,0 +1,27 @@
+#ifdef POLLEN_STUFF
+  {
+    double alpha, beta;
+    char *alpha_str = getenv("POLLEN_ALPHA"), *beta_str = getenv("POLLEN_BETA");
+    
+    if (alpha_str && beta_str) {
+      alpha = atof(alpha_str);  
+      beta = atof(beta_str);
+     
+      if (alpha < -M_PI || alpha >= M_PI) {
+        fprintf(stderr, "%s: pollen - alpha %f out of range\n", progname, alpha);
+        exit(1);
+      }
+      
+      if (beta < -M_PI || beta >= M_PI) {
+        fprintf(stderr, "%s: pollen - beta %f out of range\n", progname, beta);
+        exit(1);
+      }
+      
+      if (verbose > 7)
+        fprintf(stderr, "%s: pollen - alpha %f, beta %f\n", progname, alpha, beta);
+      
+      dwt_pollen_filter(alpha, beta);
+    }
+  }
+#endif
+

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.