Update name

This commit is contained in:
rstiskalek 2024-09-23 10:23:33 +01:00
parent da1b317861
commit 8b92d632aa

View file

@ -59,6 +59,7 @@ def names_to_latex(names, for_corner=False):
"mag_cal": "\\mathcal{M}", "mag_cal": "\\mathcal{M}",
"l": "\\ell ~ [\\mathrm{deg}]", "l": "\\ell ~ [\\mathrm{deg}]",
"b": "b ~ [\\mathrm{deg}]", "b": "b ~ [\\mathrm{deg}]",
"rLG": "R_{\\rm offset} ~ [\\mathrm{Mpc} / h]",
} }
ltx_corner = {"alpha": r"$\alpha$", ltx_corner = {"alpha": r"$\alpha$",
@ -209,17 +210,18 @@ def get_samples(fname, convert_Vext_to_galactic=True):
for key in grp.keys(): for key in grp.keys():
samples[key] = grp[key][...] samples[key] = grp[key][...]
if convert_Vext_to_galactic: if "Vext" in samples:
Vext = samples.pop("Vext") if convert_Vext_to_galactic:
samples["Vmag"] = np.linalg.norm(Vext, axis=1) Vext = samples.pop("Vext")
Vext = csiborgtools.cartesian_to_radec(Vext) samples["Vmag"] = np.linalg.norm(Vext, axis=1)
samples["l"], samples["b"] = csiborgtools.radec_to_galactic( Vext = csiborgtools.cartesian_to_radec(Vext)
Vext[:, 1], Vext[:, 2]) samples["l"], samples["b"] = csiborgtools.radec_to_galactic(
else: Vext[:, 1], Vext[:, 2])
Vext = samples.pop("Vext") else:
samples["Vx"] = Vext[:, 0] Vext = samples.pop("Vext")
samples["Vy"] = Vext[:, 1] samples["Vx"] = Vext[:, 0]
samples["Vz"] = Vext[:, 2] samples["Vy"] = Vext[:, 1]
samples["Vz"] = Vext[:, 2]
keys = list(samples.keys()) keys = list(samples.keys())
for key in keys: for key in keys: