Changeset 17174
- Timestamp:
- 09/19/13 16:15:12 (11 years ago)
- Location:
- trunk/FACT++
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/Makefile.am
r17061 r17174 47 47 showlog \ 48 48 fitsdump fitscheck \ 49 zfits \ 50 fitsCompressor 49 zfits 51 50 52 51 if HAS_GUI … … 453 452 454 453 fitsdump_SOURCES = src/fitsdump.cc 455 fitsdump_LDADD = $(ROOTLDFLAGS) $(ROOTLIBS) libConfiguration.la libTime.la 454 fitsdump_LDADD = $(ROOTLDFLAGS) $(ROOTLIBS) libConfiguration.la libTime.la libTools.la 456 455 457 456 fitscheck_SOURCES = src/fitscheck.cc -
trunk/FACT++/Makefile.in
r16957 r17174 53 53 temperature$(EXEEXT) timecheck$(EXEEXT) showlog$(EXEEXT) \ 54 54 fitsdump$(EXEEXT) fitscheck$(EXEEXT) zfits$(EXEEXT) \ 55 fitsCompressor$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \56 $(am__EXEEXT_ 3) $(am__EXEEXT_4) $(am__EXEEXT_5) \57 $(am__EXEEXT_ 6) $(am__EXEEXT_7) $(am__EXEEXT_8)55 $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ 56 $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \ 57 $(am__EXEEXT_7) $(am__EXEEXT_8) 58 58 @HAS_GUI_TRUE@am__append_1 = fact 59 59 @HAS_DBUS_TRUE@am__append_2 = skypeclient … … 320 320 feedback_DEPENDENCIES = libDim++.la libDim.la libDimExtension.la \ 321 321 libStateMachine.la libTools.la libTime.la libConfiguration.la 322 am_fitsCompressor_OBJECTS = src/fitsCompressor.$(OBJEXT)323 fitsCompressor_OBJECTS = $(am_fitsCompressor_OBJECTS)324 fitsCompressor_DEPENDENCIES = libConfiguration.la325 322 am_fitscheck_OBJECTS = src/fitscheck.$(OBJEXT) 326 323 fitscheck_OBJECTS = $(am_fitscheck_OBJECTS) … … 329 326 fitsdump_OBJECTS = $(am_fitsdump_OBJECTS) 330 327 fitsdump_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ 331 libConfiguration.la libTime.la 328 libConfiguration.la libTime.la libTools.la 332 329 fitsgrep_SOURCES = fitsgrep.c 333 330 fitsgrep_OBJECTS = fitsgrep.$(OBJEXT) … … 537 534 $(dns_SOURCES) $(drivectrl_SOURCES) $(dserver2_SOURCES) \ 538 535 $(fact_SOURCES) $(fad_SOURCES) $(fadctrl_SOURCES) \ 539 $(feedback_SOURCES) $(fits Compressor_SOURCES) \540 $(fitscheck_SOURCES) $(fitsdump_SOURCES) fitsgrep.c\541 $(f itsloader_SOURCES) $(fsc_SOURCES) $(fscctrl_SOURCES) \542 $( ftm_SOURCES) $(ftmctrl_SOURCES) $(gcn_SOURCES) \543 $(l idctrl_SOURCES) $(log_SOURCES) $(logtime_SOURCES) \544 $(magic lidar_SOURCES) $(magicweather_SOURCES) \545 $(make data_SOURCES) $(makeplots_SOURCES) $(mcp_SOURCES) \546 $( moon_SOURCES) $(pwrctrl_SOURCES) $(ratecontrol_SOURCES) \547 $(r atescan_SOURCES) $(readfits_SOURCES) sched.c\548 $(s cheduler_SOURCES) $(showlog_SOURCES) $(skypeclient_SOURCES) \549 $( smartfact_SOURCES) $(temperature_SOURCES) $(test_SOURCES) \550 $(time _SOURCES) $(timecheck_SOURCES) $(tngweather_SOURCES) \536 $(feedback_SOURCES) $(fitscheck_SOURCES) $(fitsdump_SOURCES) \ 537 fitsgrep.c $(fitsloader_SOURCES) $(fsc_SOURCES) \ 538 $(fscctrl_SOURCES) $(ftm_SOURCES) $(ftmctrl_SOURCES) \ 539 $(gcn_SOURCES) $(lidctrl_SOURCES) $(log_SOURCES) \ 540 $(logtime_SOURCES) $(magiclidar_SOURCES) \ 541 $(magicweather_SOURCES) $(makedata_SOURCES) \ 542 $(makeplots_SOURCES) $(mcp_SOURCES) $(moon_SOURCES) \ 543 $(pwrctrl_SOURCES) $(ratecontrol_SOURCES) $(ratescan_SOURCES) \ 544 $(readfits_SOURCES) sched.c $(scheduler_SOURCES) \ 545 $(showlog_SOURCES) $(skypeclient_SOURCES) $(smartfact_SOURCES) \ 546 $(temperature_SOURCES) $(test_SOURCES) $(time_SOURCES) \ 547 $(timecheck_SOURCES) $(tngweather_SOURCES) \ 551 548 $(triggerschedule_SOURCES) $(viewer_SOURCES) $(webDid_SOURCES) \ 552 549 $(zfits_SOURCES) … … 561 558 $(dserver2_SOURCES) $(am__fact_SOURCES_DIST) $(fad_SOURCES) \ 562 559 $(am__fadctrl_SOURCES_DIST) $(feedback_SOURCES) \ 563 $(fitsCompressor_SOURCES) $(fitscheck_SOURCES) \ 564 $(fitsdump_SOURCES) fitsgrep.c $(fitsloader_SOURCES) \ 565 $(fsc_SOURCES) $(fscctrl_SOURCES) $(ftm_SOURCES) \ 566 $(ftmctrl_SOURCES) $(gcn_SOURCES) $(lidctrl_SOURCES) \ 567 $(log_SOURCES) $(logtime_SOURCES) $(magiclidar_SOURCES) \ 568 $(magicweather_SOURCES) $(makedata_SOURCES) \ 569 $(makeplots_SOURCES) $(mcp_SOURCES) $(moon_SOURCES) \ 570 $(pwrctrl_SOURCES) $(ratecontrol_SOURCES) $(ratescan_SOURCES) \ 571 $(readfits_SOURCES) sched.c $(scheduler_SOURCES) \ 572 $(showlog_SOURCES) $(skypeclient_SOURCES) $(smartfact_SOURCES) \ 573 $(temperature_SOURCES) $(test_SOURCES) $(time_SOURCES) \ 574 $(timecheck_SOURCES) $(tngweather_SOURCES) \ 560 $(fitscheck_SOURCES) $(fitsdump_SOURCES) fitsgrep.c \ 561 $(fitsloader_SOURCES) $(fsc_SOURCES) $(fscctrl_SOURCES) \ 562 $(ftm_SOURCES) $(ftmctrl_SOURCES) $(gcn_SOURCES) \ 563 $(lidctrl_SOURCES) $(log_SOURCES) $(logtime_SOURCES) \ 564 $(magiclidar_SOURCES) $(magicweather_SOURCES) \ 565 $(makedata_SOURCES) $(makeplots_SOURCES) $(mcp_SOURCES) \ 566 $(moon_SOURCES) $(pwrctrl_SOURCES) $(ratecontrol_SOURCES) \ 567 $(ratescan_SOURCES) $(readfits_SOURCES) sched.c \ 568 $(scheduler_SOURCES) $(showlog_SOURCES) $(skypeclient_SOURCES) \ 569 $(smartfact_SOURCES) $(temperature_SOURCES) $(test_SOURCES) \ 570 $(time_SOURCES) $(timecheck_SOURCES) $(tngweather_SOURCES) \ 575 571 $(triggerschedule_SOURCES) $(am__viewer_SOURCES_DIST) \ 576 572 $(webDid_SOURCES) $(zfits_SOURCES) … … 1141 1137 fitsloader_LDADD = libStateMachine.la libTools.la libTime.la libDim++.la libDim.la libConfiguration.la 1142 1138 fitsdump_SOURCES = src/fitsdump.cc 1143 fitsdump_LDADD = $(ROOTLDFLAGS) $(ROOTLIBS) libConfiguration.la libTime.la 1139 fitsdump_LDADD = $(ROOTLDFLAGS) $(ROOTLIBS) libConfiguration.la libTime.la libTools.la 1144 1140 fitscheck_SOURCES = src/fitscheck.cc 1145 1141 fitscheck_LDADD = libConfiguration.la … … 1597 1593 @rm -f feedback$(EXEEXT) 1598 1594 $(AM_V_CXXLD)$(CXXLINK) $(feedback_OBJECTS) $(feedback_LDADD) $(LIBS) 1599 src/fitsCompressor.$(OBJEXT): src/$(am__dirstamp) \1600 src/$(DEPDIR)/$(am__dirstamp)1601 fitsCompressor$(EXEEXT): $(fitsCompressor_OBJECTS) $(fitsCompressor_DEPENDENCIES) $(EXTRA_fitsCompressor_DEPENDENCIES)1602 @rm -f fitsCompressor$(EXEEXT)1603 $(AM_V_CXXLD)$(CXXLINK) $(fitsCompressor_OBJECTS) $(fitsCompressor_LDADD) $(LIBS)1604 1595 src/fitscheck.$(OBJEXT): src/$(am__dirstamp) \ 1605 1596 src/$(DEPDIR)/$(am__dirstamp) … … 1965 1956 -rm -f src/fadctrl.$(OBJEXT) 1966 1957 -rm -f src/feedback.$(OBJEXT) 1967 -rm -f src/fitsCompressor.$(OBJEXT)1968 1958 -rm -f src/fitscheck.$(OBJEXT) 1969 1959 -rm -f src/fitsdump.$(OBJEXT) … … 2114 2104 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fadctrl.Po@am__quote@ 2115 2105 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/feedback.Po@am__quote@ 2116 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fitsCompressor.Po@am__quote@2117 2106 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fitscheck.Po@am__quote@ 2118 2107 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fitsdump.Po@am__quote@ … … 2953 2942 2954 2943 doc: $(MAN_TARGETS) $(JAVA_SCRIPT_DOC) doxygen-run 2944 @ln -s index.html doxygen-doc/html/main.html 2955 2945 2956 2946 diff: -
trunk/FACT++/aclocal.m4
r15491 r17174 1725 1725 # exception to the GPL to apply to your modified version as well. 1726 1726 1727 #serial 1 61727 #serial 17 1728 1728 1729 1729 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) … … 1899 1899 case "${host_cpu}-${host_os}" in 1900 1900 *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; 1901 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; 1901 *-osf* | *-hpux*) flag="-D_REENTRANT";; 1902 *solaris*) 1903 if test "$GCC" = "yes"; then 1904 flag="-D_REENTRANT" 1905 else 1906 flag="-mt -D_REENTRANT" 1907 fi 1908 ;; 1902 1909 esac 1903 1910 AC_MSG_RESULT(${flag}) -
trunk/FACT++/configure
r16957 r17174 18480 18480 case "${host_cpu}-${host_os}" in 18481 18481 *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; 18482 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; 18482 *-osf* | *-hpux*) flag="-D_REENTRANT";; 18483 *solaris*) 18484 if test "$GCC" = "yes"; then 18485 flag="-D_REENTRANT" 18486 else 18487 flag="-mt -D_REENTRANT" 18488 fi 18489 ;; 18483 18490 esac 18484 18491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 … … 23970 23977 23971 23978 cat > conftest.$ac_ext <<EOF 23972 #line 2397 2"configure"23979 #line 23979 "configure" 23973 23980 #include "confdefs.h" 23974 23981 #include <qglobal.h> -
trunk/FACT++/scripts/Main.js
r17031 r17174 221 221 return; 222 222 223 this.ok = cnt==0; 224 225 console.out(" DeltaUov=%.3f [N(>0.033V)=%d]".$(avg, cnt)); 226 } 227 228 // DN: Why is voltageOff() implemented as 229 // a method of a Subscription to a specific Service 230 // I naively would think of voltageOff() as an unbound function. 231 // I seems to me it has to be a method of a Subscription object, in order 232 // to use the update counting method. But does it have to be 233 // a Subscription to FEEDBACK/DEVIATION, or could it work with other services as well? 223 224 this.ok = cnt==0 || (this.last!=undefined && Math.abs(this.last-avg)<0.002); 225 226 console.out(" DeltaUov=%.3f (%.3f) [N(>0.033V)=%d]".$(avg, Math.abs(this.last-avg), cnt)); 227 228 this.last = avg; 229 } 230 234 231 service_feedback.voltageOff = function() 235 232 { … … 247 244 { 248 245 dim.log("Switching voltage off."); 249 250 this.ok = undefined;251 246 252 247 // Supress the possibility that the bias control is … … 260 255 } 261 256 262 dim.wait("BIAS_CONTROL", "VoltageOff", 60000); 257 dim.wait("BIAS_CONTROL", "VoltageOff", 60000); // FIXME: 30000? 263 258 264 259 // FEEDBACK stays in CurrentCtrl when Voltage is off but output enabled … … 305 300 306 301 // Wait until voltage on 307 dim.wait("BIAS_CONTROL", "VoltageOn", 60000); 308 309 if (isOff)310 this.ok = false;302 dim.wait("BIAS_CONTROL", "VoltageOn", 60000); // FIXME: 30000? 303 304 // if (isOff) 305 // this.ok = false; 311 306 } 312 307 … … 324 319 var now = new Date(); 325 320 326 v8.timeout(60000, func, this); 321 this.last = undefined; 322 this.ok = false; 323 v8.timeout(4*60000, func, this); // FIMXE: Remove 4! 324 this.ok = undefined; 327 325 328 326 if (irq) … … 330 328 else 331 329 dim.log("Voltage stable within limits"); 332 333 this.ok = undefined;334 330 } 335 331 … … 378 374 //dim.send("FEEDBACK/STOP"); 379 375 dim.send("FTM_CONTROL/STOP_TRIGGER"); 376 377 dim.wait("FTM_CONTROL", "Valid", 3000); 378 dim.wait("FEEDBACK", "Calibrated", 3000); 379 380 380 dim.send("BIAS_CONTROL/DISCONNECT"); 381 382 dim.wait("FTM_CONTROL", "Valid", 3000);383 381 dim.wait("BIAS_CONTROL", "Disconnected", 3000); 384 dim.wait("FEEDBACK", "Calibrated", 3000);385 382 386 383 var report = sub.get(); … … 806 803 while (!irq && !takeRun("single-pe", 10000)); 807 804 805 /* 806 // =================== new feedback ====================== 807 dim.log("Switching to new bias calibration and feedback."); 808 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 809 dim.wait("BIAS_CONTROL", "ExpertMode", 3000); 810 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new2.txt"); 811 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 812 dim.wait("BIAS_CONTROL", "VoltageOn", 3000); 813 dim.send("FEEDBACK/STOP"); 814 dim.wait("FEEDBACK", "Calibrated", 3000); 815 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", false); 816 dim.send("FEEDBACK/START", 1.1); 817 dim.wait("FEEDBACK", "InProgress", 45000); 818 service_feedback.voltageOn(); 819 service_feedback.waitForVoltageOn(); 820 821 v8.sleep(60000); 822 dim.log("Taking single p.e. run."); 823 while (!irq && !takeRun("single-pe", 10000)); 824 825 dim.send("FEEDBACK/STOP"); 826 dim.wait("FEEDBACK", "Calibrated", 3000); 827 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", true); 828 dim.send("FEEDBACK/START", 1.1); 829 dim.wait("FEEDBACK", "InProgress", 45000); 830 service_feedback.voltageOn(); 831 service_feedback.waitForVoltageOn(); 832 833 v8.sleep(60000); 834 dim.log("Taking single p.e. run."); 835 while (!irq && !takeRun("single-pe", 10000)); 836 */ 837 // ======================================================= 838 808 839 // It is unclear what comes next, so we better switch off the voltage 809 840 service_feedback.voltageOff(); 841 842 /* 843 // =============== Switch back to old feedback ============= 844 dim.log("Switching to old bias calibration and feedback."); 845 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 846 dim.wait("BIAS_CONTROL", "ExpertMode", 3000); 847 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new.txt"); 848 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 849 dim.wait("BIAS_CONTROL", "VoltageOff", 3000); 850 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", true); 851 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", false); 852 // ========================================================= 853 */ 854 810 855 system_on = true; 811 856 dim.log("Task finished [STARTUP]"); … … 909 954 console.out(""); 910 955 break; // case "RATESCAN" 911 956 /* 957 case "FEEDBACK-TEST": 958 // ----------------- Enable new feedback --------------- 959 service_feedback.voltageOff(); 960 dim.log("Switching to new bias calibration and feedback."); 961 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 962 dim.wait("BIAS_CONTROL", "ExpertMode", 3000); 963 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new2.txt"); 964 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 965 dim.wait("BIAS_CONTROL", "VoltageOff", 3000); 966 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", false); 967 968 // ---------------- Take single pe run ------------------ 969 CloseLid(); 970 doDrsCalibration("singlepe"); // will turn voltage off 971 service_feedback.voltageOn(); 972 service_feedback.waitForVoltageOn(); 973 v8.sleep(15000); 974 dim.log("Taking single p.e. run."); 975 while (!irq && !takeRun("single-pe", 10000)); 976 977 dim.send("FEEDBACK/STOP"); 978 dim.wait("FEEDBACK", "Calibrated", 3000); 979 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", true); 980 dim.send("FEEDBACK/START", 1.1); 981 dim.wait("FEEDBACK", "InProgress", 45000); 982 service_feedback.voltageOn(); 983 service_feedback.waitForVoltageOn(); 984 v8.sleep(15000); 985 dim.log("Taking single p.e. run."); 986 while (!irq && !takeRun("single-pe", 10000)); 987 988 // ------------------ Ratescan -------------------------- 989 var tm1 = new Date(); 990 991 // This is a workaround to make sure that we really catch 992 // the new OnTrack state later and not the old one 993 dim.send("DRIVE_CONTROL/STOP"); 994 dim.wait("DRIVE_CONTROL", "Armed", 15000); 995 996 // The lid must be open 997 OpenLid(); 998 999 // The voltage must be switched on 1000 service_feedback.voltageOn(); 1001 1002 if (obs.source != undefined) 1003 { 1004 dim.log("Pointing telescope to '"+obs[cub].source+"'."); 1005 dim.send("DRIVE_CONTROL/TRACK_ON", obs[sub].source); 1006 } 1007 else 1008 { 1009 dim.log("Pointing telescope to ra="+obs[sub].ra+" dec="+obs[sub].dec); 1010 dim.send("DRIVE_CONTROL/TRACK", obs[sub].ra, obs[sub].dec); 1011 } 1012 1013 dim.wait("DRIVE_CONTROL", "OnTrack", 150000); // 110s for turning and 30s for stabilizing 1014 1015 service_feedback.waitForVoltageOn(); 1016 1017 var tm2 = new Date(); 1018 1019 dim.log("Starting ratescan."); 1020 1021 // Start rate scan 1022 dim.send("RATE_SCAN/START_THRESHOLD_SCAN", 50, 1000, -10); 1023 1024 // Lets wait if the ratescan really starts... this might take a few 1025 // seconds because RATE_SCAN configures the ftm and is waiting for 1026 // it to be configured. 1027 dim.wait("RATE_SCAN", "InProgress", 10000); 1028 dim.wait("RATE_SCAN", "Connected", 2700000); 1029 1030 // this line is actually some kind of hack. 1031 // after the Ratescan, no data is written to disk. I don't know why, but it happens all the time 1032 // So I decided to put this line here as a kind of patchwork.... 1033 //dim.send("FAD_CONTROL/SET_FILE_FORMAT", 2); 1034 1035 dim.log("Ratescan done [%.1fs, %.1fs]".$((tm2-tm1)/1000, (new Date()-tm2)/1000)); 1036 1037 // ------------------ Switch back -------------------------- 1038 1039 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 1040 dim.wait("BIAS_CONTROL", "ExpertMode", 3000); 1041 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new.txt"); 1042 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 1043 dim.wait("BIAS_CONTROL", "VoltageOn", 3000); 1044 dim.send("FEEDBACK/STOP"); 1045 dim.wait("FEEDBACK", "Calibrated", 3000); 1046 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", true); 1047 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", false); 1048 dim.send("FEEDBACK/START", 1.1); 1049 dim.wait("FEEDBACK", "InProgress", 60000); 1050 1051 dim.log("Starting ratescan."); 1052 1053 // Start rate scan 1054 dim.send("RATE_SCAN/START_THRESHOLD_SCAN", 50, 1000, -10); 1055 1056 // Lets wait if the ratescan really starts... this might take a few 1057 // seconds because RATE_SCAN configures the ftm and is waiting for 1058 // it to be configured. 1059 dim.wait("RATE_SCAN", "InProgress", 10000); 1060 dim.wait("RATE_SCAN", "Connected", 2700000); 1061 1062 // this line is actually some kind of hack. 1063 // after the Ratescan, no data is written to disk. I don't know why, but it happens all the time 1064 // So I decided to put this line here as a kind of patchwork.... 1065 //dim.send("FAD_CONTROL/SET_FILE_FORMAT", 2); 1066 1067 dim.log("Ratescan done [%.1fs, %.1fs]".$((tm2-tm1)/1000, (new Date()-tm2)/1000)); 1068 1069 dim.log("Task finished [FEEDBACK-TEST]"); 1070 console.out(""); 1071 break; 1072 1073 case "SINGLEPE-TEST": 1074 // ----------------- Enable new feedback --------------- 1075 service_feedback.voltageOff(); 1076 dim.log("Switching to new bias calibration and feedback."); 1077 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 1078 dim.wait("BIAS_CONTROL", "ExpertMode", 3000); 1079 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new2.txt"); 1080 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 1081 dim.wait("BIAS_CONTROL", "VoltageOff", 3000); 1082 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", false); 1083 1084 // ---------------- Take single pe run ------------------ 1085 CloseLid(); 1086 doDrsCalibration("singlepe"); // will turn voltage off 1087 dim.send("FEEDBACK/STOP"); 1088 dim.wait("FEEDBACK", "Calibrated", 3000); 1089 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", true); 1090 dim.send("FEEDBACK/START", 1.1); 1091 dim.wait("FEEDBACK", "InProgress", 45000); 1092 service_feedback.voltageOn(); 1093 service_feedback.waitForVoltageOn(); 1094 v8.sleep(15000); 1095 dim.log("Taking single p.e. run."); 1096 while (!irq && !takeRun("single-pe", 10000)); 1097 1098 // ------------------ Switch back -------------------------- 1099 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 1100 dim.wait("BIAS_CONTROL", "ExpertMode", 3000); 1101 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new.txt"); 1102 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 1103 dim.wait("BIAS_CONTROL", "VoltageOn", 3000); 1104 dim.send("FEEDBACK/STOP"); 1105 dim.wait("FEEDBACK", "Calibrated", 3000); 1106 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", true); 1107 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", false); 1108 dim.send("FEEDBACK/START", 1.1); 1109 dim.wait("FEEDBACK", "InProgress", 60000); 1110 1111 dim.log("Task finished [SINGLEPE-TEST]"); 1112 console.out(""); 1113 break; 1114 */ 912 1115 913 1116 case "DATA": -
trunk/FACT++/scripts/Observation_class.js
r16074 r17174 58 58 case 'DATA': 59 59 if (i!=obj.measurements.length-1) 60 throw new Error("DATA must be the last in the list of measurements");60 throw new Error("DATA [n="+i+", "+utc.toUTCString()+"] must be the last in the list of measurements [cnt="+obj.measurements.length+"]"); 61 61 if (ret[i].source == undefined) 62 62 throw new Error("Observation must have either 'source' or 'task' " + … … 79 79 "if 'task' == 'ratescan'"); 80 80 break; 81 81 /* 82 case 'FEEDBACK-TEST': 83 if (ret[i].source == undefined && (ret[i].ra == undefined || ret[i].dec == undefined)) 84 throw new Error("Observation must have either 'source' or 'ra' & 'dec' " + 85 "if 'task' == 'ratescan'"); 86 break; 87 */ 88 //case 'SINGLEPE-TEST': 82 89 case 'SINGLEPE': 83 90 case 'DRSCALIB': -
trunk/FACT++/scripts/Startup.js
r17028 r17174 218 218 { 219 219 dim.send("BIAS_CONTROL/SET_ZERO_VOLTAGE"); 220 dim.wait("BIAS_CONTROL", "VoltageOff", 15000);220 dim.wait("BIAS_CONTROL", "VoltageOff", 30000); // waS: 15000 221 221 222 222 var now = new Date(); … … 227 227 228 228 console.out("Wait for calibration to end"); 229 dim.wait("FEEDBACK", "Calibrated", 60000);229 dim.wait("FEEDBACK", "Calibrated", 90000); 230 230 231 231 console.out("Calibration finished ["+(new Date()-now)+"ms]"); 232 232 233 233 console.out("Wait for voltage to be off"); 234 dim.wait("BIAS_CONTROL", "VoltageOff", 5000);234 dim.wait("BIAS_CONTROL", "VoltageOff", 30000); // was: 15000 235 235 } 236 236 … … 261 261 // ================================================================ 262 262 263 dim.send("BIAS_CONTROL/SET_EXPERT_MODE", true); 263 dim.log("Switching to old bias calibration and feedback."); 264 dim.send("BIAS_CONTROL/EXPERT_MODE", true); 264 265 dim.send("BIAS_CONTROL/EXPERT_LOAD_MAP_FILE", "/home/fact/operation/GAPDmap_with_spare_module-new.txt"); 265 dim.send("BIAS_CONTROL/SET_EXPERT_MODE", false); 266 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", false); 266 dim.send("BIAS_CONTROL/EXPERT_MODE", false); 267 dim.send("FEEDBACK/ENABLE_OLD_ALGORITHM", true); 268 dim.send("FEEDBACK/ENABLE_TEMP_OFFSETS", false); 269 v8.sleep(3000); 267 270 268 271 // ================================================================ … … 283 286 [ "PWR_CONTROL", [ "SystemOn" ] ], 284 287 [ "AGILENT_CONTROL", [ "VoltageOn" ] ], 285 [ "BIAS_CONTROL", [ "VoltageO n", "VoltageOff"] ],288 [ "BIAS_CONTROL", [ "VoltageOff" ] ], 286 289 [ "FEEDBACK", [ "Calibrated" ] ], 287 290 [ "RATE_SCAN", [ "Connected" ] ], -
trunk/FACT++/scripts/getSchedule.js
r15292 r17174 3 3 function getSchedule() 4 4 { 5 // List of all available measurement types 6 var measurementType = [ "STARTUP", "IDLE", "DRSCALIB", "SINGLEPE", "DATA", "RATESCAN", "SHUTDOWN" ];5 // List of all available measurement types (see also Observation_class.js) 6 var measurementType = [ "STARTUP", "IDLE", "DRSCALIB", "SINGLEPE", "DATA", "RATESCAN", "SHUTDOWN"/*, "FEEDBACK-TEST", "SINGLEPE-TEST"*/ ]; 7 7 8 8 // Get current time -
trunk/FACT++/src/DimServiceInfoList.cc
r16096 r17174 696 696 #endif 697 697 698 const int rc = DimClient::sendCommand(cmd.c_str(), (void*)v.data(), v.size()); 699 if (!rc) 700 throw runtime_error("ERROR - Sending command "+cmd+" failed."); 698 DimClient::sendCommandNB(cmd.c_str(), (void*)v.data(), v.size()); 699 // const int rc = DimClient::sendCommand(cmd.c_str(), (void*)v.data(), v.size()); 700 // if (!rc) 701 // throw runtime_error("ERROR - Sending command "+cmd+" failed."); 701 702 } 702 703 -
trunk/FACT++/src/InterpreterV8.cc
r16985 r17174 1445 1445 void InterpreterV8::JsHandleEvent(const EventImp &evt, uint64_t cnt, const string &service) 1446 1446 { 1447 // FIXME: This blocks service updates, we have to run this 1448 // in a dedicated thread. 1447 1449 const Locker locker; 1448 1450 … … 1513 1515 void InterpreterV8::JsHandleState(const std::string &server, const State &state) 1514 1516 { 1517 // FIXME: This blocks service updates, we have to run this 1518 // in a dedicated thread. 1515 1519 const Locker locker; 1516 1520 … … 1619 1623 int InterpreterV8::JsHandleInterrupt(const EventImp &evt) 1620 1624 { 1625 // FIXME: This blocks service updates, we have to run this 1626 // in a dedicated thread. 1621 1627 const Locker locker; 1622 1628 … … 2723 2729 rc.emplace_back("new Date("); 2724 2730 rc.emplace_back("'use strict';"); 2725 2731 rc.emplace_back("undefined"); 2732 rc.emplace_back("null"); 2733 rc.emplace_back("delete "); 2726 2734 2727 2735 rc.emplace_back("dim.log("); -
trunk/FACT++/src/biasctrl.cc
r17024 r17174 69 69 vector<int16_t> fCurrent; // Current in ADC units (12bit = 5mA) 70 70 71 virtual void UpdateV(const Time = Time()) 72 { 73 } 74 75 virtual void UpdateVgapd() 76 { 77 } 78 79 public: 71 80 virtual void UpdateVA() 72 81 { 73 82 } 74 83 75 virtual void UpdateV(const Time = Time())76 {77 }78 79 virtual void UpdateVgapd()80 {81 }82 83 84 // ==================================================== 84 85 86 protected: 85 87 vector<float> fBreakdownVoltage; // Breakdown voltage of GAPDs 86 88 //vector<float> fChannelOffset; // User defined channel offset … … 1511 1513 DimDescribedService fDimGapd; 1512 1514 1515 public: 1513 1516 void UpdateVA() 1514 1517 { … … 1521 1524 } 1522 1525 1526 private: 1523 1527 void UpdateV(const Time now=Time()) 1524 1528 { … … 1560 1564 fDimVolt("BIAS_CONTROL/VOLTAGE", "F:416", 1561 1565 "|Uout[V]:Output voltage"), 1562 fDimGapd("BIAS_CONTROL/NOMINAL", "F:416;F:416;F:416 ;F:416",1566 fDimGapd("BIAS_CONTROL/NOMINAL", "F:416;F:416;F:416", 1563 1567 "|Ubr[V]:Nominal breakdown voltage at 25deg C" 1564 1568 "|Uoff[V]:Bias crate channel calibration offsets" … … 1771 1775 return T::GetCurrentState(); 1772 1776 } 1777 1778 fBias.UpdateVA(); 1779 1780 T::Info("Successfully loaded new mapping '"+evt.GetString()+"'"); 1773 1781 1774 1782 return T::GetCurrentState(); -
trunk/FACT++/src/fscctrl.cc
r17170 r17174 551 551 } 552 552 553 UpdateHum( time, humidities);554 553 UpdateTemp(time, temperatures); 555 554 UpdateVolt(time, voltages); 556 555 UpdateCur( time, currents); 556 UpdateHum( time, humidities); 557 557 558 558 StartRead(); … … 697 697 rms /= T.size(); 698 698 rms -= avg*avg; 699 rms = rms<0 ? 0 : sqrt(rms - avg*avg);699 rms = rms<0 ? 0 : sqrt(rms); 700 700 701 701 // Clean broken reports … … 725 725 T = inter.Interpolate(T); 726 726 727 avg = 0; 728 rms = 0; 729 for (int i=0; i<320; i++) 730 { 731 avg += T[i]; 732 rms += T[i]*T[i]; 733 } 734 735 avg /= 320; 736 rms /= 320; 737 rms -= avg*avg; 738 rms = rms<0 ? 0 : sqrt(rms); 739 740 vector<float> out; 741 out.reserve(322); 742 out.assign(T.cbegin(), T.cend()); 743 out.emplace_back(avg); 744 out.emplace_back(rms); 745 727 746 // Update the Dim service with the interpolated positions 728 Update(fDimTemp2, vector<float>(T.cbegin(), T.cend()), time);747 Update(fDimTemp2, out, time); 729 748 } 730 749 … … 755 774 "|T_back[deg C]:FTM backpanel temperatures FTM (top/bottom), FSC (top/bottom)" 756 775 "|T_eth[deg C]:Ethernet switches temperatures top (front/back), bottom (f/b)"), 757 fDimTemp2 ("FSC_CONTROL/BIAS_TEMP", "F:1;F:320 ",776 fDimTemp2 ("FSC_CONTROL/BIAS_TEMP", "F:1;F:320;F:1;F:1", 758 777 "|t[s]:FSC uptime" 759 "|T[deg C]:Interpolated temperatures at bias patch positions"), 778 "|T[deg C]:Interpolated temperatures at bias patch positions" 779 "|T_avg[deg C]:Average temperature calculated from all patches" 780 "|T_rms[deg C]:Temperature RMS calculated from all patches"), 760 781 fDimHum ("FSC_CONTROL/HUMIDITY", "F:1;F:4", 761 782 "|t[s]:FSC uptime" … … 926 947 fFSC.SetVerbose(!conf.Get<bool>("quiet")); 927 948 928 const string fname1 = conf.Get<string>("se snor-pos-file");949 const string fname1 = conf.Get<string>("sensor-pos-file"); 929 950 const auto v1 = ReadVector(fname1); 930 951 if (v1.size() != 31)
Note:
See TracChangeset
for help on using the changeset viewer.