bmad-sim / AtomicAndPhysicalConstants.jl

Julia package for handling particle identification in simulations.
https://bmad-sim.github.io/AtomicAndPhysicalConstants.jl/dev
MIT License
0 stars 0 forks source link

consider using renaming `massof` to `mass`, etc. #68

Closed DavidSagan closed 1 month ago

DavidSagan commented 1 month ago

I propose the following name changes:

Any thoughts, comments?

mattsignorelli commented 1 month ago

Shouldn't the Species struct just store the mass, etc in the chosen units? It seems weird that we have calculate on the fly all of these units?

DavidSagan commented 1 month ago

But how to handle if a Species instance is created with one set of units and code using a different set of units tries to get the mass?

mattsignorelli commented 1 month ago

Ah, right, that makes sense

DavidSagan commented 1 month ago

Shall I close this issue?

mattsignorelli commented 1 month ago

Are the name changes pushed?

DavidSagan commented 1 month ago

Sorry I was confused. Ignore my last post.

dtabell commented 1 month ago

My only suggestion would be to reorder the arguments of setunits to (mass, length, time, charge, energy).

Dan

On Thu, Sep 26, 2024 at 16:46 David Sagan @.***> wrote:

I propose the following name changes:

  • massof() -> mass()
  • chargeof() -> charge()
  • setunits(mass_unit, length_unit, time_unit, energy_unit, charge_unit) -> setunits(mass, length, time, energy, charge)

Any thoughts, comments?

— Reply to this email directly, view it on GitHub https://github.com/bmad-sim/AtomicAndPhysicalConstants.jl/issues/68, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXTUHE4FOOQW5ZXE644BNTZYSFEZAVCNFSM6AAAAABO57QQIGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2TCNRVGQ2DQMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

lllx125 commented 1 month ago

I think setunits(mass, length, time, charge, energy) is more consise

DavidSagan commented 1 month ago

OK so anyone feel free to make this change.

lllx125 commented 1 month ago

changed massof()->mass, chargeof()->charge(), the stunt parameter are unchanged.