Closed qzhang234 closed 2 years ago
I'm on branch 274-imm1-plugin-change
by the way and I just pushed my most recent changes.
The empty lambdadet.stage_sigs
dictionary is not the problem. The lambdadet.imm1.stage()
method is failing on the attribute enable
. You can test this by typing this command:
lambdadet.imm1.stage()
which, if it behaves as shown above, will raise an AttributeError
on the enable
attribute.
What do these commands return?
print(f"{lambdadet.imm1.enable.get() = }")
print(f"{lambdadet.imm1.enable.enum_strs = }")
stage_sigs
set here: https://github.com/aps-8id-dys/ipython-8idiuser/blob/0c0f6450d2565c16e41c2f842606aadfdbb6565d/profile_bluesky/startup/instrument/devices/lambda_750k.py#L394
The enable
Component attribute is defined here: https://github.com/aps-8id-dys/ipython-8idiuser/blob/0c0f6450d2565c16e41c2f842606aadfdbb6565d/profile_bluesky/startup/instrument/devices/ad_imm_plugins.py#L51-L53
@prjemian Here are the terminal outputs from staging and enable. lambdadet.imm1.stage()
does not return an error, but lambdadet.imm1.stage_sigs
is empty, which I believe is the reason for the error when trying to inquire attribute imm1.enable
.
So there is lambdadet.imm1.enable
attribute, that's what this says. Why?
Sorry I don't know enough to answer this question. What does enable
do? And is the imm plugin lambdadet.imm1
not supposed to have the enable
attribute?
@prjemian I modified the self._file_path
part in lambda_750k.py
, and now the error from lambdadet.stage()
has changed. For some reason during staging process, it is trying to write to 8LAMBDA1:IMM1:FilePath_RBV
, which is a readback value.
Any suggestions?
@prjemian Never mind, I missed a /
after rigaku202108
. After fixing that, lambdadet.stage()
works without error. The issue is now resolved.
I pushed the most recent code.
Should I close the issue or should I wait after you resolve the lua
issue?
This issue is no longer relevant
I tried to run
AD_Acquire
after changing the imm1 plugin and run into a crash. Upon some inspection, it seems like the crash was caused bylambdadet.stage()
. More specifically, the line that causes the crash issuper().stage()
.In that vein, I noticed that
lambdadet.imm1.stage_sigs
was properly defined, howeverlambdadet.stage_sigs
itself is empty. Could this be the root of the staging problem?Any pointers would be extremely helpful.
Terminal output
``` In [18]: lambdadet.staging_setup_DM?? In [19]: lambdadet.staging_setup_DM('/home/8ididata/2021-2/rigaku202108', 'A001', 100, 0.1, 0.11) In [20]: lambdadet.stage_sigs Out[20]: OrderedDict() In [21]: lambdadet.imm1.stage_sigs Out[21]: OrderedDict([('enable', 1), ('blocking_callbacks', 'Yes'), ('parent.cam.array_callbacks', 1), ('file_path', '/data/2021-2/rigaku202108'), ('file_name', 'A001'), ('num_capture', 100), ('file_number', 1), ('file_format', 'IMM_Cmprs'), ('capture', 1)]) In [22]: In [22]: In [22]: In [22]: lambdadet.unstage() Out[22]: [StatsLocal(prefix='8LAMBDA1:Stats1:', name='lambdadet_stats1', parent='lambdadet', read_attrs=[], configuration_attrs=['mean_value']), Lambda750kCamLocal(prefix='8LAMBDA1:cam1:', name='lambdadet_cam', parent='lambdadet', read_attrs=['num_images'], configuration_attrs=['acquire', 'acquire_period', 'acquire_time', 'array_callbacks', 'bad_frame_counter', 'config_file_path', 'data_type', 'firmware_version', 'image_mode', 'operating_mode', 'serial_number', 'detector_state', 'state', 'status_msg', 'temperature', 'trigger_mode', 'array_size_x', 'array_size_y']), IMMnLocal(prefix='8LAMBDA1:IMM1:', name='lambdadet_imm1', parent='lambdadet', read_attrs=['num_captured'], configuration_attrs=['capture', 'file_format']), Lambda750kLocal(prefix='8LAMBDA1:', name='lambdadet', read_attrs=['imm1', 'imm1.num_captured', 'cam', 'cam.num_images', 'stats1', 'image'], configuration_attrs=['imm1', 'imm1.capture', 'imm1.file_format', 'cam', 'cam.acquire', 'cam.acquire_period', 'cam.acquire_time', 'cam.array_callbacks', 'cam.bad_frame_counter', 'cam.config_file_path', 'cam.data_type', 'cam.firmware_version', 'cam.image_mode', 'cam.operating_mode', 'cam.serial_number', 'cam.detector_state', 'cam.state', 'cam.status_msg', 'cam.temperature', 'cam.trigger_mode', 'cam.array_size_x', 'cam.array_size_y', 'stats1', 'stats1.mean_value'])] In [23]: In [23]: In [23]: lambdadet.stage() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last)