Skip to content

Commit

Permalink
Merge pull request #1 from mj-will/address-referee-reports
Browse files Browse the repository at this point in the history
Address referee reports
  • Loading branch information
mj-will committed Jul 7, 2023
2 parents 795de74 + 75f67e7 commit 9e6ffa1
Show file tree
Hide file tree
Showing 13 changed files with 270 additions and 73 deletions.
62 changes: 44 additions & 18 deletions experiments/analytic_results.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import os\n",
Expand Down Expand Up @@ -42,18 +44,22 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"path = './outdir/'\n",
"path = './outdir_rerun/'\n",
"gaussian_path = os.path.join(path, f'ins_gaussian_*d', '')\n",
"gmm_path = os.path.join(path, f'ins_gmm_paper_*d', '')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gaussian_results = load_all_results(gaussian_path)"
Expand All @@ -62,7 +68,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gmm_results = load_all_results(gmm_path)"
Expand All @@ -71,7 +79,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"possible_dims = np.arange(2, 34, 2)\n",
Expand All @@ -81,7 +91,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"figsize = ((10 / 13) * default_figsize[0], default_figsize[1] * (1.8 / 5))\n",
Expand Down Expand Up @@ -127,7 +139,7 @@
" \n",
"# h, l = fig.axes[0].get_legend_handles_labels()\n",
"# fig.legend(h, l, frameon=False, ncol=2, loc='lower center', bbox_to_anchor=(0.6, -0.05))\n",
"fig.savefig('figures/resampling.pdf')"
"fig.savefig('figures_rerun/resampling.pdf')"
]
},
{
Expand All @@ -140,7 +152,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gaussian_baseline_path = './outdir/baseline_gaussian_*d/'\n",
Expand All @@ -152,7 +166,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gmm_baseline_path = './outdir/baseline_gmm_paper_*'\n",
Expand All @@ -164,17 +180,21 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"rosenbrock_path = './outdir/ins_rosenbrock_*d/'\n",
"rosenbrock_path = './outdir_rerun/ins_rosenbrock_*d/'\n",
"rosenbrock_results = load_all_results(rosenbrock_path, file=\"summary.json\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"rosenbrock_baseline_path = './outdir/baseline_rosenbrock_*d/'\n",
Expand All @@ -184,7 +204,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"all_results = [gaussian_results, gmm_results, rosenbrock_results]\n",
Expand All @@ -194,7 +216,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"references = [\"gaussian\", \"gaussian\", \"ins\"]\n",
Expand Down Expand Up @@ -317,7 +341,7 @@
"\n",
"# plt.tight_layout()\n",
"\n",
"fig.savefig(\"figures/comparison_all.pdf\")\n",
"fig.savefig(\"figures_rerun/comparison_all.pdf\")\n",
"\n"
]
},
Expand All @@ -331,7 +355,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"fig, axs = plt.subplots(1, 2, sharey=True)\n",
Expand Down Expand Up @@ -372,7 +398,7 @@
"\n",
"handles, labels = axs[0].get_legend_handles_labels()\n",
"fig.legend(handles, labels, title=\"Dimensions\", ncols=5, loc=\"lower center\", bbox_to_anchor=(0.5, -0.05))\n",
"fig.savefig(\"figures/uncertainty_pp_plots.pdf\")\n",
"fig.savefig(\"figures_rerun/uncertainty_pp_plots.pdf\")\n",
"plt.show()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion experiments/config.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# General config
OUTDIR=outdir/
OUTDIR=outdir_rerun/
# Random seed
SEED=1234
# Analytic likelihoods config
Expand Down
4 changes: 2 additions & 2 deletions experiments/nlive_comparison_results.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"metadata": {},
"outputs": [],
"source": [
"path = \"outdir/ins_nlive_gaussian_16d_nlive*\""
"path = \"outdir_rerun/ins_nlive_gaussian_16d_nlive*\""
]
},
{
Expand Down Expand Up @@ -141,7 +141,7 @@
"plt.tight_layout()\n",
"# plt.subplots_adjust(hspace=0.15)\n",
"\n",
"fig.savefig(\"figures/scaling.pdf\", bbox_inches=\"tight\")\n",
"fig.savefig(\"figures_rerun/scaling.pdf\", bbox_inches=\"tight\")\n",
"plt.show()"
]
},
Expand Down
6 changes: 4 additions & 2 deletions gw/bbh_parallelisation/parallelisation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"sys.path.append(basedir)\n",
"from utils import configure_plotting, load_json\n",
"\n",
"configure_plotting(basedir)"
"configure_plotting(basedir)\n",
"\n",
"os.environ[\"PATH\"] = os.pathsep.join((\"/usr/local/texlive/2022/bin/x86_64-linux\", os.environ[\"PATH\"]))"
]
},
{
Expand Down Expand Up @@ -310,7 +312,7 @@
" \n",
"plt.tight_layout()\n",
"plt.legend(handles=handles, labels=labels, loc=\"upper right\", ncol=2)\n",
"fig.savefig(\"figures/parallelisation.pdf\", bbox_inches=\"tight\")\n",
"fig.savefig(\"figures_rerun/parallelisation.pdf\", bbox_inches=\"tight\")\n",
"# plt.show()"
]
},
Expand Down
4 changes: 3 additions & 1 deletion gw/bbh_pp_test/inessai.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
accounting = ligo.dev.o4.cbc.pe.bilby

label = inessai
outdir = outdir_inessai
outdir = outdir_inessai_rerun

request-memory=20.0

Expand All @@ -16,6 +16,8 @@ phase-marginalization=True
distance-marginalization=True
time-marginalization=True

transfer-files = True

injection-file = precessing_injections.json
gaussian-noise = True
generation-seed = 12345
Expand Down
Loading

0 comments on commit 9e6ffa1

Please sign in to comment.