BCDA-APS / use_bluesky

Tools to help APS use the Bluesky Framework (https://blueskyproject.io/)
8 stars 3 forks source link

test environment_2020_9 on working installations #66

Closed prjemian closed 4 years ago

prjemian commented 4 years ago

test this:

verify these start:

prjemian commented 4 years ago
import databroker
print(f"{len(list(databroker.catalog))} catalog(s) known to databroker")
db_name = list(databroker.catalog)[0]
db = databroker.catalog[db_name]
print(f"{len(db)} run(s) in database {db_name}")
prjemian commented 4 years ago

trouble:

(bluesky_2020_9) mintadmin@mint-vm:/tmp$ designer
designer: symbol lookup error: /home/mintadmin/Apps/anaconda/envs/bluesky_2020_9/plugins/designer/libpyqt5.so: undefined symbol: Py_IsInitialized
prjemian commented 4 years ago

pydm --hide-nav-bar --hide-menu-bar --hide-status-bar -m P=sky:,M=m1 rectangle.ui:

Clipboard01

rectangle.ui.txt

prjemian commented 4 years ago

At APS


from apstools.devices import ApsMachineParametersDevice
from apstools.utils import device_read2table
aps = ApsMachineParametersDevice(name="aps")
aps.wait_for_connection()
print(aps.current.get())
device_read2table(aps)
prjemian commented 4 years ago
In [4]: from apstools.devices import ApsMachineParametersDevice 
   ...: from apstools.utils import device_read2table 
   ...: aps = ApsMachineParametersDevice(name="aps") 
   ...: aps.wait_for_connection() 
   ...: print(aps.current.value) 
   ...: device_read2table(aps)                                                                                          
import databroker
print(f"{len(list(databroker.catalog))} catalog(s) known to databroker")
db_name = list(databroker.catalog)[0]
db = databroker.catalog[db_name]
print(f"{len(db)} run(s) in database {db_name}")
15 catalog(s) known to databroker
0 run(s) in database 12idb
from apstools.devices import ApsMachineParametersDevice
from apstools.utils import device_read2table
aps = ApsMachineParametersDevice(name="aps")
aps.wait_for_connection()
print(aps.current.get())
device_read2table(aps)
24.91015253760933
========================================== ========================= ==========================
name                                       value                     timestamp                 
========================================== ========================= ==========================
aps_current                                24.91015253760933         2020-08-13 14:47:24.512732
aps_lifetime                               26.776818442371674        2020-08-13 14:47:21.356148
aps_aps_cycle                              2020-2                    2020-08-13 14:47:24.922319
aps_machine_status                         ASD Studies               2020-08-13 00:00:02.005514
aps_operating_mode                         Stored Beam               1989-12-31 18:00:00       
aps_shutter_permit                         NO PERMIT                 2020-08-13 00:00:03.754946
aps_fill_number                            18.0                      1989-12-31 18:00:00       
aps_orbit_correction                       0.0                       1989-12-31 18:00:00       
aps_global_feedback                        Off                       1989-12-31 18:00:00       
aps_global_feedback_h                      Off                       1989-12-31 18:00:00       
aps_global_feedback_v                      Off                       1989-12-31 18:00:00       
aps_operator_messages_operators            Ronzhin, Berkland         2020-08-13 07:16:14.656055
aps_operator_messages_floor_coordinator    Bruno Fieramosca (2-0101) 2020-08-13 05:39:23.619549
aps_operator_messages_fill_pattern         0+24x1 RHB                2020-07-21 14:27:42.861945
aps_operator_messages_last_problem_message                           2020-08-10 16:54:23.843998
aps_operator_messages_last_trip_message                              2020-08-10 23:17:24.961036
aps_operator_messages_message6             Machine Studies Ongoing.  2020-08-13 05:39:40.717614
aps_operator_messages_message7                                       2020-06-08 15:14:43.478823
aps_operator_messages_message8                                       2020-06-08 15:14:44.846647
========================================== ========================= ==========================

Out[4]: <pyRestTable.rest_table.Table at 0x7ff1b080e0d0>

In [5]:                                                                                                                 
prjemian commented 4 years ago
In [1]: import databroker 
   ...: print(f"{len(list(databroker.catalog))} catalog(s) known to databroker") 
   ...: db_name = list(databroker.catalog)[0] 
   ...: db = databroker.catalog[db_name] 
   ...: print(f"{len(db)} run(s) in database {db_name}")                                                                
15 catalog(s) known to databroker
0 run(s) in database 12idb

In [2]: db_name = "mongodb_config"                                                                                      

In [3]: db = databroker.catalog[db_name]                                                                                

In [4]: print(f"{len(db)} run(s) in database {db_name}")                                                                
2283 run(s) in database mongodb_config
prjemian commented 4 years ago

The trouble with the designer is separate (probably upstream).