Commit bbfe48b7 authored by Jan Kotanski's avatar Jan Kotanski
Browse files

New upstream version 1.1.0

parent 9df4bca6
Metadata-Version: 1.0
Name: nexdatas.extrasp02
Version: 1.0.3
Version: 1.1.0
Summary: nexus template components for P02
Home-page: http://github.com/nexdatas/
Author: Jan Kotanski
......
......@@ -19,7 +19,7 @@
""" nexus xml templates for P02"""
__version__ = "1.0.3"
__version__ = "1.1.0"
#: (:obj:`dict` <:obj:`str` , :obj:`dict` <:obj:`str` , :obj:`str` > >)
#: standard component template variables
......@@ -465,7 +465,7 @@ standardComponentVariables = {
},
'postfix': {
'default': '',
'doc': "field name prefix (string)"
'doc': "field name postfix (string)"
},
'omega': {
'default': None,
......@@ -543,6 +543,21 @@ standardComponentVariables = {
'default': 'pe_detector',
'doc': "detector group name (string)"
},
'pitch': {
'default': None,
'doc': "theta rotation of perkin elmer"
" (datasource)"
},
'yaw': {
'default': None,
'doc': "horizontal rotation of perkin elmer"
" (datasource)"
},
'y': {
'default': None,
'doc': "vertical translation of perkin elmer"
" (datasource)"
},
'x': {
'default': None,
'doc': "horizontal translation of perkin elmer"
......
......@@ -5,6 +5,33 @@
<group type="NXdetector" name="$(detname)">
<field type="NX_CHAR" name="depends_on">transformations/x<strategy mode="INIT"/></field>
<group type="NXtransformations" name="transformations">
<field depends_on="yaw" units="deg" type="NX_FLOAT" name="pitch">
<strategy mode="INIT"/>$datasources.$(pitch)<attribute type="NX_CHAR" name="transformation_type">rotation<strategy mode="INIT"/>
</attribute>
<attribute type="NX_FLOAT64" name="vector">1 0 0<dimensions rank="1">
<dim value="3" index="1"/>
</dimensions>
<strategy mode="INIT"/>
</attribute>
</field>
<field depends_on="y" units="deg" type="NX_FLOAT" name="yaw">
<strategy mode="INIT"/>$datasources.$(yaw)<attribute type="NX_CHAR" name="transformation_type">rotation<strategy mode="INIT"/>
</attribute>
<attribute type="NX_FLOAT64" name="vector">0 1 0<dimensions rank="1">
<dim value="3" index="1"/>
</dimensions>
<strategy mode="INIT"/>
</attribute>
</field>
<field depends_on="x" units="mm" type="NX_FLOAT" name="y">
<strategy mode="INIT"/>$datasources.$(y)<attribute type="NX_CHAR" name="transformation_type">translation<strategy mode="INIT"/>
</attribute>
<attribute type="NX_FLOAT64" name="vector">0 1 0<dimensions rank="1">
<dim value="3" index="1"/>
</dimensions>
<strategy mode="INIT"/>
</attribute>
</field>
<field depends_on="z" units="mm" type="NX_FLOAT64" name="x">
<strategy mode="INIT"/>$datasources.$(x)
<attribute type="NX_CHAR" name="transformation_type">translation<strategy mode="INIT"/>
......
......@@ -2,8 +2,6 @@
<definition>
<group type="NXentry" name="entry$var.serialno">
<group type="NXsample" name="$(sname)">
<field type="NX_CHAR" name="depends_on">transformations/z$(postfix)<strategy mode="INIT"/>
</field>
<group type="NXtransformations" name="transformations">
<field depends_on="x$(postfix)" units="mm" type="NX_FLOAT" name="z$(postfix)">
<strategy mode="INIT"/>$datasources.$(z)<attribute type="NX_CHAR" name="transformation_type">translation<strategy mode="INIT"/>
......
#!/bin/bash
## online.xml file as a first command-line parameter
if [[ -z $1 ]]; then
onlinexml=""
else
onlinexml=$1
onlinexml=""
for i in "${@:1}"
do
if [[ $i == -* ]] ; then
echo "PARAM: $i "
case $i in
-h*|--help*)
HELP=YES
;;
-s*|--set-property*)
NXSPROPERTY=YES
;;
*)
# unknown option
;;
esac
else
onlinexml=$i
fi
done
if [[ ! -z $HELP ]] ; then
echo ""
echo "usage: nxsconf_haspp02ch1.sh [<ONLINE.XML>] [-h|--help]"
echo ""
echo "create nexus configuration for online.xml file"
echo ""
echo "possible arguments:"
echo " ONLINE.XML online.xml file, (default: /online_dir/online.xml)"
echo ""
echo "optional arguments:"
echo " -h, --help show this help message and exit"
echo " -s, --set-property set the DefaultPreselectedComponents of NXSRecSelector"
echo ""
echo "examples:"
echo " /usr/share/nxstools/nxsconf_haspp02ch1.sh /usr/share/nxstools/online_haspp02ch1.xml -s"
echo " /usr/share/nxstools/nxsconf_haspp02ch1.sh /usr/share/nxstools/online_haspp02ch1.xml"
echo " /usr/share/nxstools/nxsconf_haspp02ch1.sh"
echo ""
exit 0
fi
hname=$(hostname)
......@@ -27,10 +63,10 @@ fi
#cpopt="-d . -r $server"
## create the configuration in the NXSConfigServer DB
stdopt="-r $server -o -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
stdopt="-b -r $server -o -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
tgopt="-b -r $server -o"
dsopt="-b -r $server $onlinexml -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
cpopt="-r $server -o $onlinexml -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
cpopt="-b -r $server -o $onlinexml -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
## online.xml datasources
......@@ -40,7 +76,7 @@ nxscreate onlineds $dsopt
## default
nxscreate stdcomp -t default -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.1 $stdopt
nxscreate stdcomp -t default -m -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.1 $stdopt
## beamtime_id
......@@ -64,7 +100,7 @@ nxscreate stdcomp -t undulator -c undulator gap insertion_gap taper insertion_ta
## mono
nxscreate stdcomp -p nxsextrasp02 -t dlm -c mono roll1 oh1_mot21 pitch1 oh1_mot26 x1 oh1_mot18 y1 oh1_mot19 yaw1 oh1_mot17 roll2 oh1_mot21 pitch2 oh1_mot29 x2 oh1_mot22 y2 oh1_mot23 distance1 36 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t dlm -c mono roll1 oh1_mot21 pitch1 oh1_mot26 x1 oh1_mot18 y1 oh1_mot19 yaw1 oh1_mot17 roll2 oh1_mot25 pitch2 oh1_mot29 x2 oh1_mot22 y2 oh1_mot23 distance1 36 $stdopt
## energy_all
......@@ -85,11 +121,11 @@ nxscreate stdcomp -t slit -c ohslit2 ygap slt2vgap yoffset slt2offs left slt2lef
## slit1
nxscreate stdcomp -t slit -c slit1 left eh1a_mot05 right eh1a_mot06 top eh1a_mot07 bottom eh1a_mot08 dependstop distance distance 29 distanceoffset "0 0 -65.6" transformations transformations $stdopt
nxscreate stdcomp -t slit -c slit1 left eh1a_mot01 right eh1a_mot02 top eh1a_mot03 bottom eh1a_mot04 dependstop distance distance 29 distanceoffset "0 0 -65.6" transformations transformations $stdopt
## slit2
nxscreate stdcomp -t slit -c slit2 left eh1a_mot01 right eh1a_mot02 top eh1a_mot03 bottom eh1a_mot04 dependstop distance distance 62 distanceoffset "0 0 -65.6" transformations transformations $stdopt
nxscreate stdcomp -t slit -c slit2 left eh1a_mot05 right eh1a_mot06 top eh1a_mot07 bottom eh1a_mot08 dependstop distance distance 62 distanceoffset "0 0 -65.6" transformations transformations $stdopt
## pinhole1
......@@ -99,22 +135,51 @@ nxscreate stdcomp -t pinhole -c pinhole1 x eh1a_mot09 y eh1a_mot10 $stdopt
nxscreate stdcomp -t pinhole -c pinhole2 x eh1a_mot11 y eh1a_mot12 $stdopt
## onaxis_pinhole
nxscreate stdcomp -t pinhole -c onaxis_pinhole x eh1a_mot42 y eh1a_mot43 z eh1a_mot41 $stdopt
## beamstop
nxscreate stdcomp -t beamstop -c beamstop x eh1b_mot13 y eh1b_mot06 $stdopt
## pe_stage
nxscreate stdcomp -p nxsextrasp02 -t pestage -c pe_stage x eh1b_mot16 z eh1b_mot15 zlarge eh1b_mot14 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t pestage -c pe_stage x eh1b_mot16 z eh1b_mot15 zlarge eh1b_mot14 pitch eh1a_mot26 yaw eh1a_mot25 y eh1a_mot24 $stdopt
## goniometer
## goniometer ?? diffractometer ??
nxscreate stdcomp -p nxsextrasp02 -t goniometer -c goniometer x eh1a_mot14 y eh1a_mot15 z eh1a_mot13 tti eh1b_mot04 tto eh1b_mot07 madrot eh1b_mot11 sitt eh1b_mot12 spinner eh1a_mot16 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t goniometer -c goniometer x eh1a_mot14 y eh1a_mot15 z eh1a_mot13 tto eh1b_mot04 tti eh1b_mot07 madrot eh1b_mot11 sitt eh1b_mot12 spinner eh1a_mot16 $stdopt
## sample_table
nxscreate stdcomp -p nxsextrasp02 -t sampletable -c sample_table prefix sam x eh1b_mot09 y eh1b_mot10 z eh1b_mot08 diffv eh1b_mot02 diffh eh1b_mot01 om eh1b_mot03 $stdopt
## xy_stage
nxscreate stdcomp -p nxsextrasp02 -t samplepositioner -c xy_stage postfix _xy y eh1a_mot45 z eh1a_mot46 omega eh1a_mot44 $stdopt
## pep_sol
nxscreate stdcomp -p nxsextrasp02 -t samplepositioner -c pep_sol postfix _pepsol y eh1a_mot36 z eh1a_mot37 omega eh1a_mot39 $stdopt
## pep_det
nxscreate stdcomp -p nxsextrasp02 -t pestage -c pep_det z eh1a_mot35 zlarge eh1a_mot33 yaw eh1a_mot38 y eh1a_mot34 detname pepdet $stdopt
## tbz
nxscreate stdcomp -p nxsextrasp02 -t insstage -c tbz y eh1a_mot23 $stdopt
## batt
nxscreate stdcomp -p nxsextrasp02 -t insstage -c batt yaw eh1a_mot32 $stdopt
## shutter
nxscreate stdcomp -p nxsextrasp02 -t insstage -c shutter y eh1a_mot47 $stdopt
## cryo
nxscreate stdcomp -p nxsextrasp02 -t cryostage -c cryo x eh1a_mot18 y eh1a_mot19 z eh1a_mot17 distance 65.6 distanceoffset "0 0 -65.6" $stdopt
......@@ -123,9 +188,13 @@ nxscreate stdcomp -p nxsextrasp02 -t cryostage -c cryo x eh1a_mot18 y eh1a_mot1
nxscreate stdcomp -p nxsextrasp02 -t samplestage -c hab_positioner x eh1a_mot21 y eh1a_mot22 z eh1a_mot20 prefix hab_ dependson z $stdopt
## jj_positioner
## crl
nxscreate stdcomp -p nxsextrasp02 -t crlstage -c crl pitch eh1a_mot30 yaw eh1a_mot29 x eh1a_mot27 y eh1a_mot28 $stdopt
#? ## jj_positioner
nxscreate stdcomp -p nxsextrasp02 -t jjpositioner -c jj_positioner z eh1a_mot24 y eh1a_mot25 svp eh1a_mot28 svg eh1a_mot29 shp eh1a_mot30 shg eh1a_mot31 omega eh1a_mot26 rot eh1a_mot23 twth eh1a_mot27 $stdopt
#? nxscreate stdcomp -p nxsextrasp02 -t jjpositioner -c jj_positioner z eh1a_mot24 y eh1a_mot25 svp eh1a_mot28 svg eh1a_mot29 shp eh1a_mot30 shg eh1a_mot31 omega eh1a_mot26 rot eh1a_mot23 twth eh1a_mot27 $stdopt
## ten_channel_detector
......@@ -134,11 +203,11 @@ nxscreate stdcomp -p nxsextrasp02 -t tenchanneldetector -c ten_channel_detector
## eh1a_cXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1a_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1a_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
## eh1b_cXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1b_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1b_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
## oh1_vfcXY
......@@ -169,4 +238,15 @@ nxscreate onlinecp -c pe_detector $cpopt
## set DefaultPreselectedComponents of NXSRecSelector/haspp02ch1
## nxsetup -c -n DefaultPreselectedComponents -w "[\"source\",\"undulator\",\"beamtime_id\",\"mono\",\"ohslit1\",\"ohslit2\",\"slit1\",\"slit2\",\"pinhole1\",\"pinhole2\",\"pe_stage\",\"goniometer\",\"sample_table\",\"cryo\",\"hab_positioner\",\"jj_positioner\"]" NXSRecSelector/haspp02ch1
if ! [ -z $NXSPROPERTY ]; then
COMPONENTLIST="[\"source\",\"undulator\",\"beamtime_id\",\"mono\",\"ohslit1\",\"ohslit2\",\"slit1\",\"slit2\",\"pinhole1\",\"pinhole2\",\"pe_stage\",\"goniometer\",\"sample_table\",\"cryo\",\"hab_positioner\",\"xy_stage\",\"pep_sol\",\"pep_det\",\"tbz\",\"shutter\",\"crl\",\"batt\"]"
if [ "$hname" == "haspp02ch1" ]; then
nxsetup change-prop -n DefaultPreselectedComponents -w $COMPONENTLIST NXSRecSelector/haspp02ch1
elif [ "$hname" == "haso228k" ]; then
echo "nxsetup change-prop -n DefaultPreselectedComponents -w $COMPONENTLIST NXSRecSelector/haspp02ch1"
fi
fi
......@@ -11,8 +11,8 @@ hname=$(hostname)
echo "hostname: $hname"
## NXSConfigServer name
if [ "$hname" == "haspp02ch1a" ]; then
server="haspp02oh1:10000/p02/nxsconfigserver/haspp02ch1a"
if [ "$hname" == "haspp02ch1" ]; then
server="haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
elif [ "$hname" == "haso228k" ]; then
server="p06/nxsconfigserver/haso228"
else
......@@ -27,20 +27,20 @@ fi
#cpopt="-d . -r $server"
## create the configuration in the NXSConfigServer DB
stdopt="-r $server -o -e haspp02oh1:10000/p02/nxsconfigserver/haspp02ch1a"
stdopt="-b -r $server -o -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
tgopt="-b -r $server -o"
dsopt="-b -r $server $onlinexml -e haspp02oh1:10000/p02/nxsconfigserver/haspp02ch1a"
cpopt="-r $server -o $onlinexml -e haspp02oh1:10000/p02/nxsconfigserver/haspp02ch1a"
dsopt="-b -r $server $onlinexml -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
cpopt="-b -r $server -o $onlinexml -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
## online.xml datasources
# ## online.xml datasources
nxscreate onlineds $dsopt
# nxscreate onlineds $dsopt
## default
nxscreate stdcomp -t default -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.1 $stdopt
nxscreate stdcomp -t default -m -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.1 $stdopt
## beamtime_id
......@@ -64,7 +64,7 @@ nxscreate stdcomp -t undulator -c undulator gap insertion_gap taper insertion_ta
## mono
nxscreate stdcomp -p nxsextrasp02 -t dlm -c mono roll1 oh1_mot21 pitch1 oh1_mot26 x1 oh1_mot18 y1 oh1_mot19 yaw1 oh1_mot17 roll2 oh1_mot21 pitch2 oh1_mot29 x2 oh1_mot22 y2 oh1_mot23 distance1 36 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t dlm -c mono roll1 oh1_mot21 pitch1 oh1_mot26 x1 oh1_mot18 y1 oh1_mot19 yaw1 oh1_mot17 roll2 oh1_mot25 pitch2 oh1_mot29 x2 oh1_mot22 y2 oh1_mot23 distance1 36 $stdopt
## energy_all
......@@ -85,11 +85,11 @@ nxscreate stdcomp -t slit -c ohslit2 ygap slt2vgap yoffset slt2offs left slt2lef
## slit1
nxscreate stdcomp -t slit -c slit1 left eh1a_mot05 right eh1a_mot06 top eh1a_mot07 bottom eh1a_mot08 dependstop distance distance 29 distanceoffset "0 0 -65.6" transformations transformations $stdopt
nxscreate stdcomp -t slit -c slit1 left eh1a_mot01 right eh1a_mot02 top eh1a_mot03 bottom eh1a_mot04 dependstop distance distance 29 distanceoffset "0 0 -65.6" transformations transformations $stdopt
## slit2
nxscreate stdcomp -t slit -c slit2 left eh1a_mot01 right eh1a_mot02 top eh1a_mot03 bottom eh1a_mot04 dependstop distance distance 62 distanceoffset "0 0 -65.6" transformations transformations $stdopt
nxscreate stdcomp -t slit -c slit2 left eh1a_mot05 right eh1a_mot06 top eh1a_mot07 bottom eh1a_mot08 dependstop distance distance 62 distanceoffset "0 0 -65.6" transformations transformations $stdopt
## pinhole1
......@@ -99,22 +99,51 @@ nxscreate stdcomp -t pinhole -c pinhole1 x eh1a_mot09 y eh1a_mot10 $stdopt
nxscreate stdcomp -t pinhole -c pinhole2 x eh1a_mot11 y eh1a_mot12 $stdopt
## onaxis_pinhole
nxscreate stdcomp -t pinhole -c onaxis_pinhole x eh1a_mot42 y eh1a_mot43 z eh1a_mot41 $stdopt
## beamstop
nxscreate stdcomp -t beamstop -c beamstop x eh1b_mot13 y eh1b_mot06 $stdopt
## pe_stage
nxscreate stdcomp -p nxsextrasp02 -t pestage -c pe_stage x eh1b_mot16 z eh1b_mot15 zlarge eh1b_mot14 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t pestage -c pe_stage x eh1b_mot16 z eh1b_mot15 zlarge eh1b_mot14 pitch eh1a_mot26 yaw eh1a_mot25 y eh1a_mot24 $stdopt
## goniometer
## goniometer ?? diffractometer ??
nxscreate stdcomp -p nxsextrasp02 -t goniometer -c goniometer x eh1a_mot14 y eh1a_mot15 z eh1a_mot13 tti eh1b_mot04 tto eh1b_mot07 madrot eh1b_mot11 sitt eh1b_mot12 spinner eh1a_mot16 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t goniometer -c goniometer x eh1a_mot14 y eh1a_mot15 z eh1a_mot13 tto eh1b_mot04 tti eh1b_mot07 madrot eh1b_mot11 sitt eh1b_mot12 spinner eh1a_mot16 $stdopt
## sample_table
nxscreate stdcomp -p nxsextrasp02 -t sampletable -c sample_table prefix sam x eh1b_mot09 y eh1b_mot10 z eh1b_mot08 diffv eh1b_mot02 diffh eh1b_mot01 om eh1b_mot03 $stdopt
## xy_stage
nxscreate stdcomp -p nxsextrasp02 -t samplepositioner -c xy_stage postfix _xy y eh1a_mot45 z eh1a_mot46 omega eh1a_mot44 $stdopt
## pep_sol
nxscreate stdcomp -p nxsextrasp02 -t samplepositioner -c pep_sol postfix _pepsol y eh1a_mot36 z eh1a_mot37 omega eh1a_mot39 $stdopt
## pep_det
nxscreate stdcomp -p nxsextrasp02 -t pestage -c pep_det z eh1a_mot35 zlarge eh1a_mot33 yaw eh1a_mot38 y eh1a_mot34 detname pepdet $stdopt
## tbz
nxscreate stdcomp -p nxsextrasp02 -t insstage -c tbz y eh1a_mot23 $stdopt
## batt
nxscreate stdcomp -p nxsextrasp02 -t insstage -c batt yaw eh1a_mot32 $stdopt
## shutter
nxscreate stdcomp -p nxsextrasp02 -t insstage -c shutter y eh1a_mot47 $stdopt
## cryo
nxscreate stdcomp -p nxsextrasp02 -t cryostage -c cryo x eh1a_mot18 y eh1a_mot19 z eh1a_mot17 distance 65.6 distanceoffset "0 0 -65.6" $stdopt
......@@ -123,9 +152,13 @@ nxscreate stdcomp -p nxsextrasp02 -t cryostage -c cryo x eh1a_mot18 y eh1a_mot1
nxscreate stdcomp -p nxsextrasp02 -t samplestage -c hab_positioner x eh1a_mot21 y eh1a_mot22 z eh1a_mot20 prefix hab_ dependson z $stdopt
## jj_positioner
## crl
nxscreate stdcomp -p nxsextrasp02 -t crlstage -c crl pitch eh1a_mot30 yaw eh1a_mot29 x eh1a_mot27 y eh1a_mot28 $stdopt
nxscreate stdcomp -p nxsextrasp02 -t jjpositioner -c jj_positioner z eh1a_mot24 y eh1a_mot25 svp eh1a_mot28 svg eh1a_mot29 shp eh1a_mot30 shg eh1a_mot31 omega eh1a_mot26 rot eh1a_mot23 twth eh1a_mot27 $stdopt
#? ## jj_positioner
#? nxscreate stdcomp -p nxsextrasp02 -t jjpositioner -c jj_positioner z eh1a_mot24 y eh1a_mot25 svp eh1a_mot28 svg eh1a_mot29 shp eh1a_mot30 shg eh1a_mot31 omega eh1a_mot26 rot eh1a_mot23 twth eh1a_mot27 $stdopt
## ten_channel_detector
......@@ -134,11 +167,11 @@ nxscreate stdcomp -p nxsextrasp02 -t tenchanneldetector -c ten_channel_detector
## eh1a_cXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1a_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1a_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
## eh1b_cXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1b_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh1b_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
## oh1_vfcXY
......@@ -159,14 +192,19 @@ nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/
nxscreate onlinecp -c pe_detector $cpopt
# # # ## pilatus
# # ## pilatus
# # nxscreate onlinecp -c pilatus $cpopt
# # # ## lmbd01
# # # nxscreate onlinecp -c pilatus $cpopt
# # # nxscreate onlinecp -c lmbd01 $cpopt
# # # # ## lmbd01
## set DefaultPreselectedComponents of NXSRecSelector/haspp02ch1
# # # # nxscreate onlinecp -c lmbd01 $cpopt
## online.xml datasources
nxscreate onlineds $dsopt
# ## set DefaultPreselectedComponents of NXSRecSelector/haspp02ch1a
# ## nxsetup -c -n DefaultPreselectedComponents -w "[\"source\",\"undulator\",\"beamtime_id\",\"mono\",\"ohslit1\",\"ohslit2\",\"slit1\",\"slit2\",\"pinhole1\",\"pinhole2\",\"pe_stage\",\"goniometer\",\"sample_table\",\"cryo\",\"hab_positioner\",\"jj_positioner\"]" NXSRecSelector/haspp02ch1a
## nxsetup -c -n DefaultPreselectedComponents -w "[\"source\",\"undulator\",\"beamtime_id\",\"mono\",\"ohslit1\",\"ohslit2\",\"slit1\",\"slit2\",\"pinhole1\",\"pinhole2\",\"pe_stage\",\"goniometer\",\"sample_table\",\"cryo\",\"hab_positioner\",\"xy_stage\",\"pep_sol\",\"pep_det\",\"tbz\",\"shutter\",\"crl\",\"batt\"]" NXSRecSelector/haspp02ch1
#!/bin/bash
## online.xml file as a first command-line parameter
if [[ -z $1 ]]; then
onlinexml=""
else
onlinexml=$1
onlinexml=""
for i in "${@:1}"
do
if [[ $i == -* ]] ; then
echo "PARAM: $i "
case $i in
-h*|--help*)
HELP=YES
;;
-s*|--set-property*)
NXSPROPERTY=YES
;;
*)
# unknown option
;;
esac
else
onlinexml=$i
fi
done
if [[ ! -z $HELP ]] ; then
echo ""
echo "usage: nxsconf_haspp02ch2.sh [<ONLINE.XML>] [-h|--help]"
echo ""
echo "create nexus configuration for online.xml file"
echo ""
echo "possible arguments:"
echo " ONLINE.XML online.xml file, (default: /online_dir/online.xml)"
echo ""
echo "optional arguments:"
echo " -h, --help show this help message and exit"
echo " -s, --set-property set the DefaultPreselectedComponents of NXSRecSelector"
echo ""
echo "examples:"
echo " /usr/share/nxstools/nxsconf_haspp02ch2.sh /usr/share/nxstools/online_haspp02ch2.xml -s"
echo " /usr/share/nxstools/nxsconf_haspp02ch2.sh /usr/share/nxstools/online_haspp02ch2.xml"
echo " /usr/share/nxstools/nxsconf_haspp02ch2.sh"
echo ""
exit 0
fi
hname=$(hostname)
......@@ -27,10 +63,10 @@ fi
#cpopt="-d . -r $server"
## create the configuration in the NXSConfigServer DB
stdopt="-r $server -o -e haspp02ch2:10000/p02/nxsconfigserver/haspp02ch2"
stdopt="-b -r $server -o -e haspp02ch2:10000/p02/nxsconfigserver/haspp02ch2"
tgopt="-b -r $server -o"
dsopt="-b -r $server $onlinexml -e haspp02ch2:10000/p02/nxsconfigserver/haspp02ch2"
cpopt="-r $server -o $onlinexml -e haspp02ch1:10000/p02/nxsconfigserver/haspp02ch1"
cpopt="-b -r $server -o $onlinexml -e haspp02ch2:10000/p02/nxsconfigserver/haspp02ch2"
## online.xml datasources
......@@ -40,7 +76,7 @@ nxscreate onlineds $dsopt
## default
nxscreate stdcomp -t default -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.2 $stdopt
nxscreate stdcomp -t default -m -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.2 $stdopt
## beamtime_id
......@@ -327,6 +363,17 @@ nxscreate onlinecp -c pilatus1m $cpopt
# # # # nxscreate onlinecp -c lmbd01 $cpopt
# ## set DefaultPreselectedComponents of NXSRecSelector/haspp02ch2
## set DefaultPreselectedComponents of NXSRecSelector/haspp02ch2
if ! [ -z $NXSPROPERTY ]; then
COMPONENTLIST="[\"source\",\"undulator\",\"beamtime_id\",\"dcm\",\"crl_lh\",\"crl_gp\",\"vfm\",\"vfm_gp\",\"hfm\",\"hfm_gp\",\"oh_slits\",\"slit1\",\"slit2\",\"slit3\",\"slit4\",\"pink_slits\",\"pinhole_lh\",\"pinhole_gp\",\"beamstop_lh\",\"beamstop_gp\",\"bpms\",\"laser\",\"observ\",\"flour_lh\",\"camera\",\"ruby\",\"fcirc\",\"ph_lh\",\"shutter\",\"sample_positioner_lh\",\"sample_positioner_gp\",\"detector_positioner_lh\",\"detector_positioner_gp\",\"pink_mirrors\",\"rot\"]"
if [ "$hname" == "haspp02ch2" ]; then
nxsetup change-prop -n DefaultPreselectedComponents -w $COMPONENTLIST NXSRecSelector/haspp02ch2
elif [ "$hname" == "haso228k" ]; then
echo "nxsetup change-prop -n DefaultPreselectedComponents -w $COMPONENTLIST NXSRecSelector/haspp02ch2"
fi
fi
# ## nxsetup -c -n DefaultPreselectedComponents -w "[\"source\",\"undulator\",\"beamtime_id\",\"dcm\",\"crl_lh\",\"crl_gp\",\"vfm\",\"vfm_gp\",\"hfm\",\"hfm_gp\",\"oh_slits\",\"slit1\",\"slit2\",\"slit3\",\"slit4\",\"pink_slits\",\"pinhole_lh\",\"pinhole_gp\",\"beamstop_lh\",\"beamstop_gp\",\"bpms\",\"laser\",\"observ\",\"flour_lh\",\"camera\",\"ruby\",\"fcirc\",\"ph_lh\",\"shutter\",\"sample_positioner_lh\",\"sample_positioner_gp\",\"detector_positioner_lh\",\"detector_positioner_gp\",\"pink_mirrors\",\"rot\"]" NXSRecSelector/haspp02ch2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment