Skip to content

Conversation

@willrogers
Copy link
Collaborator

@mfurseman we should get you reviewing pytac code.

It should also be moved to dls-controls as well, I suppose.

Any comments?

@coveralls
Copy link

coveralls commented Jul 24, 2017

Coverage Status

Coverage remained the same at 93.189% when pulling 02f70f0 on tweaks into 33a56a5 on master.

@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.945% when pulling 231ce53 on tweaks into 33a56a5 on master.

@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage decreased (-0.5%) to 92.705% when pulling bb90e6c on tweaks into 33a56a5 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 92.705% when pulling bb90e6c on tweaks into 33a56a5 on master.

The data may come from the model and not a pv.
ControlSystem objects still use the name put_value.
@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage decreased (-0.5%) to 92.705% when pulling b7ec136 on tweaks into 33a56a5 on master.

@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage decreased (-0.5%) to 92.705% when pulling d88476b on tweaks into 33a56a5 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.04%) to 94.225% when pulling 6f1bafe on tweaks into 33a56a5 on master.

1 similar comment
@coveralls
Copy link

coveralls commented Jul 25, 2017

Coverage Status

Coverage increased (+1.04%) to 94.225% when pulling 6f1bafe on tweaks into 33a56a5 on master.

@willrogers willrogers merged commit f8ee408 into master Jul 25, 2017
@willrogers willrogers deleted the tweaks branch July 25, 2017 14:44
field = 'b2';
elseif strcmp(type, 'VSTR')
field = 'a0';
else

Choose a reason for hiding this comment

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

Would it be more robust to check the type here as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. This was a shortcut because everything left was either a bending magnet or a horizontal steerer.

# each one has both a0 (VSTR) and b0 (HSTR) as fields
assert set(('a0', 'b0')).issubset(element.get_fields())


Choose a reason for hiding this comment

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

I think in some transfer lines or the injectors there are steerers in a single plane.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This module is designed to check specifically the loading of the VMX lattice, as opposed to something more generic. It's pretty useful for testing that everything is as it should be for Diamond, but it's generally OK because I think bundling the data for a machine is useful for anyone else using this. We could make this a bit clearer in the module name and comments.


def get_pv_value(self, field, handle, unit=pytac.ENG, sim=False):
def get_value(self, field, handle, unit=pytac.ENG, sim=False):
"""Get the value of a pv.

Choose a reason for hiding this comment

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

Should pv be removed from the comment as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point.

try:
return self._devices[field].get_pv_name(handle)
except KeyError:
raise PvException('Element has no device for field {}'.format(field))

Choose a reason for hiding this comment

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

Should this exception be renamed to something more generic, CsException perhaps?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea.

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.

3 participants