Skip to content

Commit

Permalink
Merge pull request #4 from slactjohnson/mods_python
Browse files Browse the repository at this point in the history
Cleanup old laspython environment, add additonal (temporary) launchers
  • Loading branch information
slactjohnson authored Apr 29, 2022
2 parents 1221dd5 + f66b6d1 commit e2e6c10
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 28 deletions.
5 changes: 4 additions & 1 deletion conf.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions crixs_laspython
Original file line number Diff line number Diff line change
@@ -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" $@
10 changes: 10 additions & 0 deletions crixs_mods_conf.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions ip1_laspython
Original file line number Diff line number Diff line change
@@ -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" $@
10 changes: 10 additions & 0 deletions ip1_mods_conf.yml
Original file line number Diff line number Diff line change
@@ -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
50 changes: 25 additions & 25 deletions las/beamline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
4 changes: 2 additions & 2 deletions lasenv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2e6c10

Please sign in to comment.