! ! hp 20.11.1996 Adaption des alten after-files fuer single-plot ! hp 11.11.1999 Anpassung an spec-Daten ! scan_name= mean_temperature= mean_countera= scan_type= mean_monitor= mean_current= ssa_status=0 if search_gqe(DETECTOR) delete DETECTOR".*" endif if search_gqe(MONITOR) delete MONITOR".*" endif if search_gqe(CURRENT) delete CURRENT".*" endif if search_gqe(countera) delete countera".*" endif if search_gqe(TEMPERATURE) delete TEMPERATURE".*" endif if search_gqe(epoch) delete epoch".*" endif if search_symbol(read_file) if !search_file(read_file) read/scan/fio/sort read_file scan_name = read_file else say "" say "" say "Error in after: file "read_file" not found!" say "" say "" endif else say "" say "" say "Error in after: read_file not defined!" say "" say "" endif if search_symbol(noplot) then goto store_label deact *.* cls/gra if search_scan(DETECTOR) scan_type = comment(DETECTOR,3,3) if compare(scan_type,"hklscan") hp_hkl = 1 hp_hklmax = abs(K(1,1)-K(curr_index(K),1)) hp_hkldum = abs(K(1,2)-K(curr_index(K),2)) if (hp_hkldum>hp_hklmax) hp_hklmax = hp_hkldum hp_hkl = 2 endif hp_hkldum = abs(L(1,2)-L(curr_index(L),2)) if (hp_hkldum>hp_hklmax) hp_hklmax = hp_hkldum hp_hkl = 3 endif if !(hp_hkl-2) vcalc x(DETECTOR) = y(L) if search_scan(TEMPERATURE) then vcalc x(TEMPERATURE) = y(K) if search_scan(COUNTERA) then vcalc x(COUNTERA) = y(K) if search_scan(CURRENT) then vcalc x(CURRENT) = y(K) if search_scan(MONITOR) then vcalc x(MONITOR) = y(K) endif if !(hp_hkl-3) vcalc x(DETECTOR) = y(L) if search_scan(TEMPERATURE) then vcalc x(TEMPERATURE) = y(L) if search_scan(COUNTERA) then vcalc x(COUNTERA) = y(L) if search_scan(CURRENT) then vcalc x(CURRENT) = y(L) if search_scan(MONITOR) then vcalc x(MONITOR) = y(L) endif hp_hkl= hp_hklmax= hp_hkldum= endif scan_type = comment(DETECTOR,3,3)" "comment(DETECTOR,3,4)" "comment(DETECTOR,3,5)" "comment(DETECTOR,3,6)" "comment(DETECTOR,3,7)" "comment(DETECTOR,3,8) ssa/nodisplay detector del DETECTOR.1 DETECTOR.99 copy/nocon 0.layout DETECTOR create/text DETECTOR.2 create/text DETECTOR.3 create/text DETECTOR.4 set DETECTOR/v3/prim=5/type=1/par=4 set DETECTOR.2/col=2/text="Detector" set DETECTOR.3/text="Position [Units]" set DETECTOR.4/text="Intensity [Counts]" set DETECTOR.2/x=-0.1/y=1.2/prec=2/FONT=3/height=14 set DETECTOR.3/x=0.5/y=-0.15/prec=2/FONT=3/height=14/h_=2 set DETECTOR.4/x=-0.1/y=1.1/prec=2/FONT=3/height=14 set DETECTOR/colour=2 act DETECTOR.* endif if search_scan(TEMPERATURE) del TEMPERATURE.1 TEMPERATURE.99 copy/nocon 0.layout TEMPERATURE set TEMPERATURE/v2 if search_scan(countera) set TEMPERATURE.layout/pl=0 else set TEMPERATURE.layout/pl=1 endif create/text temperature.2 create/text temperature.3 create/text temperature.4 hp_mean = abs(total(TEMPERATURE)) if hp_mean>0 mean_temperature = sum(TEMPERATURE)/total(TEMPERATURE) endif set temperature.2/col=2/text="Temperature" set temperature.3/text="Position [Units]" set temperature.4/text="T [K]" set temperature.2/x=-0.1/y=1.2/prec=2/FONT=3/height=14 set temperature.3/x=0.5/y=-0.15/prec=2/FONT=3/height=14/h_=2 set temperature.4/x=-0.1/y=1.1/prec=2/FONT=3/height=14 set temperature/colour=2/type=1 act temperature.* endif if search_scan(countera) del countera.1 countera.99 copy/nocon 0.layout countera set countera/v2/prim=5/type=1/par=4/colour=4 create/text countera.2 create/text countera.3 hp_mean = abs(total(COUNTERA)) if hp_mean>0 mean_countera = sum(COUNTERA)/total(COUNTERA) endif set countera.2/col=4/text="Floureszence" set countera.3/text="Intensity [Counts]" set countera.2/x=0.7/y=1.2/prec=2/FONT=3/height=14 set countera.3/x=0.7/y=1.1/prec=2/FONT=3/height=14 set countera.layout/x_off=-1.02 if search_scan(TEMPERATURE) set countera.layout/pl=2 else set countera.layout/pl=1 endif set countera/x_maj=-5 act countera.* endif if search_scan(MONITOR) del MONITOR.1 del MONITOR.2 del MONITOR.3 del MONITOR.4 copy/nocon 0.layout MONITOR set MONITOR/v1/prim=5/type=1/par=4/colour=2 if search_scan(CURRENT) set MONITOR.layout/pl=0 else set MONITOR.layout/pl=1 endif create/text MONITOR.2 create/text MONITOR.3 create/text MONITOR.4 hp_mean = abs(total(MONITOR)) if hp_mean>0 mean_monitor = sum(MONITOR)/total(MONITOR) endif set MONITOR.2/col=2/text="Monitor" set MONITOR.3/text="Position [Units]" set MONITOR.4/text="Intensity [Counts]" set MONITOR.2/x=-0.1/y=1.2/prec=2/FONT=3/height=14 set MONITOR.3/x=0.5/y=-0.15/prec=2/FONT=3/height=14/h_=2 set MONITOR.4/x=-0.1/y=1.1/prec=2/FONT=3/height=14 act MONITOR.* endif if search_scan(CURRENT) del CURRENT.1 CURRENT.99 copy/nocon 0.layout CURRENT set CURRENT/v1 create/text CURRENT.2 create/text CURRENT.3 ! calc y(CURRENT) = (y(CURRENT)-500)/5000 if search_symbol(epoch_sample_time) vcalc y(CURRENT) = y(CURRENT)/epoch_sample_time endif hp_mean = abs(total(CURRENT)) if hp_mean>0 mean_current = sum(CURRENT)/total(CURRENT) endif set CURRENT.2/col=4/text="Ring Current" set CURRENT.3/text=" Current [mA]" set CURRENT.2/x=0.7/y=1.2/prec=2/FONT=3/height=14 set CURRENT.3/x=0.7/y=1.1/prec=2/FONT=3/height=14 set CURRENT.layout/x_off=-1.02 if search_scan(MONITOR) set CURRENT.layout/pl=2 else set CURRENT.layout/pl=1 endif set CURRENT/x_maj=-5 set CURRENT/colour=4 act CURRENT.* endif del 0.80 0.99 hp_pos_x1 = 0.5 hp_pos_x2 = 0.8 hp_pos_y = 0.4 hp_y_delta = 0.05 if search_symbol(scan_name) if !search_gqe(0.90) then "create/text 0.90" set 0.90/text=" Scan: "path(scan_name) set 0.90/x=hp_pos_x1/y=hp_pos_y-0*hp_y_delta/prec=2/height=14/font=3 act 0.90 endif if search_symbol(scan_type) if !search_gqe(0.85) then "create/text 0.85" set 0.85/text=" Type: "scan_type set 0.85/x=hp_pos_x1/y=hp_pos_y-1*hp_y_delta/prec=2/height=14/font=3 act 0.85 endif if search_symbol(mean_current) if !search_gqe(0.91) then "create/text 0.91" set 0.91/text=" Ring cur.: "mean_current set 0.91/x=hp_pos_x1/y=hp_pos_y-2*hp_y_delta/prec=2/height=14/font=3 act 0.91 endif if search_symbol(mean_monitor) if !search_gqe(0.92) then "create/text 0.92" set 0.92/text=" Monitor: "mean_monitor set 0.92/x=hp_pos_x2/y=hp_pos_y-2*hp_y_delta/prec=2/height=14/font=3 act 0.92 endif if search_symbol(mean_temperature) if !search_gqe(0.98) then "create/text 0.98" set 0.98/text=" Temperature: "mean_temperature set 0.98/x=hp_pos_x1/y=hp_pos_y-3*hp_y_delta/prec=2/height=14/font=3 act 0.98 endif if search_symbol(mean_countera) if !search_gqe(0.84) then "create/text 0.84" set 0.84/text=" Fluoreszence: "mean_countera set 0.84/x=hp_pos_x2/y=hp_pos_y-3*hp_y_delta/prec=2/height=14/font=3 act 0.84 endif if ssa_status if !search_gqe(0.93) then "create/text 0.93" set 0.93/text=" Peak Int : "ssa_peak_y set 0.93/x=hp_pos_x1/y=hp_pos_y-4*hp_y_delta/prec=2/height=14/font=3 act 0.93 if !search_gqe(0.89) then "create/text 0.89" set 0.89/text=" Peak Pos : "ssa_peak_x set 0.89/x=hp_pos_x2/y=hp_pos_y-4*hp_y_delta/prec=2/height=14/font=3 act 0.89 if !search_gqe(0.88) then "create/text 0.88" set 0.88/text=" Integr. Int : "ssa_int set 0.88/x=hp_pos_x1/y=hp_pos_y-5*hp_y_delta/prec=2/height=14/font=3 act 0.88 if !search_gqe(0.94) then "create/text 0.94" set 0.94/text=" Midpoint: "ssa_midpoint set 0.94/x=hp_pos_x2/y=hp_pos_y-5*hp_y_delta/prec=2/height=14/font=3 act 0.94 if !search_gqe(0.95) then "create/text 0.95" set 0.95/text=" CMS: "ssa_cms set 0.95/x=hp_pos_x2/y=hp_pos_y-6*hp_y_delta/prec=2/height=14/font=3 act 0.95 if !search_gqe(0.96) then "create/text 0.96" set 0.96/text=" FWHM: "ssa_fwhm set 0.96/x=hp_pos_x1/y=hp_pos_y-6*hp_y_delta/prec=2/height=14/font=3 act 0.96 endif if search_symbol(epoch_actqx) if !search_gqe(0.86) then "create/text 0.86" hp_fl = 100000 hp_fl1 = 1/hp_fl set 0.86/text=" Q-Pos.: ("dtoi(epoch_actqx*hp_fl)*hp_fl1" "dtoi(epoch_actqy*hp_fl)*hp_fl1" "dtoi(epoch_actqz*hp_fl)*hp_fl1")" set 0.86/x=hp_pos_x1/y=hp_pos_y-7*hp_y_delta/prec=2/height=14/font=3 act 0.86 hp_fl= hp_fl1= endif if search_symbol(epoch_filter) if !search_gqe(0.99) then "create/text 0.99" set 0.99/text=" Filter: "epoch_filter" ("epoch_filter_thickness" mm Alu, Transmission: "epoch_filter_transmission")" set 0.99/x=hp_pos_x1/y=hp_pos_y-8*hp_y_delta/prec=2/height=14/font=3 act 0.99 endif if search_symbol(epoch_energy) if !search_gqe(0.97) then "create/text 0.97" set 0.97/text=" Energy: "epoch_energy" keV" set 0.97/x=hp_pos_x1/y=hp_pos_y-10*hp_y_delta/prec=2/height=14/font=3 act 0.97 endif if search_symbol(epoch_sample_time) if !search_gqe(0.87) then "create/text 0.87" set 0.87/text=" sample time: "epoch_sample_time set 0.87/x=hp_pos_x2/y=hp_pos_y-10*hp_y_delta/prec=2/height=14/font=3 act 0.87 endif display_label: if search_symbol(nodisplay) then goto laser_label auto/x/max=4 auto/y x11/raise dis laser_label: if search_symbol(nolaser) then goto print_label postscript/nodispl/nocon/col read_file".ps" print_label: if search_symbol(yeslaser) then hplot store_label: end