atcollab / at

Accelerator Toolbox
Apache License 2.0
48 stars 31 forks source link

New Matlab function atsimplering #657

Closed lfarv closed 9 months ago

lfarv commented 10 months ago

The new function atsimplering creates a simple lattice according to a set of ring properties. A "simple ring" consists of:

It is defined by:

plus optional parameters:

It is similar to the python simplering introduced in #643

simoneliuzzo commented 10 months ago

Dear @lfarv @lcarver and @swhite2401 ,

what is the difference with atfastring? The imputs are parameters rather than an AT lattice?

I will try to test it

thank you,

best regards Simone

lcarver commented 10 months ago

The idea is to be able to generate a ring with only a table of parameters. No initial lattice needed.

simoneliuzzo commented 10 months ago

Dear @lcarver @lfarv and @swhite2401,

if the output is ought to be the same, why having two functions rather than simply adding inputs to atfastring?

For example: if you give a lattice it will use the lattice. (atfastring) if you give the parameters it will use the parameters. (atsimplering) if you give a partial amount of parameters it will use the lattice to get the defaults for the others. (atfastsimplering)

best regards Simone

simoneliuzzo commented 10 months ago

Dear @lfarv @lcarver and @swhite2401,

do you have a test function checking that the output elements are strictly the same for atfastring(ring) and atsimplering(parameters_of_ring) ?

lfarv commented 10 months ago

if the output is ought to be the same, why having two functions rather than simply adding inputs to atfastring?

@simoneliuzzo What you propose could be done, though I have doubts on the interest of the "mixed" input. But I'm not pushing for that because:

The test you propose is a good idea. But the comparison is not easy because the generated lattice are different, though they should behave the same…

lcarver commented 10 months ago

Looks good to me. Thanks a lot

lfarv commented 10 months ago

@lcarver : I had to solve a conflict with the updated master. Could you approve again? Thanks

@simoneliuzzo : any more comments on this function?

lfarv commented 9 months ago

After solving a conflict with the master branch (Matlab version number), I need another review. Can @lcarver or @simoneliuzzo approve again?