From a7030a3e3a9f3db1cb2313925963b53ac3d78edd Mon Sep 17 00:00:00 2001 From: Matt Craig Date: Sat, 30 Nov 2024 20:08:41 -1000 Subject: [PATCH] Fix name and a couple bugs in transit model notebook --- .jp_app_launcher_stellarphot.yaml | 2 +- ...odel-fit.ipynb => tess-initial-model-fit.ipynb} | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) rename stellarphot/notebooks/{tess-intial-model-fit.ipynb => tess-initial-model-fit.ipynb} (97%) diff --git a/.jp_app_launcher_stellarphot.yaml b/.jp_app_launcher_stellarphot.yaml index 2231f776..6e67a623 100644 --- a/.jp_app_launcher_stellarphot.yaml +++ b/.jp_app_launcher_stellarphot.yaml @@ -54,7 +54,7 @@ - title: Initial exoplanet model description: Do an initial fit to a transit - source: ../stellarphot/tess-intial-model-fit.ipynb + source: ../stellarphot/tess-initial-model-fit.ipynb icon: ../stellarphot/stellarphot-logo.svg cwd: not_used type: notebook diff --git a/stellarphot/notebooks/tess-intial-model-fit.ipynb b/stellarphot/notebooks/tess-initial-model-fit.ipynb similarity index 97% rename from stellarphot/notebooks/tess-intial-model-fit.ipynb rename to stellarphot/notebooks/tess-initial-model-fit.ipynb index 6340166d..6dfac6d7 100644 --- a/stellarphot/notebooks/tess-intial-model-fit.ipynb +++ b/stellarphot/notebooks/tess-initial-model-fit.ipynb @@ -69,6 +69,16 @@ "### Get just the target star and some information about it" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "if np.isnan(inp_photometry['bjd']).all():\n", + " inp_photometry.add_bjd_col()\n" + ] + }, { "cell_type": "code", "execution_count": null, @@ -198,7 +208,7 @@ "binned2 = aggregate_downsample(ts2, time_bin_size=model_options.bin_size * u.min, aggregate_func=add_quad)\n", "\n", "binned[\"normalized_flux_error\"] = binned2[\"normalized_flux_error\"]\n", - "# binned_time = BinnedTimeSeries(photometry['bjd'], time_bin_start=first_time, time_bin_end=last_time, time_bin_size=bin_size)" + "binned = binned[~np.isnan(binned[\"normalized_flux\"])]" ] }, { @@ -389,7 +399,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.8" + "version": "3.11.9" } }, "nbformat": 4,