calib_save_analysis() now uses string_errors() to format output.
authorW. Trevor King <wking@drexel.edu>
Sat, 3 Jan 2009 15:29:46 +0000 (10:29 -0500)
committerW. Trevor King <wking@drexel.edu>
Sat, 3 Jan 2009 15:29:46 +0000 (10:29 -0500)
calibcant/analyze.py

index a46eddb6a202a2c276346a7a0db77070677305cd..d41dced7170c7b413f928a5ba110001f34660a27 100755 (executable)
@@ -163,14 +163,10 @@ def calib_save_analysis(k, k_s,
     if log_dir != None :
         log = data_logger.data_log(log_dir, noclobber_logsubdir=False,
                                    log_name="calib_analysis_text")
-        log.write_binary((
-            "k (N/m) : %g +/- %g\n" % (k, k_s)
-            + "photoSensitivity**2 (V/nm)**2 : %g +/- %g\n" % \
-                (photoSensitivity2_m, photoSensitivity2_s)
-            + "T (K) : %g +/- %g\n" % (T_m, T_s)
-            + "1/Vp**2 (1/V)**2 : %g +/- %g\n" % \
-                (one_o_Vphoto2_m, one_o_Vphoto2_s)
-                         ))
+        log.write_binary(string_errors(k, k_s,
+                                       photoSensitivity2_m, photoSensitivity2_s,
+                                       T_m, T_s,
+                                       one_o_Vphoto2_m, one_o_Vphoto_2_s))
 
 @splittableKwargsFunction()
 def calib_plot(bumps, Ts, vibs, plotVerbose=False) :