From 8fd1dafaec807196a269ce691fcfd03b5e2ea5f8 Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Mon, 4 Nov 2019 12:05:37 -0800 Subject: [PATCH 1/7] Changed devictDicts.py into JSON format and allowed questionnaire_tools to read it --- scripts/deviceDict.json | 1 + scripts/deviceDicts.py | 370 ------------------------------------ scripts/questionnaire_tools | 5 +- 3 files changed, 3 insertions(+), 373 deletions(-) create mode 100644 scripts/deviceDict.json delete mode 100644 scripts/deviceDicts.py diff --git a/scripts/deviceDict.json b/scripts/deviceDict.json new file mode 100644 index 00000000..e1d279ca --- /dev/null +++ b/scripts/deviceDict.json @@ -0,0 +1 @@ +{"fastDiode":{"pcdssetup-digitized-setup":[{"device":"Agilent","rate":"8 Gs/s","purpose":"Fast Diode"}]},"JJslit":{"pcdssetup-motors-setup":[{"purpose":"slit vertical gap","name":"jj_vg","stageidentity":"jj_vg"},{"purpose":"slit horizontal offset","name":"jj_ho","stageidentity":"jj_ho"},{"purpose":"slit vertical offset","name":"jj_vo","stageidentity":"jj_vo"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"}]},"vonHamos_small":{"pcdssetup-motors-setup":[{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"}],"pcdssetup-areadet-setup":[{"type":"Epix100","alias":"epix_1"}]},"vonHamos":{"pcdssetup-motors-setup":[{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"}],"pcdssetup-areadet-setup":[{"type":"Epix100","alias":"epix_1"}]},"CXI_stdCfg":{"pcdssetup-motors-setup":[{"purpose":"Laser incoupling mirror X","name":"laser_incoupling_mirror_x","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:25"},{"purpose":"Laser incoupling mirror Y","name":"laser_incoupling_mirror_y","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:28"},{"purpose":"Laser incoupling mirror Z","name":"laser_incoupling_mirror_z","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:27"},{"purpose":"Laser incoupling lens X","name":"laser_incoupling_lens_x","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:26"},{"purpose":"sc1 laser mirror yaw","name":"laser_sc1mirror1_yaw","stageidentity":"pico","invac":"Yes","location":"CXI SC1","pvbase":"CXI:LAS:PIC:03"},{"purpose":"sc1 laser mirror pitch","name":"laser_sc1mirror1_pitch","stageidentity":"pico","invac":"Yes","location":"CXI SC1","pvbase":"CXI:LAS:PIC:02"},{"purpose":"Side Illumination X","name":"illumination_x","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:09"},{"purpose":"Side Illumination Y","name":"illumination_y","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:17"},{"purpose":"Side Illumination Z","name":"illumination_z","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:19"},{"purpose":"Sample Diode","name":"sample_x","stageidentity":"VT-50 (long)","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:02"},{"purpose":"SC1 fast diode piezo motors","name":"sc1diode_y","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:09"},{"purpose":"SC1 Questar zoom","name":"Sc1Questar_zoom","stageidentity":"Questar","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:01"},{"purpose":"SC1 Questar X","name":"Sc1Questar_x","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:03"},{"purpose":"SC1 Questar Y","name":"Sc1Questar_y","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:04"},{"purpose":"SC1 Objective X","name":"sc1objective_x","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:06"},{"purpose":"SC1 Objective Y","name":"sc1objective_y","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:05"},{"purpose":"SC1 Objective top z","name":"sc1objective_z1","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:08"},{"purpose":"SC1 Objective bot z","name":"sc1objective_z2","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:07"},{"purpose":"SC1 PI1 X","name":"pi1_x","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:PI1:MMS:01"},{"purpose":"SC1 PI1 Y","name":"pi1_y","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:PI1:MMS:02"},{"purpose":"SC1 PI1 Z","name":"pi1_z","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:PI1:MMS:03"},{"purpose":"SC1 PI1 Fine X","name":"pi1_fine_x","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:USR:MMS:01"},{"purpose":"SC1 PI1 Fine Y","name":"pi1_fine_y","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:USR:MMS:02"},{"purpose":"SC1 PI1 Fine Z","name":"pi1_fine_z","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:USR:MMS:03"},{"purpose":"SC1 LED","name":"sc1led_stick","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:SC1:MMS:18"},{"purpose":"SC1 Aperture 1 X","name":"sc1ap1_x","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:05"},{"purpose":"SC1 Aperture 1 Y","name":"sc1ap1_y","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:06"},{"purpose":"SC1 Aperture 2 X","name":"sc1ap2_x","stageidentity":"piezo","invac":"Yes","location":"CXI SC1"," pvbase":"CXI:SC1:MZM:07"},{"purpose":"SC1 Aperture 2 Y","name":"sc1ap2_y","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:08"},{"purpose":"SC1 Ta Jaws +X blade","name":"sc1ap0_s","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:01"},{"purpose":"SC1 Ta Jaws -X blade","name":"sc1ap0_n","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:14"},{"purpose":"SC1 Ta Jaws +Y blade","name":"sc1ap0_u","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:02"},{"purpose":"SC1 Ta Jaws -Y blade","name":"sc1ap0_d","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:04"},{"purpose":"Sample Y","name":"sample_y","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:18"},{"purpose":"Sample Z","name":"sample_z","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:20"},{"purpose":"Newport Rotational Motor","name":"opo_wp","stageidentity":"Newport","connection":"On movable optical table for OPO","pvbase":"CXI:USR:MMN:"}],"pcdssetup-digitized-setup":[{"device":"Agilent","rate":"8 Gs/s","purpose":"Fast Diode"}],"pcdssetup-areadet-setup":[{"type":"CSPAD-2.3M","alias":"DscCsPad","record":"DSC rack"}],"pcdssetup-camera-setup":[{"type":"Opal-1k","record":"DAQ","trigger":"120","purpose":"Time Tool","alias":"TimeTool"},{"type":"Opal-1k","alias":"Sc1Questar","record":"DAQ","trigger":"120","purpose":"Questar camera"},{"type":"Uniq","record":"vewing only","trigger":"free run","purpose":"Side Viewing"},{"delay":"TBD","purpose":"X-ray simulator EVR for LeCroy","eventcode":"40;"},{"delay":"TBD","purpose":"X-ray simulator EVR for LeCroy","eventcode":"40;"}],"pcdssetup-trig-setup":[]}} diff --git a/scripts/deviceDicts.py b/scripts/deviceDicts.py deleted file mode 100644 index e1a22358..00000000 --- a/scripts/deviceDicts.py +++ /dev/null @@ -1,370 +0,0 @@ -from copy import deepcopy - -class deviceDict(): - def __init__(self, hutch=None): - self.deviceDict={} - # - fastDiode={} - fastDiode['device']='Agilent' - fastDiode['rate']='8 Gs/s' - fastDiode['purpose']='Fast Diode' - # - timeToolOpal={} - timeToolOpal['type']='Opal-1k' - timeToolOpal['record']='DAQ' - timeToolOpal['trigger']='120' - timeToolOpal['purpose']='Time Tool' - # - self.deviceDict['fastDiode']={} - self.deviceDict['fastDiode']['pcdssetup-digitized-setup']=[] - self.deviceDict['fastDiode']['pcdssetup-digitized-setup'].append(fastDiode) - # - # - # - self.deviceDict['JJslit']={} - self.deviceDict['JJslit']['pcdssetup-motors-setup']=[] - for motorName in {'jj_vg', 'jj_hg', 'jj_vo', 'jj_ho'}: - deviceMotor={} - if motorName=='jj_vg': deviceMotor['purpose']='slit vertical gap' - elif motorName=='jj_hg': deviceMotor['purpose']='slit horizontal gap' - elif motorName=='jj_vo': deviceMotor['purpose']='slit vertical offset' - elif motorName=='jj_ho': deviceMotor['purpose']='slit horizontal offset' - deviceMotor['name']=motorName - deviceMotor['stageidentity']=motorName - if hutch is not None: - deviceMotor['pvbase']='%s:USR:MMS:'%hutch.upper() - self.deviceDict['JJslit']['pcdssetup-motors-setup'].append(deviceMotor) - # - # - # - self.deviceDict['vonHamos_small']={} - self.deviceDict['vonHamos_small']['pcdssetup-motors-setup']=[] - self.deviceDict['vonHamos_small']['pcdssetup-areadet-setup']=[] - epixDet={} - epixDet['type']='Epix100' - epixDet['alias']='epix_1' - self.deviceDict['vonHamos_small']['pcdssetup-areadet-setup'].append(epixDet) - for motorName in {'vHs_v', 'vHs_h', 'vHs_r'}: - deviceMotor['name']=motorName - deviceMotor['stageidentity']=motorName - if motorName=='vHs_v': deviceMotor['purpose']='von Hamos common vertical' - elif motorName=='vHs_h': deviceMotor['purpose']='von Hamos common horizontal' - elif motorName=='vHs_r': deviceMotor['purpose']='von Hamos common rotation' - if hutch is not None: - deviceMotor['pvbase']='%s:USR:MMS:'%hutch.upper() - self.deviceDict['vonHamos_small']['pcdssetup-motors-setup'].append(deviceMotor) - # - # - # - self.deviceDict['vonHamos']={} - self.deviceDict['vonHamos']['pcdssetup-motors-setup']=[] - self.deviceDict['vonHamos']['pcdssetup-areadet-setup']=[] - epixDet={} - epixDet['type']='Epix100' - epixDet['alias']='epix_1' - self.deviceDict['vonHamos']['pcdssetup-areadet-setup'].append(epixDet) - for motorName in {'vH_v', 'vH_h', 'vH_r'}: - deviceMotor['name']=motorName - deviceMotor['stageidentity']=motorName - if motorName=='vHs_v': deviceMotor['purpose']='von Hamos common vertical' - elif motorName=='vHs_h': deviceMotor['purpose']='von Hamos common horizontal' - elif motorName=='vHs_r': deviceMotor['purpose']='von Hamos common rotation' - if hutch is not None: - deviceMotor['pvbase']='%s:USR:MMS:'%hutch.upper() - self.deviceDict['vonHamos']['pcdssetup-motors-setup'].append(deviceMotor) - # - # - # - self.deviceDict['CXI_stdCfg']={} - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup']=[] - motor={} - motor['purpose']='Laser incoupling mirror X' - motor['name']='laser_incoupling_mirror_x' - motor['stageidentity']='VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:25' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Laser incoupling mirror Y' - motor['name'] = 'laser_incoupling_mirror_y' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:28' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Laser incoupling mirror Z' - motor['name'] = 'laser_incoupling_mirror_z' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:27' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Laser incoupling lens X' - motor['name'] = 'laser_incoupling_lens_x' - motor['stageidentity'] = 'VT-21' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:26' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'sc1 laser mirror yaw' - motor['name'] = 'laser_sc1mirror1_yaw' - motor['stageidentity'] = 'pico' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:LAS:PIC:03' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'sc1 laser mirror pitch' - motor['name'] = 'laser_sc1mirror1_pitch' - motor['stageidentity'] = 'pico' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:LAS:PIC:02' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Side Illumination X' - motor['name'] = 'illumination_x' - motor['stageidentity'] = 'VT-21' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:09' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Side Illumination Y' - motor['name'] = 'illumination_y' - motor['stageidentity'] = 'VT-21' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:17' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Side Illumination Z' - motor['name'] = 'illumination_z' - motor['stageidentity'] = 'VT-21' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:19' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Sample Diode' - motor['name'] = 'sample_x' - motor['stageidentity'] = 'VT-50 (long)' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:02' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 fast diode piezo motors' - motor['name'] = 'sc1diode_y' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:09' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Questar zoom' - motor['name'] = 'Sc1Questar_zoom' - motor['stageidentity'] = 'Questar' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:01' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Questar X' - motor['name'] = 'Sc1Questar_x' - motor['stageidentity'] = 'VT-21' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:03' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Questar Y' - motor['name'] = 'Sc1Questar_y' - motor['stageidentity'] = 'VT-21' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:04' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Objective X' - motor['name'] = 'sc1objective_x' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:06' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Objective Y' - motor['name'] = 'sc1objective_y' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:05' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Objective top z' - motor['name'] = 'sc1objective_z1' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:08' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Objective bot z' - motor['name'] = 'sc1objective_z2' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:07' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 PI1 X' - motor['name'] = 'pi1_x' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:PI1:MMS:01' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 PI1 Y' - motor['name'] = 'pi1_y' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:PI1:MMS:02' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 PI1 Z' - motor['name'] = 'pi1_z' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:PI1:MMS:03' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 PI1 Fine X' - motor['name'] = 'pi1_fine_x' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:01' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 PI1 Fine Y' - motor['name'] = 'pi1_fine_y' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:02' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 PI1 Fine Z' - motor['name'] = 'pi1_fine_z' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:03' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 LED' - motor['name'] = 'sc1led_stick' - motor['stageidentity'] = 'IMS smart motor' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MMS:18' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Aperture 1 X' - motor['name'] = 'sc1ap1_x' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:05' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Aperture 1 Y' - motor['name'] = 'sc1ap1_y' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:06' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Aperture 2 X' - motor['name'] = 'sc1ap2_x' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor[' pvbase'] = 'CXI:SC1:MZM:07' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Aperture 2 Y' - motor['name'] = 'sc1ap2_y' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:08' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Ta Jaws +X blade' - motor['name'] = 'sc1ap0_s' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:01' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Ta Jaws -X blade' - motor['name'] = 'sc1ap0_n' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:14' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Ta Jaws +Y blade' - motor['name'] = 'sc1ap0_u' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:02' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'SC1 Ta Jaws -Y blade' - motor['name'] = 'sc1ap0_d' - motor['stageidentity'] = 'piezo' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:SC1:MZM:04' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Sample Y' - motor['name'] = 'sample_y' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:18' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Sample Z' - motor['name'] = 'sample_z' - motor['stageidentity'] = 'VT-50' - motor['invac'] = 'Yes' - motor['location'] = 'CXI SC1' - motor['pvbase'] = 'CXI:USR:MMS:20' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor); motor={} - motor['purpose'] = 'Newport Rotational Motor' - motor['name'] = 'opo_wp' - motor['stageidentity'] = 'Newport' - motor['connection'] = 'On movable optical table for OPO' - motor['pvbase'] = 'CXI:USR:MMN:' - self.deviceDict['CXI_stdCfg']['pcdssetup-motors-setup'].append(motor) - - self.deviceDict['CXI_stdCfg']['pcdssetup-digitized-setup']=[] - self.deviceDict['CXI_stdCfg']['pcdssetup-digitized-setup'].append(fastDiode) - - self.deviceDict['CXI_stdCfg']['pcdssetup-areadet-setup']=[] - det={} - det['type']='CSPAD-2.3M' - det['alias']='DscCsPad' - det['record']='DSC rack' - self.deviceDict['CXI_stdCfg']['pcdssetup-areadet-setup'].append(det) - - self.deviceDict['CXI_stdCfg']['pcdssetup-camera-setup']=[] - det=deepcopy(timeToolOpal) - det['alias']='TimeTool' - self.deviceDict['CXI_stdCfg']['pcdssetup-camera-setup'].append(det); det={} - det['type']='Opal-1k' - det['alias']='Sc1Questar' - det['record']='DAQ' - det['trigger']='120' - det['purpose']='Questar camera' - self.deviceDict['CXI_stdCfg']['pcdssetup-camera-setup'].append(det); det={} - det['type']='Uniq' - det['record']='vewing only' - det['trigger']='free run' - det['purpose']='Side Viewing' - self.deviceDict['CXI_stdCfg']['pcdssetup-camera-setup'].append(det) - - self.deviceDict['CXI_stdCfg']['pcdssetup-trig-setup']=[] - trigger={} - trigger['delay']='894285.7' - trigger['width']='1000' - trigger['pvbase']='CXI:R52:EVR:01:TRIG2' - trigger['purpose']='X-ray simulator EVR for Acqiris' - trigger['polarity']='positive' - self.deviceDict['CXI_stdCfg']['pcdssetup-camera-setup'].append(trigger) - trigger['eventcode']='40;' - trigger['delay']='TBD' - trigger['purpose']='X-ray simulator EVR for LeCroy' - trigger.pop('width',None) - trigger.pop('polarity',None) - trigger.pop('pvbase',None) - self.deviceDict['CXI_stdCfg']['pcdssetup-camera-setup'].append(trigger) - - - def getDeviceDict(self): - return self.deviceDict diff --git a/scripts/questionnaire_tools b/scripts/questionnaire_tools index c45b8fde..3a8f7560 100755 --- a/scripts/questionnaire_tools +++ b/scripts/questionnaire_tools @@ -1,7 +1,7 @@ #!/reg/g/pcds/pyps/conda/py36/envs/pcds-1.2.5/bin/python import sys from psdm_qs_cli import QuestionnaireClient -from deviceDicts import deviceDict +import json import argparse class QuestionnaireTools(): @@ -9,8 +9,7 @@ class QuestionnaireTools(): def __init__(self, **kwargs): self.qc = QuestionnaireClient(**kwargs) self.exp_dict = self.qc.getExpName2URAWIProposalIDs() - dd = deviceDict() - self.deviceDict = dd.getDeviceDict() + self.deviceDict = json.loads(open("deviceDict.json").read()) self.allowedLocations=["Hutch-main experimental", "Hutch-downbeam area", "XPP goniometer", From d4f836c11ba97be52362130f62c67699b1f0db8e Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Tue, 5 Nov 2019 15:28:26 -0800 Subject: [PATCH 2/7] Pretty print deviceDict.json --- scripts/deviceDict.json | 417 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 416 insertions(+), 1 deletion(-) diff --git a/scripts/deviceDict.json b/scripts/deviceDict.json index e1d279ca..081519c1 100644 --- a/scripts/deviceDict.json +++ b/scripts/deviceDict.json @@ -1 +1,416 @@ -{"fastDiode":{"pcdssetup-digitized-setup":[{"device":"Agilent","rate":"8 Gs/s","purpose":"Fast Diode"}]},"JJslit":{"pcdssetup-motors-setup":[{"purpose":"slit vertical gap","name":"jj_vg","stageidentity":"jj_vg"},{"purpose":"slit horizontal offset","name":"jj_ho","stageidentity":"jj_ho"},{"purpose":"slit vertical offset","name":"jj_vo","stageidentity":"jj_vo"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"}]},"vonHamos_small":{"pcdssetup-motors-setup":[{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"}],"pcdssetup-areadet-setup":[{"type":"Epix100","alias":"epix_1"}]},"vonHamos":{"pcdssetup-motors-setup":[{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"},{"purpose":"von Hamos common rotation","name":"vH_v","stageidentity":"vH_v"}],"pcdssetup-areadet-setup":[{"type":"Epix100","alias":"epix_1"}]},"CXI_stdCfg":{"pcdssetup-motors-setup":[{"purpose":"Laser incoupling mirror X","name":"laser_incoupling_mirror_x","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:25"},{"purpose":"Laser incoupling mirror Y","name":"laser_incoupling_mirror_y","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:28"},{"purpose":"Laser incoupling mirror Z","name":"laser_incoupling_mirror_z","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:27"},{"purpose":"Laser incoupling lens X","name":"laser_incoupling_lens_x","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:26"},{"purpose":"sc1 laser mirror yaw","name":"laser_sc1mirror1_yaw","stageidentity":"pico","invac":"Yes","location":"CXI SC1","pvbase":"CXI:LAS:PIC:03"},{"purpose":"sc1 laser mirror pitch","name":"laser_sc1mirror1_pitch","stageidentity":"pico","invac":"Yes","location":"CXI SC1","pvbase":"CXI:LAS:PIC:02"},{"purpose":"Side Illumination X","name":"illumination_x","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:09"},{"purpose":"Side Illumination Y","name":"illumination_y","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:17"},{"purpose":"Side Illumination Z","name":"illumination_z","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:19"},{"purpose":"Sample Diode","name":"sample_x","stageidentity":"VT-50 (long)","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:02"},{"purpose":"SC1 fast diode piezo motors","name":"sc1diode_y","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:09"},{"purpose":"SC1 Questar zoom","name":"Sc1Questar_zoom","stageidentity":"Questar","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:01"},{"purpose":"SC1 Questar X","name":"Sc1Questar_x","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:03"},{"purpose":"SC1 Questar Y","name":"Sc1Questar_y","stageidentity":"VT-21","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:04"},{"purpose":"SC1 Objective X","name":"sc1objective_x","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:06"},{"purpose":"SC1 Objective Y","name":"sc1objective_y","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:05"},{"purpose":"SC1 Objective top z","name":"sc1objective_z1","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:08"},{"purpose":"SC1 Objective bot z","name":"sc1objective_z2","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MMS:07"},{"purpose":"SC1 PI1 X","name":"pi1_x","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:PI1:MMS:01"},{"purpose":"SC1 PI1 Y","name":"pi1_y","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:PI1:MMS:02"},{"purpose":"SC1 PI1 Z","name":"pi1_z","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:PI1:MMS:03"},{"purpose":"SC1 PI1 Fine X","name":"pi1_fine_x","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:USR:MMS:01"},{"purpose":"SC1 PI1 Fine Y","name":"pi1_fine_y","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:USR:MMS:02"},{"purpose":"SC1 PI1 Fine Z","name":"pi1_fine_z","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:USR:MMS:03"},{"purpose":"SC1 LED","name":"sc1led_stick","stageidentity":"IMS smart motor","location":"CXI SC1","pvbase":"CXI:SC1:MMS:18"},{"purpose":"SC1 Aperture 1 X","name":"sc1ap1_x","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:05"},{"purpose":"SC1 Aperture 1 Y","name":"sc1ap1_y","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:06"},{"purpose":"SC1 Aperture 2 X","name":"sc1ap2_x","stageidentity":"piezo","invac":"Yes","location":"CXI SC1"," pvbase":"CXI:SC1:MZM:07"},{"purpose":"SC1 Aperture 2 Y","name":"sc1ap2_y","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:08"},{"purpose":"SC1 Ta Jaws +X blade","name":"sc1ap0_s","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:01"},{"purpose":"SC1 Ta Jaws -X blade","name":"sc1ap0_n","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:14"},{"purpose":"SC1 Ta Jaws +Y blade","name":"sc1ap0_u","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:02"},{"purpose":"SC1 Ta Jaws -Y blade","name":"sc1ap0_d","stageidentity":"piezo","invac":"Yes","location":"CXI SC1","pvbase":"CXI:SC1:MZM:04"},{"purpose":"Sample Y","name":"sample_y","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:18"},{"purpose":"Sample Z","name":"sample_z","stageidentity":"VT-50","invac":"Yes","location":"CXI SC1","pvbase":"CXI:USR:MMS:20"},{"purpose":"Newport Rotational Motor","name":"opo_wp","stageidentity":"Newport","connection":"On movable optical table for OPO","pvbase":"CXI:USR:MMN:"}],"pcdssetup-digitized-setup":[{"device":"Agilent","rate":"8 Gs/s","purpose":"Fast Diode"}],"pcdssetup-areadet-setup":[{"type":"CSPAD-2.3M","alias":"DscCsPad","record":"DSC rack"}],"pcdssetup-camera-setup":[{"type":"Opal-1k","record":"DAQ","trigger":"120","purpose":"Time Tool","alias":"TimeTool"},{"type":"Opal-1k","alias":"Sc1Questar","record":"DAQ","trigger":"120","purpose":"Questar camera"},{"type":"Uniq","record":"vewing only","trigger":"free run","purpose":"Side Viewing"},{"delay":"TBD","purpose":"X-ray simulator EVR for LeCroy","eventcode":"40;"},{"delay":"TBD","purpose":"X-ray simulator EVR for LeCroy","eventcode":"40;"}],"pcdssetup-trig-setup":[]}} +{ + "CXI_stdCfg": { + "pcdssetup-areadet-setup": [ + { + "alias": "DscCsPad", + "record": "DSC rack", + "type": "CSPAD-2.3M" + } + ], + "pcdssetup-camera-setup": [ + { + "alias": "TimeTool", + "purpose": "Time Tool", + "record": "DAQ", + "trigger": "120", + "type": "Opal-1k" + }, + { + "alias": "Sc1Questar", + "purpose": "Questar camera", + "record": "DAQ", + "trigger": "120", + "type": "Opal-1k" + }, + { + "purpose": "Side Viewing", + "record": "vewing only", + "trigger": "free run", + "type": "Uniq" + }, + { + "delay": "TBD", + "eventcode": "40;", + "purpose": "X-ray simulator EVR for LeCroy" + }, + { + "delay": "TBD", + "eventcode": "40;", + "purpose": "X-ray simulator EVR for LeCroy" + } + ], + "pcdssetup-digitized-setup": [ + { + "device": "Agilent", + "purpose": "Fast Diode", + "rate": "8 Gs/s" + } + ], + "pcdssetup-motors-setup": [ + { + "invac": "Yes", + "location": "CXI SC1", + "name": "laser_incoupling_mirror_x", + "purpose": "Laser incoupling mirror X", + "pvbase": "CXI:USR:MMS:25", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "laser_incoupling_mirror_y", + "purpose": "Laser incoupling mirror Y", + "pvbase": "CXI:USR:MMS:28", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "laser_incoupling_mirror_z", + "purpose": "Laser incoupling mirror Z", + "pvbase": "CXI:USR:MMS:27", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "laser_incoupling_lens_x", + "purpose": "Laser incoupling lens X", + "pvbase": "CXI:USR:MMS:26", + "stageidentity": "VT-21" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "laser_sc1mirror1_yaw", + "purpose": "sc1 laser mirror yaw", + "pvbase": "CXI:LAS:PIC:03", + "stageidentity": "pico" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "laser_sc1mirror1_pitch", + "purpose": "sc1 laser mirror pitch", + "pvbase": "CXI:LAS:PIC:02", + "stageidentity": "pico" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "illumination_x", + "purpose": "Side Illumination X", + "pvbase": "CXI:SC1:MMS:09", + "stageidentity": "VT-21" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "illumination_y", + "purpose": "Side Illumination Y", + "pvbase": "CXI:USR:MMS:17", + "stageidentity": "VT-21" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "illumination_z", + "purpose": "Side Illumination Z", + "pvbase": "CXI:USR:MMS:19", + "stageidentity": "VT-21" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sample_x", + "purpose": "Sample Diode", + "pvbase": "CXI:SC1:MMS:02", + "stageidentity": "VT-50 (long)" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1diode_y", + "purpose": "SC1 fast diode piezo motors", + "pvbase": "CXI:SC1:MZM:09", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "Sc1Questar_zoom", + "purpose": "SC1 Questar zoom", + "pvbase": "CXI:SC1:MMS:01", + "stageidentity": "Questar" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "Sc1Questar_x", + "purpose": "SC1 Questar X", + "pvbase": "CXI:SC1:MMS:03", + "stageidentity": "VT-21" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "Sc1Questar_y", + "purpose": "SC1 Questar Y", + "pvbase": "CXI:SC1:MMS:04", + "stageidentity": "VT-21" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1objective_x", + "purpose": "SC1 Objective X", + "pvbase": "CXI:SC1:MMS:06", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1objective_y", + "purpose": "SC1 Objective Y", + "pvbase": "CXI:SC1:MMS:05", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1objective_z1", + "purpose": "SC1 Objective top z", + "pvbase": "CXI:SC1:MMS:08", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1objective_z2", + "purpose": "SC1 Objective bot z", + "pvbase": "CXI:SC1:MMS:07", + "stageidentity": "VT-50" + }, + { + "location": "CXI SC1", + "name": "pi1_x", + "purpose": "SC1 PI1 X", + "pvbase": "CXI:PI1:MMS:01", + "stageidentity": "IMS smart motor" + }, + { + "location": "CXI SC1", + "name": "pi1_y", + "purpose": "SC1 PI1 Y", + "pvbase": "CXI:PI1:MMS:02", + "stageidentity": "IMS smart motor" + }, + { + "location": "CXI SC1", + "name": "pi1_z", + "purpose": "SC1 PI1 Z", + "pvbase": "CXI:PI1:MMS:03", + "stageidentity": "IMS smart motor" + }, + { + "location": "CXI SC1", + "name": "pi1_fine_x", + "purpose": "SC1 PI1 Fine X", + "pvbase": "CXI:USR:MMS:01", + "stageidentity": "IMS smart motor" + }, + { + "location": "CXI SC1", + "name": "pi1_fine_y", + "purpose": "SC1 PI1 Fine Y", + "pvbase": "CXI:USR:MMS:02", + "stageidentity": "IMS smart motor" + }, + { + "location": "CXI SC1", + "name": "pi1_fine_z", + "purpose": "SC1 PI1 Fine Z", + "pvbase": "CXI:USR:MMS:03", + "stageidentity": "IMS smart motor" + }, + { + "location": "CXI SC1", + "name": "sc1led_stick", + "purpose": "SC1 LED", + "pvbase": "CXI:SC1:MMS:18", + "stageidentity": "IMS smart motor" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap1_x", + "purpose": "SC1 Aperture 1 X", + "pvbase": "CXI:SC1:MZM:05", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap1_y", + "purpose": "SC1 Aperture 1 Y", + "pvbase": "CXI:SC1:MZM:06", + "stageidentity": "piezo" + }, + { + " pvbase": "CXI:SC1:MZM:07", + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap2_x", + "purpose": "SC1 Aperture 2 X", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap2_y", + "purpose": "SC1 Aperture 2 Y", + "pvbase": "CXI:SC1:MZM:08", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap0_s", + "purpose": "SC1 Ta Jaws +X blade", + "pvbase": "CXI:SC1:MZM:01", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap0_n", + "purpose": "SC1 Ta Jaws -X blade", + "pvbase": "CXI:SC1:MZM:14", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap0_u", + "purpose": "SC1 Ta Jaws +Y blade", + "pvbase": "CXI:SC1:MZM:02", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sc1ap0_d", + "purpose": "SC1 Ta Jaws -Y blade", + "pvbase": "CXI:SC1:MZM:04", + "stageidentity": "piezo" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sample_y", + "purpose": "Sample Y", + "pvbase": "CXI:USR:MMS:18", + "stageidentity": "VT-50" + }, + { + "invac": "Yes", + "location": "CXI SC1", + "name": "sample_z", + "purpose": "Sample Z", + "pvbase": "CXI:USR:MMS:20", + "stageidentity": "VT-50" + }, + { + "connection": "On movable optical table for OPO", + "name": "opo_wp", + "purpose": "Newport Rotational Motor", + "pvbase": "CXI:USR:MMN:", + "stageidentity": "Newport" + } + ], + "pcdssetup-trig-setup": [] + }, + "JJslit": { + "pcdssetup-motors-setup": [ + { + "name": "jj_vg", + "purpose": "slit vertical gap", + "stageidentity": "jj_vg" + }, + { + "name": "jj_vo", + "purpose": "slit vertical offset", + "stageidentity": "jj_vo" + }, + { + "name": "jj_hg", + "purpose": "slit horizontal gap", + "stageidentity": "jj_hg" + }, + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + } + ] + }, + "fastDiode": { + "pcdssetup-digitized-setup": [ + { + "device": "Agilent", + "purpose": "Fast Diode", + "rate": "8 Gs/s" + } + ] + }, + "vonHamos": { + "pcdssetup-areadet-setup": [ + { + "alias": "epix_1", + "type": "Epix100" + } + ], + "pcdssetup-motors-setup": [ + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + }, + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + }, + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + } + ] + }, + "vonHamos_small": { + "pcdssetup-areadet-setup": [ + { + "alias": "epix_1", + "type": "Epix100" + } + ], + "pcdssetup-motors-setup": [ + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + }, + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + }, + { + "name": "vH_r", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_r" + } + ] + } +} From a1d5d3e2a876db44929cd89ab027f343bd9433cb Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Tue, 19 Nov 2019 13:06:36 -0800 Subject: [PATCH 3/7] Fixed more uses of deviceDict() --- scripts/questionnaire_tools | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/questionnaire_tools b/scripts/questionnaire_tools index 3a8f7560..17a06f19 100755 --- a/scripts/questionnaire_tools +++ b/scripts/questionnaire_tools @@ -199,16 +199,15 @@ args = parser.parse_args() if args.list_devices: - dd = deviceDict() + deviceDict = json.loads(open("deviceDict.json").read()) print('List of available devices: ') - for key in dd.getDeviceDict().keys(): + for key in deviceDict.keys(): print(key) if args.toExp is None: sys.exit() if args.print_device is not None: - dd = deviceDict() - devd = dd.getDeviceDict() + devd = json.loads(open("deviceDict.json").read()) if args.print_device not in devd.keys(): print('device %s is not present in device list, avaiable devices are:'%args.print_device) print(devd.keys()) From ad9d4144a38eb59d07cdad9767fbcd5d879a71e8 Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Tue, 19 Nov 2019 13:15:17 -0800 Subject: [PATCH 4/7] Update for run 18 --- scripts/questionnaire_tools | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/questionnaire_tools b/scripts/questionnaire_tools index 17a06f19..cfec9148 100755 --- a/scripts/questionnaire_tools +++ b/scripts/questionnaire_tools @@ -48,7 +48,7 @@ class QuestionnaireTools(): def _propRun_from_propname(self, propname): - runStrs=['run17', 'run16', 'run15'] + runStrs=['run18','run17', 'run16', 'run15'] for runStr in runStrs: if propname in self.qc.getProposalsListForRun(runStr).keys(): return propname, runStr @@ -71,7 +71,7 @@ class QuestionnaireTools(): return True return False - def _getProposalList(self, runs=[17], instrument=None): + def _getProposalList(self, runs=[18], instrument=None): proposalList=[] for key in self.exp_dict.keys(): try: @@ -85,7 +85,7 @@ class QuestionnaireTools(): pass return proposalList - def _getExperimentList(self, runs=[17], instrument=None): + def _getExperimentList(self, runs=[18], instrument=None): proposalList=[] for key in self.exp_dict.keys(): try: @@ -233,14 +233,14 @@ else: if args.propList: print('please be aware that this script takes experiment, not proposal names') - print(qs._getProposalList(runs=[17,16,15], instrument=None)) + print(qs._getProposalList(runs=[18,17,16,15], instrument=None)) #print('---------------------------') #print(qs._getProposalList(runs=[17], instrument=None)) #print(qs._getExperimentList(runs=[17], instrument=None)) sys.exit() if args.experimentList: - print(qs._getExperimentList(runs=[17,16,15], instrument=None)) + print(qs._getExperimentList(runs=[18,17,16,15], instrument=None)) #print('---------------------------') #print(qs._getProposalList(runs=[17], instrument=None)) #print(qs._getExperimentList(runs=[17], instrument=None)) From 8d9231b4d687fe71c6cbb8f461c502a6f7775f0f Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Tue, 17 Dec 2019 12:10:57 -0800 Subject: [PATCH 5/7] Fix von Hamos definitions and add large --- scripts/deviceDict.json | 55 ++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/scripts/deviceDict.json b/scripts/deviceDict.json index 081519c1..c097cd51 100644 --- a/scripts/deviceDict.json +++ b/scripts/deviceDict.json @@ -372,18 +372,18 @@ ], "pcdssetup-motors-setup": [ { - "name": "vH_r", + "name": "vH_v", "purpose": "von Hamos common vertical", - "stageidentity": "vH_r" + "stageidentity": "vH_v" }, { - "name": "vH_r", - "purpose": "von Hamos common vertical", - "stageidentity": "vH_r" + "name": "vH_h", + "purpose": "von Hamos common horizontal", + "stageidentity": "vH_h" }, { "name": "vH_r", - "purpose": "von Hamos common vertical", + "purpose": "von Hamos common rotation", "stageidentity": "vH_r" } ] @@ -397,20 +397,45 @@ ], "pcdssetup-motors-setup": [ { - "name": "vH_r", + "name": "vHs_v", "purpose": "von Hamos common vertical", - "stageidentity": "vH_r" + "stageidentity": "vHs_v" }, { - "name": "vH_r", - "purpose": "von Hamos common vertical", - "stageidentity": "vH_r" + "name": "vHs_h", + "purpose": "von Hamos common horizontal", + "stageidentity": "vHs_h" }, { - "name": "vH_r", - "purpose": "von Hamos common vertical", - "stageidentity": "vH_r" + "name": "vHs_r", + "purpose": "von Hamos common rotation", + "stageidentity": "vHs_r" } ] - } + }, + "vonHamos_large": { + "pcdssetup-areadet-setup": [ + { + "alias": "epix_1", + "type": "Epix100" + } + ], + "pcdssetup-motors-setup": [ + { + "name": "vHl_v", + "purpose": "von Hamos common vertical", + "stageidentity": "vHl_v" + }, + { + "name": "vHl_h", + "purpose": "von Hamos common horizontal", + "stageidentity": "vHl_h" + }, + { + "name": "vHl_r", + "purpose": "von Hamos common rotation", + "stageidentity": "vHl_r" + } + ] + } } From 767823644f592411cc477c149842e5beef3de209 Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Tue, 17 Dec 2019 12:21:38 -0800 Subject: [PATCH 6/7] Fix fieldname prefixes --- scripts/deviceDict.json | 26 +++++++++++++------------- scripts/questionnaire_tools | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/deviceDict.json b/scripts/deviceDict.json index c097cd51..d1906f7f 100644 --- a/scripts/deviceDict.json +++ b/scripts/deviceDict.json @@ -1,13 +1,13 @@ { "CXI_stdCfg": { - "pcdssetup-areadet-setup": [ + "pcdssetup-areadet": [ { "alias": "DscCsPad", "record": "DSC rack", "type": "CSPAD-2.3M" } ], - "pcdssetup-camera-setup": [ + "pcdssetup-camera": [ { "alias": "TimeTool", "purpose": "Time Tool", @@ -39,14 +39,14 @@ "purpose": "X-ray simulator EVR for LeCroy" } ], - "pcdssetup-digitized-setup": [ + "pcdssetup-digitized": [ { "device": "Agilent", "purpose": "Fast Diode", "rate": "8 Gs/s" } ], - "pcdssetup-motors-setup": [ + "pcdssetup-motors": [ { "invac": "Yes", "location": "CXI SC1", @@ -328,10 +328,10 @@ "stageidentity": "Newport" } ], - "pcdssetup-trig-setup": [] + "pcdssetup-trig": [] }, "JJslit": { - "pcdssetup-motors-setup": [ + "pcdssetup-motors": [ { "name": "jj_vg", "purpose": "slit vertical gap", @@ -355,7 +355,7 @@ ] }, "fastDiode": { - "pcdssetup-digitized-setup": [ + "pcdssetup-digitized": [ { "device": "Agilent", "purpose": "Fast Diode", @@ -364,13 +364,13 @@ ] }, "vonHamos": { - "pcdssetup-areadet-setup": [ + "pcdssetup-areadet": [ { "alias": "epix_1", "type": "Epix100" } ], - "pcdssetup-motors-setup": [ + "pcdssetup-motors": [ { "name": "vH_v", "purpose": "von Hamos common vertical", @@ -389,13 +389,13 @@ ] }, "vonHamos_small": { - "pcdssetup-areadet-setup": [ + "pcdssetup-areadet": [ { "alias": "epix_1", "type": "Epix100" } ], - "pcdssetup-motors-setup": [ + "pcdssetup-motors": [ { "name": "vHs_v", "purpose": "von Hamos common vertical", @@ -414,13 +414,13 @@ ] }, "vonHamos_large": { - "pcdssetup-areadet-setup": [ + "pcdssetup-areadet": [ { "alias": "epix_1", "type": "Epix100" } ], - "pcdssetup-motors-setup": [ + "pcdssetup-motors": [ { "name": "vHl_v", "purpose": "von Hamos common vertical", diff --git a/scripts/questionnaire_tools b/scripts/questionnaire_tools index cfec9148..8f8af525 100755 --- a/scripts/questionnaire_tools +++ b/scripts/questionnaire_tools @@ -144,7 +144,7 @@ class QuestionnaireTools(): return device def addDeviceToProposal(self, expname, devicename, location=None): - proposal, runNo = _propRun_from_name(self, expname) + proposal, runNo = self._propRun_from_name(expname) deviceSetup = self._parseDeviceName(devicename) if deviceSetup['name'] not in self.deviceDict.keys(): @@ -168,11 +168,11 @@ class QuestionnaireTools(): if numDev>numNewDevice: numNewDevice=numDev+1 for item in addDevice[lineItem]: - if lineItem=='pcdssetup-motors-setup' and 'pvbase' not in item.keys(): + if lineItem=='pcdssetup-motors' and 'pvbase' not in item.keys(): item['pvbase']='%s:USR:MMS:'%(expname[:3].upper()) if 'location' in deviceSetup.keys() and \ deviceSetup['location'] in self.allowedLocations and \ - (lineItem=='pcdssetup-motors-setup' or lineItem=='pcdssetup-areadet-setup') \ + (lineItem=='pcdssetup-motors' or lineItem=='pcdssetup-areadet') \ and 'location' not in item.keys(): item['location']=location if 'basename' in deviceSetup.keys(): From 0d314024a2c5f6afbc80e5a7ae6b2ebe6af6b1be Mon Sep 17 00:00:00 2001 From: Tyler Pennebaker Date: Wed, 18 Dec 2019 17:29:52 -0800 Subject: [PATCH 7/7] Fix field names to fit updated questionnaire --- scripts/deviceDict.json | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/scripts/deviceDict.json b/scripts/deviceDict.json index d1906f7f..90cd778c 100644 --- a/scripts/deviceDict.json +++ b/scripts/deviceDict.json @@ -4,7 +4,7 @@ { "alias": "DscCsPad", "record": "DSC rack", - "type": "CSPAD-2.3M" + "camtype": "CSPAD-2.3M" } ], "pcdssetup-camera": [ @@ -12,22 +12,25 @@ "alias": "TimeTool", "purpose": "Time Tool", "record": "DAQ", - "trigger": "120", - "type": "Opal-1k" + "camtrigger": "120", + "camtype": "Opal-1k" }, { "alias": "Sc1Questar", "purpose": "Questar camera", "record": "DAQ", - "trigger": "120", - "type": "Opal-1k" + "camtrigger": "120", + "camtype": "Opal-1k" }, { + "alias": "SideCam", "purpose": "Side Viewing", "record": "vewing only", - "trigger": "free run", - "type": "Uniq" - }, + "camtrigger": "free run", + "camtype": "Uniq" + } + ], + "pcdssetup-trig": [ { "delay": "TBD", "eventcode": "40;", @@ -327,8 +330,7 @@ "pvbase": "CXI:USR:MMN:", "stageidentity": "Newport" } - ], - "pcdssetup-trig": [] + ] }, "JJslit": { "pcdssetup-motors": [ @@ -367,7 +369,7 @@ "pcdssetup-areadet": [ { "alias": "epix_1", - "type": "Epix100" + "camtype": "Epix100" } ], "pcdssetup-motors": [ @@ -392,7 +394,7 @@ "pcdssetup-areadet": [ { "alias": "epix_1", - "type": "Epix100" + "camtype": "Epix100" } ], "pcdssetup-motors": [ @@ -417,7 +419,7 @@ "pcdssetup-areadet": [ { "alias": "epix_1", - "type": "Epix100" + "camtype": "Epix100" } ], "pcdssetup-motors": [