Commit 4ab80b27 authored by Jan Kotanski's avatar Jan Kotanski
Browse files

Imported Upstream version 1.0.1

parent a8fcd8aa
Metadata-Version: 1.0
Name: nexdatas.extrasp02
Version: 1.0.0
Version: 1.0.1
Summary: nexus template components for P02
Home-page: http://github.com/nexdatas/
Author: Jan Kotanski
......
......@@ -19,7 +19,7 @@
""" nexus xml templates for P01"""
__version__ = "1.0.0"
__version__ = "1.0.1"
#: (:obj:`dict` <:obj:`str` , :obj:`dict` <:obj:`str` , :obj:`str` > >)
#: standatd component template variables
......
#!/bin/bash
## online.xml file as a first command-line parameter
if [[ -z $1 ]]; then
onlinexml=""
else
onlinexml=$1
fi
hname=$(hostname)
echo "hostname: $hname"
## NXSConfigServer name
if [ "$hname" == "haspp02ch2" ]; then
server="haspp02ch2:10000/p02/nxsconfigserver/haspp02ch2"
elif [ "$hname" == "haso228k" ]; then
server="p06/nxsconfigserver/haso228"
else
echo "Unknown host $hname"
exit -1
fi
## create the configuration on the local file system
#stdopt="-d . -r $server"
#tgopt=""
#dsopt="-d . -r $server"
#cpopt="-d . -r $server"
## create the configuration in the NXSConfigServer DB
stdopt="-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"
## online.xml datasources
nxscreate onlineds $dsopt
## default
nxscreate stdcomp -t default -c default longname "Hard X-Ray Diffraction Beamlines for Time Resolved Studies" shortname P02.2 $stdopt
## beamtime_id
nxscreate stdcomp -t beamtimeid -c beamtime_id shortname P02.2 $stdopt
## source
nxscreate tangods -v petra/globals/keyword -s source_energy -u haspp02oh1 -t 10000 -a Energy $tgopt
nxscreate tangods -v petra/globals/keyword -s source_current -u haspp02oh1 -t 10000 -a BeamCurrent $tgopt
nxscreate tangods -v petra/globals/keyword -s number_of_bunches -u haspp02oh1 -t 10000 -a NumberOfBunches $tgopt
nxscreate stdcomp -t source -c source beamcurrent source_current sourceenergy source_energy numberofbunches number_of_bunches $stdopt
## undulator
nxscreate tangods -v p02/undulator/1 -s insertion_taper -u haspp02oh1 -t 10000 -a Taper $tgopt
nxscreate tangods -v p02/undulator/1 -s insertion_gap -u haspp02oh1 -t 10000 -a Gap $tgopt
nxscreate tangods -v p02/undulator/1 -s insertion_harmonic -u haspp02oh1 -t 10000 -a Harmonic $tgopt
nxscreate tangods -v p02/undulator/1 -s insertion_energy -u haspp02oh1 -t 10000 -a Position $tgopt
nxscreate stdcomp -t undulator -c undulator gap gap_common taper insertion_taper dependstop distance distance 0 distanceoffset "0 0 -65.6" energy insertion_energy harmonic insertion_harmonic transformations transformations $stdopt
## gap_common
nxscreate stdcomp -t common2 -c gap dds insertion_gap ods gap $stdopt
## crl_lh
nxscreate stdcomp -p nxsextrasp02 -t crlstage -c crl_lh pitch crltilt_lh yaw crlyaw_lh x crly_lh y crlz_lh z crlx_lh $stdopt
## crl_gp
nxscreate stdcomp -p nxsextrasp02 -t crlstage -c crl_gp pitch crltilt_gp yaw crlyaw_gp x crly_gp y crlz_gp z crlx_gp $stdopt
## vfm
nxscreate stdcomp -p nxsextrasp02 -t fmirror -c vfm st vfm_st piup vfm_pi_up pidown vfm_pi_dw beup vfm_be_up bedown vfm_be_dw y vfm_z pitch vfm_tilt curvature vfm_curvature ellipticity vfm_ellipticity $stdopt
## vfm_gp
nxscreate stdcomp -p nxsextrasp02 -t fmirror -c vfm_gp st vfm_st_gp piup vfm_pi_up_gp pidown vfm_pi_dw_gp beup vfm_be_up_gp bedown vfm_be_dw_gp y vfm_gp_z pitch vfm_gp_tilt curvature vfm_gp_curvature ellipticity vfm_gp_ellipticity $stdopt
## hfm
nxscreate stdcomp -p nxsextrasp02 -t fmirror -c hfm st hfm_st piup hfm_pi_up pidown hfm_pi_dw beup hfm_be_up bedown hfm_be_dw y hfm_z pitch hfm_tilt curvature hfm_curvature ellipticity hfm_ellipticity $stdopt
## hfm_gp
nxscreate stdcomp -p nxsextrasp02 -t fmirror -c hfm_gp st hfm_st_gp piup hfm_pi_up_gp pidown hfm_pi_dw_gp beup hfm_be_up_gp bedown hfm_be_dw_gp y hfm_gp_z pitch hfm_gp_tilt curvature hfm_gp_curvature ellipticity hfm_gp_ellipticity $stdopt
# ## 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
# ## dcmbragg_common
# nxscreate stdcomp -t common2 -c dcmbragg dds oh1_dcm_bragg ods dcmbragg_position $stdopt
## dcm
nxscreate stdcomp -t dcm -c dcm crystal dcm_mono_crystal braggangle dcm_bragg dcmdevice haspp02oh1:10000/p02/dcmener/oh.01 energy mnchrmtr lat oh1_mot08 par2 dcm_parallel perp2 dcm_perp pitch2 c2pitch roll2 c2roll unitcalibration dcm_mono_unitcalibration theta dcm_bragg table oh1_mot03 jack1 oh1_mot03 jack2 oh1_mot04 jack3 oh1_mot07 yaw oh1_mot08 $stdopt
#nxscreate stdcomp -t dcm -c dcm crystal dcm_mono_crystal braggangle dcmbragg_common dcmdevice haspp01oh1:10000/p01/dcmener/oh.01 energyfmb energyfmb exitoffset fmb_exitoffset lat oh1_dcm_lat par2 oh1_dcm_para perp2 oh1_dcm_perp pitch2 oh1_dcm_pitch roll2 oh1_dcm_roll2 unitcalibration dcm_mono_unitcalibration theta dcmbragg_common table oh1_dcm_z jack1 oh1_03 jack2 oh1_04 jack3 oh1_07 $stdopt
nxscreate tangods -v p01/dcmener/oh.01 -s dcm_mono_crystal -u haspp01oh1 -t 10000 -a Crystal $tgopt
nxscreate tangods -v p01/dcmmotor/oh.01 -s dcm_mono_unitcalibration -u haspp01oh1 -t 10000 -a UnitCalibration $tgopt
# ## energy_all
# # nxscreate comp -n '/entry$var.serialno:NXentry/instrument/dcm_mono:NXmonochromator/energy' energy_all -g INIT -t NX_FLOAT64 -k -u eV -m $tgopt
# # nxscreate stdcomp -p nxsextrasp06 -t energyall -c energy_all mononame dcm energyall energy_p01 mnchrmtr energy_position $stdopt
# ## energy_all
# # nxscreate comp -n '/entry$var.serialno:NXentry/instrument/dcm_mono:NXmonochromator/energy' energy_all -g INIT -t NX_FLOAT64 -k -u eV -m $tgopt
# #nxscreate stdcomp -p nxsextrasp06 -t energyall -c energy_all mononame dcm energyall energy_p01 mnchrmtr energy_position $stdopt
## oh_slit1
nxscreate stdcomp -t slit -c oh_slit1 ygap slt1vgap yoffset slt1offs $stdopt
## oh_slit2
nxscreate stdcomp -t slit -c oh_slit2 ygap slt2vgap yoffset slt2offs left slt2left right slt2right $stdopt
## oh_slits
nxscreate stdcomp -t collect2 -c oh_slits first oh_slit1 second oh_slit2 $stdopt
## slit1
nxscreate stdcomp -t slit -c slit1 left s1_left right s1_right top s1_top bottom s1_bottom $stdopt
## slit2
nxscreate stdcomp -t slit -c slit2 left s2_left right s2_right top s2_top bottom s2_bottom $stdopt
## slit3
nxscreate stdcomp -t slit -c slit3 left s3_left right s3_right top s3_top bottom s3_bottom $stdopt
## slit4
nxscreate stdcomp -t slit -c slit4 left s4_left right s4_right top s4_top bottom s4_bottom $stdopt
## pink_slit1
nxscreate stdcomp -t slit -c pink_slit1 xgap oh1_mot13 ygap oh1_mot12 dependstop distance distance 29 distanceoffset "0 0 -73.6" transformations transformations $stdopt
## pink_slit2
nxscreate stdcomp -t slit -c pink_slit2 xgap oh1_mot15 ygap oh1_mot14 $stdopt
## pink_slits
nxscreate stdcomp -t collect2 -c pink_slits first pink_slit1 second pink_slit2 $stdopt
## pinhole_lh
nxscreate stdcomp -t pinhole -c pinhole_lh x piny_lh y pinz_lh $stdopt
## pinhole_gp
nxscreate stdcomp -t pinhole -c pinhole_gp x piny_gp y pinz_gp $stdopt
## beamstop_lh
nxscreate stdcomp -t beamstop -c beamstop_lh x bstopy_lh y bstopz_lh $stdopt
## beamstop_gp
nxscreate stdcomp -t beamstop -c beamstop_gp x bstopy_gp y bstopz_gp $stdopt
## bpm1
nxscreate stdcomp -t qbpm -c bpm1 foil bpm1_foil foilpos oh1_mot10 foilposdict '{"Ti": 43, "Ni": 23, "Out": 3}' $stdopt
## bpm2
nxscreate stdcomp -t qbpm -c bpm2 foil bpm2_foil foilpos oh1_mot11 foilposdict '{"Ti": 43, "Ni": 23, "Out": 3}' $stdopt
## bpms
nxscreate stdcomp -t collect2 -c bpms first bpm1 second bpm2 $stdopt
## laser
nxscreate stdcomp -p nxsextrasp02 -t laser -c laser xup laser_up_y yup laser_up_z focusup laser_up_focus xdown laser_down_y ydown laser_down_z focusdown laser_down_focus $stdopt
## observ
nxscreate stdcomp -p nxsextrasp02 -t observer -c observ xup observ_up_y yup observ_up_z focusup observ_up_foc xdown observ_down_y ydown observ_down_z focusdown observ_down_foc $stdopt
## flour_lh
nxscreate stdcomp -p nxsextrasp02 -t detstage -c flour_lh x floury_lh y flourz_lh z flourx_lh $stdopt
## camera
nxscreate stdcomp -p nxsextrasp02 -t detstage -c camera x camy_gp y camz_gp z camx_gp $stdopt
## ruby
nxscreate stdcomp -p nxsextrasp02 -t insstage -c ruby x rby_gp y rbz_gp z rbx_gp topdependson x $stdopt
## fcirc
nxscreate stdcomp -p nxsextrasp02 -t insstage -c fcirc x fcirc_y y fcirc_z z fcirc_x pitch fcirc_tilt yaw fcirc_yaw $stdopt
## ph_lh
nxscreate stdcomp -p nxsextrasp02 -t insstage -c ph_lh x phy_lh y phz_lh ydependson "" pitch phtilt_lh yaw phyaw_lh $stdopt
## shutter
nxscreate stdcomp -p nxsextrasp02 -t shutter -c shutter y eh2b_mot29 $stdopt
## sample_positioner_lh
nxscreate stdcomp -p nxsextrasp02 -t samplepositioner -c sample_positioner_lh x samy_lh y samz_lh z samx_lh xcen ceny_lh zcen cenx_lh omega omega_lh sname sample_lh $stdopt
## sample_positioner_gp
nxscreate stdcomp -p nxsextrasp02 -t samplepositioner -c sample_positioner_gp x samy_gp y samz_gp z samx_gp xcen ceny_gp zcen cenx_gp omega omega_gp sname sample_gp $stdopt
## detector_positioner_lh
nxscreate stdcomp -p nxsextrasp02 -t detpositioner -c detector_positioner_lh x dety_lh z detx_lh omega detom_lh odet deto_lh tdet dett_lh detname detector_lh $stdopt
## detector_positioner_gp
nxscreate stdcomp -p nxsextrasp02 -t detpositioner -c detector_positioner_gp x dety_gp z detx_gp odetdependson z_det odet deto_gp tdet dett_gp detname detector_gp $stdopt
## pink_mirror1
nxscreate stdcomp -p nxsextrasp02 -t mirror -c pink_mirror1 x oh1_mot24 y oh1_mot20 pitch oh1_mot27 $stdopt
## pink_mirror2
nxscreate stdcomp -p nxsextrasp02 -t mirror -c pink_mirror2 x oh1_mot30 y oh1_mot28 pitch oh1_mot31 $stdopt
## pink_mirrors
nxscreate stdcomp -t collect2 -c pink_mirrors first pink_mirror1 second pink_mirror2 $stdopt
## rot
nxscreate stdcomp -p nxsextrasp02 -t rot -c rot offaxisup rot_offaxis_up offaxisdown rot_offaxis_dw onaxisup rot_onaxis_up onaxisdown rot_onaxis_dw $stdopt
# ## pe_stage
# nxscreate stdcomp -p nxsextrasp02 -t pestage -c pe_stage x eh1b_mot16 z eh1b_mot15 zlarge eh1b_mot14 $stdopt
# ## goniometer
# 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
# ## 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
# ## 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
# ## hab_positioner
# nxscreate stdcomp -p nxsextrasp02 -t samplestage -c hab_positioner x eh1a_mot21 y eh1a_mot22 z eh1a_mot20 prefix hab_ dependson z $stdopt
## sis3302_1
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/sis3302:NXdetector/collection:NXcollection/' -v sis3302_ -f1 -l1 -g STEP -t NX_FLOAT64 -k -m -c SPECTRUM $tgopt
## oh1_cXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v oh1_c -f1 -l32 -g STEP -t NX_FLOAT64 -k $tgopt
## eh2a_cXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh2a_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
## oh1_vfcXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v oh1_vfc -f1 -l8 -g STEP -t NX_FLOAT64 -k $tgopt
## eh2a_vfcXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh2a_vfc -f1 -l16 -g STEP -t NX_FLOAT64 -k $tgopt
## eh2b_vfcXY
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/detector:NXdetector/collection:NXcollection/' -v eh2b_vfc -f1 -l8 -g STEP -t NX_FLOAT64 -k $tgopt
## eh2a_mca
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/eh2a_mca01:NXdetector/data' eh2a_mca01 -g STEP -t NX_FLOAT64 -i -c SPECTRUM $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/eh2a_mca02:NXdetector/data' eh2a_mca02 -g STEP -t NX_FLOAT64 -i -c SPECTRUM $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/eh2a_mca03:NXdetector/data' eh2a_mca03 -g STEP -t NX_FLOAT64 -i -c SPECTRUM $tgopt
nxscreate comp -n '/entry$var.serialno:NXentry/instrument/eh2a_mca04:NXdetector/data' eh2a_mca04 -g STEP -t NX_FLOAT64 -i -c SPECTRUM $tgopt
# ## pe_detector
# nxscreate onlinecp -c pe_detector $cpopt
## pilatus1m
nxscreate onlinecp -c pilatus1m $cpopt
# # # # ## lmbd01
# # # # nxscreate onlinecp -c lmbd01 $cpopt
# ## set DefaultPreselectedComponents of NXSRecSelector/haspp02ch2
# ## 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
......@@ -63,13 +63,13 @@ SETUPDATA = dict(
[
'scripts/nxsconf_haspp02ch1a.sh',
'scripts/nxsconf_haspp02ch1.sh',
# 'scripts/nxsconf_haspp02ch2.sh',
'scripts/nxsconf_haspp02ch2.sh',
]),
('share/nxstools',
[
'xml/online_haspp02ch1a.xml',
'xml/online_haspp02ch1.xml',
# 'xml/online_haspp02ch2.xml',
'xml/online_haspp02ch2.xml',
])
],
command_options={
......
This diff is collapsed.
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