Skip to content

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

Open
@philipstarkey

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:

def get_image(self, orientation, name=None, frametype=None, **kwargs):
    name = kwargs.pop('image', name)
    frametype = kwargs.pop('label', frametype)
    if kwargs:
        # raise an error saying remaining kwargs not allowed
    if name is None or frametype is None:
        # 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

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