Closed redeboer closed 5 months ago
@mmikhasenko I added the snippets from our discussion in #336 on the main page. A few things I don't like:
Thanks! Agree with everything you say.
- The notebook with serialisation seems better place for it.
Okay good idea, moving the snippet to a new section there.
- I should update the root file: same items look indeed strange
Well it's just an example, I'll generate one with generate_phasespace_sample()
and post it here so it can be downloaded in the example
from zipfile import ZipFile
import uproot
import polarimetry
from polarimetry.data import generate_phasespace_sample
model = polarimetry.published_model()
phsp = generate_phasespace_sample(model.decay, n_events=8, seed=0)
with uproot.recreate("lc2pkpi_phsp.root") as root_file:
root_file["Lc2ppiK"] = {
"msq_piK": phsp["sigma1"],
"msq_Kp": phsp["sigma2"],
}
with ZipFile("lc2pkpi_phsp.zip", "w") as zip_file:
zip_file.write("lc2pkpi_phsp.root")
- With a call from the module, to avoid user guessing on internal assumptions and names
Yeah would have to provide a small function to do that, but should be doable.
Closes #336
AmplitudeModel
object returned by e.g.published_model()
now contains two new attributes,masses
andinvariants
, which makes it easier to create a data transformer for input data that only has two Mandelstam variables, e.g. $\sigma1 = m^2{\pi K}$ and $\sigma2 = m^2{K p}$.