From f66b6d14b4a6e7cf1051061629d9fe1300b791ab Mon Sep 17 00:00:00 2001 From: slactjohnson Date: Fri, 29 Apr 2022 09:40:47 -0700 Subject: [PATCH] Cleanup old laspython environment, add additonal (temporary) launchers for "mods" python sessions until we find a better way to do this in our standard hutchpython sessions. --- conf.yml | 5 ++++- crixs_laspython | 5 +++++ crixs_mods_conf.yml | 10 +++++++++ ip1_laspython | 5 +++++ ip1_mods_conf.yml | 10 +++++++++ las/beamline.py | 50 ++++++++++++++++++++++----------------------- lasenv | 4 ++-- 7 files changed, 61 insertions(+), 28 deletions(-) create mode 100755 crixs_laspython create mode 100644 crixs_mods_conf.yml create mode 100755 ip1_laspython create mode 100644 ip1_mods_conf.yml diff --git a/conf.yml b/conf.yml index a7b22ca..8ad818a 100644 --- a/conf.yml +++ b/conf.yml @@ -1,7 +1,10 @@ hutch: las ## Locate happi database -#db: /reg/g/pcds/pyps/apps/hutch-python/device_config/db.json +db: /reg/g/pcds/pyps/apps/hutch-python/device_config/db.json # Hutch-specific imports load: las.beamline + +# We has no daq +daq_type: nodaq diff --git a/crixs_laspython b/crixs_laspython new file mode 100755 index 0000000..2692110 --- /dev/null +++ b/crixs_laspython @@ -0,0 +1,5 @@ +#!/bin/bash +# Launch hutch-python with all devices +HERE=`dirname $(readlink -f $0)` +source "${HERE}/lasenv" +hutch-python --cfg "${HERE}/crixs_mods_conf.yml" $@ diff --git a/crixs_mods_conf.yml b/crixs_mods_conf.yml new file mode 100644 index 0000000..0463fd5 --- /dev/null +++ b/crixs_mods_conf.yml @@ -0,0 +1,10 @@ +hutch: crix_mods + +## Locate happi database +db: /reg/g/pcds/pyps/apps/hutch-python/device_config/db.json + +# Hutch-specific imports +load: las.beamline + +# We has no daq +daq_type: nodaq diff --git a/ip1_laspython b/ip1_laspython new file mode 100755 index 0000000..a25b3d5 --- /dev/null +++ b/ip1_laspython @@ -0,0 +1,5 @@ +#!/bin/bash +# Launch hutch-python with all devices +HERE=`dirname $(readlink -f $0)` +source "${HERE}/lasenv" +hutch-python --cfg "${HERE}/ip1_mods_conf.yml" $@ diff --git a/ip1_mods_conf.yml b/ip1_mods_conf.yml new file mode 100644 index 0000000..ecb0abf --- /dev/null +++ b/ip1_mods_conf.yml @@ -0,0 +1,10 @@ +hutch: ip1_mods + +## Locate happi database +db: /reg/g/pcds/pyps/apps/hutch-python/device_config/db.json + +# Hutch-specific imports +load: las.beamline + +# We has no daq +daq_type: nodaq diff --git a/las/beamline.py b/las/beamline.py index 3c7b1f5..25e1b87 100644 --- a/las/beamline.py +++ b/las/beamline.py @@ -6,28 +6,28 @@ from pcdsdevices.mv_interface import FltMvInterface -class SmarAct(FltMvInterface, EpicsMotor): - """ - Mike's MCS2 Motor Record with bonus PVs attached - """ - step_voltage = Cpt(EpicsSignal, ':STEP_VOLTAGE') - step_freq = Cpt(EpicsSignal, ':STEP_FREQ') - step_count = Cpt(EpicsSignal, ':STEP_COUNT') - step_fwd_cmd = Cpt(EpicsSignal, ':STEP_FORWARD') - step_rev_cmd = Cpt(EpicsSignal, ':STEP_REVERSE') - total_step_count = Cpt(EpicsSignal, ':TOTAL_STEP_COUNT') - step_clear_cmd = Cpt(EpicsSignal, ':CLEAR_COUNT') - scan_move_cmd = Cpt(EpicsSignal, ':SCAN_MOVE') - scan_pos = Cpt(EpicsSignal, ':SCAN_POS') - - -with safe_load('las motors'): - hole_m1 = SmarAct('LAS:MCS2:01:m1', name='hole_m1') - hole_m2 = SmarAct('LAS:MCS2:01:m2', name='hole_m2') - hole_m3 = SmarAct('LAS:MCS2:01:m3', name='hole_m3') - hole_m4 = SmarAct('LAS:MCS2:01:m4', name='hole_m4') - hole_m5 = SmarAct('LAS:MCS2:01:m5', name='hole_m5') - hole_m6 = SmarAct('LAS:MCS2:01:m6', name='hole_m6') - hole_m7 = SmarAct('LAS:MCS2:01:m7', name='hole_m7') - hole_m8 = SmarAct('LAS:MCS2:01:m8', name='hole_m8') - hole_m9 = SmarAct('LAS:MCS2:01:m9', name='hole_m9') +#class SmarAct(FltMvInterface, EpicsMotor): +# """ +# Mike's MCS2 Motor Record with bonus PVs attached +# """ +# step_voltage = Cpt(EpicsSignal, ':STEP_VOLTAGE') +# step_freq = Cpt(EpicsSignal, ':STEP_FREQ') +# step_count = Cpt(EpicsSignal, ':STEP_COUNT') +# step_fwd_cmd = Cpt(EpicsSignal, ':STEP_FORWARD') +# step_rev_cmd = Cpt(EpicsSignal, ':STEP_REVERSE') +# total_step_count = Cpt(EpicsSignal, ':TOTAL_STEP_COUNT') +# step_clear_cmd = Cpt(EpicsSignal, ':CLEAR_COUNT') +# scan_move_cmd = Cpt(EpicsSignal, ':SCAN_MOVE') +# scan_pos = Cpt(EpicsSignal, ':SCAN_POS') +# +# +#with safe_load('las motors'): +# hole_m1 = SmarAct('LAS:MCS2:01:m1', name='hole_m1') +# hole_m2 = SmarAct('LAS:MCS2:01:m2', name='hole_m2') +# hole_m3 = SmarAct('LAS:MCS2:01:m3', name='hole_m3') +# hole_m4 = SmarAct('LAS:MCS2:01:m4', name='hole_m4') +# hole_m5 = SmarAct('LAS:MCS2:01:m5', name='hole_m5') +# hole_m6 = SmarAct('LAS:MCS2:01:m6', name='hole_m6') +# hole_m7 = SmarAct('LAS:MCS2:01:m7', name='hole_m7') +# hole_m8 = SmarAct('LAS:MCS2:01:m8', name='hole_m8') +# hole_m9 = SmarAct('LAS:MCS2:01:m9', name='hole_m9') diff --git a/lasenv b/lasenv index 2bca345..ad16032 100755 --- a/lasenv +++ b/lasenv @@ -2,8 +2,8 @@ # Source this to load the full environment that hutch python uses # edit this line only -export CONDA_ENVNAME="pcds-2.0.1" -export CONDA_BASE="/reg/g/pcds/pyps/conda/py36" +export CONDA_ENVNAME="pcds-5.3.1" +export CONDA_BASE="/reg/g/pcds/pyps/conda/py39" export HUTCH="las" unset PYTHONPATH