Skip to content

Unified set() for magnets #452

Description

@gubaidulinvadim

Description, motivation and use case
Currently, for all magnets you can work in strengths or currents. One could wish to always work with a default unit and have a shorter magnet.set() instread of magnet.strength.set().

Proposed solution
The proposal is to have

  • default choice (strengths or currents)
  • .set() that will shortcut to strength.set() or currents.set() depending on the default
  • After Simple unit convertion to SI on set() #350 is solved .set() can accept a pint.Quantity with a unit and based on the unit use strengths or currents.

Additional context
Some cases with combined function magnets may not be trivial.

Checklist

  • I've assigned this issue to a project
  • I've @-mentioned relevant people

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

    enhancementNew feature or request

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions