Skip to content

emu unit #4918

Closed
Closed

Description

@p3trus

Is there an ambiguity of the emu unit? I just know it as a unit of magnetic moment (see). The way I know it

1 emu = 1 erg/gauss = 1e-3 A m^2

I tried

from astropy import units as u
u.emu.to(u.A * u.m**2)

which resulted in a UnitconversionError.

Activity

  1. pllim commented on May 16, 2016

    @pllim
    Member

    I am not familiar with this unit, but looks like @embray added it via 68f574c . And it might be related to https://en.wikipedia.org/wiki/Abampere

  2. p3trus commented on May 17, 2016

    @p3trus
    Author

    A little bit more research at wiki Shows that emu has indeed different meanings.

    Also, lack of unique unit names leads to a great confusion:
    thus "15 emu" may mean either 15 abvolts, or 15 emu units of electric dipole moment,
    or 15 emu units of magnetic susceptibility, sometimes (but not always) per gram, or per mole.

  3. bsipocz commented on May 17, 2016

    @bsipocz
    Member

    I've also looked into this a bit in the weekend, and it's very confusing. EMU to me looks more like a unit system than a unit itself. So what about removing/deprecating 'emu' from the alternatives list of u.Bi, so anyone wanting to use either EMU current or charge won't fall in the trap of using the other by accident.

  4. pllim commented on May 17, 2016

    @pllim
    Member

    @embray , since you added it, do you have a preference in deprecating emu?

  5. p3trus commented on May 17, 2016

    @p3trus
    Author

    @pllim It was not a general confusion, the code example was oversimplified. I had an error at a place where I didn't expect it. I could read in all magnetisation data files without a problem. Later in the calculations, it crashed. I would prefer not having ambiguous units. After all having units is to avoid errors not create them.

  6. mhvk commented on May 19, 2016

    @mhvk
    Contributor

    In case anyone is keen to do work to support the various cgs EM systems, see #4359...

  7. bsipocz commented on May 25, 2016

    @bsipocz
    Member

    @embray @mhvk - Do you have any pro or con for deprecating u.emu, or at least give a warning when someone trying to use it? If there is no objections, I can open a PR and maybe we can still include it in 1.2 so the final removal can be done in 2.0?

    cc @astrofrog @eteq

  8. mhvk commented on May 25, 2016

    @mhvk
    Contributor

    I guess the only issue that might arise is when an external table uses the unit. I certainly have not encountered such tables myself, and would guess they are rare inside astronomy. Furthermore, I guess in that case the unit would be unclear anyway, so am happy to deprecate.

  9. pllim commented on Mar 28, 2017

    @pllim
    Member

    @p3trus , u.emu will no longer be accessible by default due to the confusion (in dev and in v2.0 release). Please use u.Bi or its other aliases. u.deprecated.emu is available but not recommended.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions