Skip to content

Instantly share code, notes, and snippets.

@ipashchenko
Created July 4, 2018 15:51
Show Gist options
  • Save ipashchenko/e45a7cb6e9b4cbdc28876269b0aae092 to your computer and use it in GitHub Desktop.
Save ipashchenko/e45a7cb6e9b4cbdc28876269b0aae092 to your computer and use it in GitHub Desktop.
Getting simulation results
import pandas as pd
import numpy as np
# Reading file with circular elliptic cores
df = pd.read_csv("df_result_cg.csv")
df["dr_ratio"] = df["dr_obs"]/df["dr_true"]
df["phi_app"] = np.arctan(np.tan(df["fi"])/np.sin(df["theta"]))
# These are optional!
# This chooses only sources with models with equal number of components
df = df.query("n_comps == n_comp_j and n_comps == n_comps_x and n_comps == n_comps_s")
df = df.query("k_obs > 0.2 and dr_obs < 4 and dr_obs < 0.6")
# See what columns we have
print(df.columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment