Commit cc4dff7a authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Fixing isotopes

parent 137c22a1
......@@ -75,8 +75,8 @@ def forward(
mask_sign = dfspec["metadata"]["parameter_ref"] == sign_id.lower()
ref_sim = ref_sims["maindata"].loc[mask_sign, "spec"]
isotopologue_sim = isotopologue_sims["maindata"].loc[mask_sign, "spec"]
ref_sim = ref_sims.loc[mask_sign, "spec"]
isotopologue_sim = isotopologue_sims.loc[mask_sign, "spec"]
sign_sim = isotopologue_sim / ref_sim
sign_sim /= r_std
......@@ -88,8 +88,8 @@ def forward(
# Applying tangent-linear
if mode == "tl":
ref_sim_tl = ref_sims["maindata"].loc[mask_sign, "incr"]
isotopologue_sim_tl = isotopologue_sims["maindata"].loc[mask_sign, "incr"]
ref_sim_tl = ref_sims.loc[mask_sign, "incr"]
isotopologue_sim_tl = isotopologue_sims.loc[mask_sign, "incr"]
sign_sim_tl = (isotopologue_sim_tl / ref_sim -
isotopologue_sim / ref_sim ** 2 * ref_sim_tl)
......@@ -104,9 +104,9 @@ def forward(
comp = components_out[-1]
mask_spec = dfspec["metadata"]["parameter_ref"] == spec_id.lower()
dfout_ref = datastore_out[(comp, spec_id)][di]
dfout_ref.loc[:, ("maindata", "spec")] = spec_sims["maindata"].loc[mask_spec, "spec"]
dfout_ref.loc[:, ("maindata", "spec")] = spec_sims.loc[mask_spec, "spec"]
if mode == "tl":
dfout_ref.loc[:, ("maindata", "incr")] = \
spec_sims["maindata"].loc[mask_spec, "incr"]
spec_sim.loc[mask_spec, "incr"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment