Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First push of modified take_stuttered code #100

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

craiglagegit
Copy link

No description provided.

@craiglagegit craiglagegit marked this pull request as draft August 28, 2023 18:34
Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding change_focus to the CameraExposure class, add the checkpoint method. To make typing easier I would do something like this:

# In CameraExposure
checkpoint: None | typing.Coroutine[None, None, None]

Then in _handle_expose_shift you would do:

if camera_exposure.checkpoint is not None:
    await camera_exposure.checkpoint(f"Shifting {camera_exposure.row_shift} rows.")

That will make the code more general.

@craiglagegit
Copy link
Author

Hi Tiago. I've finally gotten back to this, and I've made those changes, but there is a conflict that I don't understand. In CameraExpose I put:
checkpoint: None | typing.Coroutine[None, None, None]
like you suggested. But checkpoint is also used to leave a comment in other cases. So for example, in take_bias, it says:
checkpoint: typing.Optional[typing.Callable[[str], typing.Awaitable]] = None
and the linter is complaining that those types are incompatible. I don't quite understand what I'm doing so I don't know how to fix it. For now I have pushed the changes to both ts_observatory_control and ts_standardscripts. Thanks.

@craiglagegit
Copy link
Author

Hi Tiago. Me again. I've updated the typing for "checkpoint" in camera_exposure to match what is in the other take commands, and now the linter checks pass. I also tested in a notebook whether the "async def offset_hexapod" method is being passed, and I think it is. The only thing failing now is updating the version history. Do I just update that manually? Other than that maybe it is ready to test? I will try commenting out the row shift command and test it at the TTS. I'd appreciate your inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants