Modularize emittance calc for generalization.#280
Modularize emittance calc for generalization.#280roussel-ryan merged 14 commits intoslaclab:mainfrom
Conversation
|
Design-wise, I would prefer emittance.py only contains details related to the actual emittance computation itself, so details related to units or quad scan vs multi-device should be handled in the emittance measurement classes (see my current PR about subclassing the emittance measurement #277) |
|
So I would agree with that Shamin, but I'm concerned about connecting it too closely to the emittance measurement objects so that these calcs can be used outside the context of slac-tools. In that case maybe it makes sense to include these convenience functions in this file? IDK if this is in opposition to our discussion over slack |
|
Well these files are part of slac-tools, so if someone is using them, I would think it would be with slac-tools. I think separating the responsibilities in this way lets people use emittance.py separately if they want to do their own specific emittance computation, and if they're doing the typical measurements, they should just use the emittance measurement classes. |
|
@dylanmkennedy were you able to confirm or test that compute_emit_bmag works for the multi-device case? |
I actually think I need to make a small change to the handling of the bmag calculation for the multi point measurement. I'm fixing it now. |
…(s) in case of multi-device measurements.
…pretable broadcasting.
Modularizes emittance calculation for generalization to multi-device measurements (e.g. 3-wire measurement). The functionality formerly found in compute_emit_bmag is now found in analyze_quad_scan, as it is specific to quad scan emittance measurements. New functionality of compute_emit_bmag is independent of measurement method.