diff --git a/scripts/deviceDict.json b/scripts/deviceDict.json new file mode 100644 index 00000000..90cd778c --- /dev/null +++ b/scripts/deviceDict.json @@ -0,0 +1,443 @@ +{ + "CXI_stdCfg": { + "pcdssetup-areadet": [ + { + "alias": "DscCsPad", + "record": "DSC rack", + "camtype": "CSPAD-2.3M" + } + ], + "pcdssetup-camera": [ + { + "alias": "TimeTool", + "purpose": "Time Tool", + "record": "DAQ", + "camtrigger": "120", + "camtype": "Opal-1k" + }, + { + "alias": "Sc1Questar", + "purpose": "Questar camera", + "record": "DAQ", + "camtrigger": "120", + "camtype": "Opal-1k" + }, + { + "alias": "SideCam", + "purpose": "Side Viewing", + "record": "vewing only", + "camtrigger": "free run", + "camtype": "Uniq" + } + ], + "pcdssetup-trig": [ + { + "delay": "TBD", + "eventcode": "40;", + "purpose": "X-ray simulator EVR for LeCroy" + }, + { + "delay": "TBD", + "eventcode": "40;", + "purpose": "X-ray simulator EVR for LeCroy" + } + ], + "pcdssetup-digitized": [ + { + "device": "Agilent", + "purpose": "Fast Diode", + "rate": "8 Gs/s" + } + ], + "pcdssetup-motors": [ + { + "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" + } + ] + }, + "JJslit": { + "pcdssetup-motors": [ + { + "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": [ + { + "device": "Agilent", + "purpose": "Fast Diode", + "rate": "8 Gs/s" + } + ] + }, + "vonHamos": { + "pcdssetup-areadet": [ + { + "alias": "epix_1", + "camtype": "Epix100" + } + ], + "pcdssetup-motors": [ + { + "name": "vH_v", + "purpose": "von Hamos common vertical", + "stageidentity": "vH_v" + }, + { + "name": "vH_h", + "purpose": "von Hamos common horizontal", + "stageidentity": "vH_h" + }, + { + "name": "vH_r", + "purpose": "von Hamos common rotation", + "stageidentity": "vH_r" + } + ] + }, + "vonHamos_small": { + "pcdssetup-areadet": [ + { + "alias": "epix_1", + "camtype": "Epix100" + } + ], + "pcdssetup-motors": [ + { + "name": "vHs_v", + "purpose": "von Hamos common vertical", + "stageidentity": "vHs_v" + }, + { + "name": "vHs_h", + "purpose": "von Hamos common horizontal", + "stageidentity": "vHs_h" + }, + { + "name": "vHs_r", + "purpose": "von Hamos common rotation", + "stageidentity": "vHs_r" + } + ] + }, + "vonHamos_large": { + "pcdssetup-areadet": [ + { + "alias": "epix_1", + "camtype": "Epix100" + } + ], + "pcdssetup-motors": [ + { + "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" + } + ] + } +} 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..8f8af525 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", @@ -49,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 @@ -72,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: @@ -86,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: @@ -145,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(): @@ -169,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(): @@ -200,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()) @@ -235,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))