- Fixes for FOCUS 2D
- Mapped fileeval to exe manager - Updates for TRICS file formats SKIPPED: psi/libpsi.a psi/sinqhmdriv.c psi/sinqhttp.c psi/tabledrive.c psi/tasscan.c psi/hardsup/asynsrv_utility.c psi/hardsup/sinqhm.c
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
# This is the scripted version using nxscript
|
||||
#
|
||||
# Mark Koennecke, May 2004
|
||||
# This is a special version for virtual DMC on lns00
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
proc storeMonochromator {} {
|
||||
@ -75,14 +76,34 @@ proc makeLinks {} {
|
||||
nxscript makelink dana dtnstep
|
||||
nxscript makelink dana mlambda
|
||||
}
|
||||
#------------------------------------------------------------------------
|
||||
proc makeSimFileName args {
|
||||
global datahome
|
||||
sicsdatanumber incr
|
||||
set num [SplitReply [sicsdatanumber]]
|
||||
return [makeSimForNum $num]
|
||||
}
|
||||
#------------------------------------------------------------------------
|
||||
proc makeSimForNum {num} {
|
||||
global datahome
|
||||
set pre [string trim [SplitReply [sicsdataprefix]]]
|
||||
set po [string trim [SplitReply [sicsdatapostfix]]]
|
||||
return [format "%s/%s2006n%6.6d%s" $datahome $pre $num $po]
|
||||
}
|
||||
#-------------------------------------------------------------------------
|
||||
# store DMC data
|
||||
#-------------------------------------------------------------------------
|
||||
proc storedata {} {
|
||||
global home
|
||||
set fil [newFileName]
|
||||
global home wwwMode
|
||||
|
||||
if {$wwwMode == 1} {
|
||||
set fil [makeSimFileName]
|
||||
} else {
|
||||
set fil [newFileName]
|
||||
}
|
||||
lastdatafile $fil
|
||||
clientput "Opening $fil for writing"
|
||||
nxscript create4 $fil $home/dmc.dic
|
||||
nxscript createxml $fil $home/dmc.dic
|
||||
|
||||
writeStandardAttributes $fil
|
||||
writeTextVar etitle title
|
||||
|
@ -1,13 +1,19 @@
|
||||
# --------------------------------------------------------------------------
|
||||
#--------------------------------------------------------------------------
|
||||
# Initialization script for a virtual DMC instrument using a McStas
|
||||
# simulationas a data source
|
||||
#
|
||||
# Dr. Mark Koennecke, June 2005
|
||||
#---------------------------------------------------------------------------
|
||||
# O P T I O N S
|
||||
# wwwMode = 1 when running for the WWW-VDMC application
|
||||
set wwwMode 1
|
||||
|
||||
set home $env(HOME)/src/workspace/sics/mcstas/dmc
|
||||
|
||||
if {$wwwMode == 1} {
|
||||
set home /home/lnswww/vinstrument/mcstas/dmc
|
||||
set datahome /home/lnswww/www/vinstrument
|
||||
} else {
|
||||
set home $env(HOME)/src/workspace/sics/mcstas/dmc
|
||||
}
|
||||
#--------------------------------- first all the server options are set
|
||||
#ServerOption RedirectFile $home/stdcdmc
|
||||
ServerOption ReadTimeOut 10
|
||||
@ -120,18 +126,20 @@ SicsDataPrefix vdmc
|
||||
#--------- make data number
|
||||
MakeDataNumber SicsDataNumber $home/DataNumber
|
||||
VarMake SicsDataPostFix Text Internal
|
||||
SicsDataPostFix ".hdf"
|
||||
SicsDataPostFix ".xml"
|
||||
VarMake Adress Text User
|
||||
VarMake phone Text User
|
||||
VarMake fax Text User
|
||||
VarMake email Text User
|
||||
VarMake sample_mur Float User
|
||||
VarMake lastdatafile Text User
|
||||
#--------------------------------------------------------------------------
|
||||
# P R O C E D U R E S
|
||||
#--------------------------------------------------------------------------
|
||||
MakeDrive
|
||||
MakeBatchManager
|
||||
MakeNXScript
|
||||
MakeRuenBuffer
|
||||
#-------------------- initialize scripted commands
|
||||
source $home/vdmccom.tcl
|
||||
#-------------------- configure commandlog
|
||||
|
@ -15,6 +15,7 @@ if { [info exists vdmcinit] == 0 } {
|
||||
Publish copydmcdata User
|
||||
Publish sample User
|
||||
Publish wwwsics Spy
|
||||
Publish wwwfilefornumber Spy
|
||||
mcinstall
|
||||
}
|
||||
source $home/log.tcl
|
||||
@ -38,12 +39,19 @@ proc washlazy {name} {
|
||||
if { [string first "H K L THETA 2THETA D VALUE" $line] > 0} {
|
||||
break
|
||||
}
|
||||
#-------- A second version to treat the messed up lazy pulverix files
|
||||
# uploaded through the WWW-interface
|
||||
if { [string first "H K L THETA" $line] >= 0} {
|
||||
break
|
||||
}
|
||||
}
|
||||
#------- process data lines
|
||||
puts $out "// mult Q(hkl) F2 DW w"
|
||||
clientput "HKL found at: $line"
|
||||
while { [gets $in line] >= 0} {
|
||||
set num [scan $line "%d %d %d %f %f %f %f %f %d %d %d %f %f %f %f %f %d"\
|
||||
h k l th th2 d di sin h2 k2 l2 I F A B ang mul]
|
||||
clientput "Line = $num, $line"
|
||||
if { $num == 17} {
|
||||
set q [expr (2.*3.14159265358979323846)/$d]
|
||||
set f2 [expr $F * $F]
|
||||
@ -363,7 +371,7 @@ proc wwwpar {type mot} {
|
||||
}
|
||||
#------------- wwwuser formats user information into a html table
|
||||
proc wwwuser {} {
|
||||
lappend list title sample user email phone adress
|
||||
lappend list title user email phone adress
|
||||
append txt "<table>"
|
||||
foreach e $list {
|
||||
set ret [catch {$e} msg]
|
||||
@ -376,6 +384,11 @@ proc wwwuser {} {
|
||||
}
|
||||
return $txt
|
||||
}
|
||||
#------------- wwwfilefornumber returns the path to a data file for a
|
||||
# number
|
||||
proc wwwfilefornumber {num} {
|
||||
return [makeSimForNum $num]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user