Skip to content

Run.get_image has arguments with names that differ from labscript args #53

Description

@philipstarkey

Original report (archived issue) by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Lyse's Run.get_image accepts 'label' and 'image' kwargs to specify the two possible levels of the hierarchy we use to store images. However, Camera.expose, IMAXdxCamera.expose etc call these 'name' and 'frametype'.

The lyse args should be changed to match the labscript ones with backward compatibility, something like:

defget_image(self, orientation, name=None, frametype=None, **kwargs):
name=kwargs.pop('image', name)
frametype=kwargs.pop('label', frametype)
ifkwargs:
# raise an error saying remaining kwargs not allowedifnameisNoneorframetypeisNone:
# raise an error about this too, they are non-optional.# Better yet, make 'frametype' optional with the default value# matching that of the expose() method: frametype='frame'.# name can't be optional though.# rest of function here with renamed variables

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtrivial

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions