atcollab / at

Accelerator Toolbox
Apache License 2.0
48 stars 31 forks source link

make_copy decorator not working for lattice defined as list #764

Closed swhite2401 closed 2 months ago

swhite2401 commented 2 months ago

The make copy decorator in lattice/utils.py accepts list but uses the function ring.replace() that only works for lattice objects. This was causing problems in the disable_varelem function in tracking/utils.py

Two corrective actions are proposed: -disable element only when they vary and their passmethod is not already identitypass -catch error in case the lattice is a list and do not use the replace() function

swhite2401 commented 2 months ago

I agree... you have better ideas?

lfarv commented 2 months ago

None better, it does not really matters…

swhite2401 commented 2 months ago

OK I merge