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

LS372: query sample heater output #505

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sanahabhimani
Copy link
Contributor

Description

Adds ability to query sample heater resistance, display mode unit (power, current), and % in either current or power
In the session.data, I added the display_mode parameter which is a string (current or power), can I get a sanity check that that's fine to add in session.data?

Motivation and Context

Solves #493

How Has This Been Tested?

Tested at Yale on a 372 in the lab

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@sanahabhimani
Copy link
Contributor Author

@BrianJKoopman, oops, I didn't add a test! Standby standby

@sanahabhimani
Copy link
Contributor Author

Okay, test added!

Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

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

I don't think this fully resolves #493 yet, since it doesn't get the heater range. Currently, if in 'current' mode, you can see a percentage from this task, but not the current value that that is a percentage of. This should be added.

The sample heater output can also be queried continuously in the acq() Process if configured in the SCF via the --sample-heater argument. It would be worth noting this in the docstring for this new Task, since there are now two ways to check the heater output (though this one doesn't publish to a feed like the acq() Process does.)


session.set_status('running')

heater_perc = self.module.sample_heater.get_sample_heater_output()
Copy link
Member

Choose a reason for hiding this comment

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

I don't believe this necessarily always return a percentage. Whether this is a percentage of the current set for the heater range or in power depends on heater output selection (aka "display mode") of either "current" or "power".

We should generalize the field you have as 'heater_power_percent' to 'heater_value'. Adding a "units" field would be reasonable. ocs-web could use that for a good display of heater output.

socs/agents/lakeshore372/agent.py Show resolved Hide resolved
socs/agents/lakeshore372/agent.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants