From 7e762ad610288dfc66a71e3bfda5c20ca398803a Mon Sep 17 00:00:00 2001 From: Steph Merritt Date: Mon, 25 Mar 2024 14:44:03 +0000 Subject: [PATCH 1/3] Updating variable name. --- .../lightcurve/sinusoidal/sinusoidal_lightcurve.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sorcha_addons/lightcurve/sinusoidal/sinusoidal_lightcurve.py b/src/sorcha_addons/lightcurve/sinusoidal/sinusoidal_lightcurve.py index 2b7008e..9a271f3 100644 --- a/src/sorcha_addons/lightcurve/sinusoidal/sinusoidal_lightcurve.py +++ b/src/sorcha_addons/lightcurve/sinusoidal/sinusoidal_lightcurve.py @@ -17,7 +17,7 @@ class SinusoidalLightCurve(AbstractLightCurve): * ``Time0`` - phase for the light curve [days]. """ - def __init__(self, required_column_names: List[str] = ["FieldMJD_TAI", "LCA", "Period", "Time0"]) -> None: + def __init__(self, required_column_names: List[str] = ["fieldMJD_TAI", "LCA", "Period", "Time0"]) -> None: super().__init__(required_column_names) def compute(self, df: pd.DataFrame) -> np.array: @@ -39,7 +39,7 @@ def compute(self, df: pd.DataFrame) -> np.array: # Verify that the input data frame contains each of the required columns. self._validate_column_names(df) - time = 2 * np.pi * (df["FieldMJD_TAI"] - df["Time0"]) / df["Period"] + time = 2 * np.pi * (df["fieldMJD_TAI"] - df["Time0"]) / df["Period"] return df["LCA"] * np.sin(time) @staticmethod From 365f54dd963feedf1bd33e73614755084cb7d398 Mon Sep 17 00:00:00 2001 From: Steph Merritt Date: Mon, 25 Mar 2024 14:47:55 +0000 Subject: [PATCH 2/3] Updating test. --- tests/lightcurve/sinusoidal/test_sinusoidal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lightcurve/sinusoidal/test_sinusoidal.py b/tests/lightcurve/sinusoidal/test_sinusoidal.py index e1cb6bb..37bdee1 100644 --- a/tests/lightcurve/sinusoidal/test_sinusoidal.py +++ b/tests/lightcurve/sinusoidal/test_sinusoidal.py @@ -9,7 +9,7 @@ def test_sinusoidal_lightcurve_name(): def test_compute_simple(): data_dict = { - "FieldMJD_TAI": [1.0 / 4], + "fieldMJD_TAI": [1.0 / 4], "LCA": [1], "Period": [1], "Time0": [0], From e58c1e5f0330a8695addc95c3972286cca5d766b Mon Sep 17 00:00:00 2001 From: Steph Merritt Date: Mon, 25 Mar 2024 14:51:33 +0000 Subject: [PATCH 3/3] Updating notebook. --- .../lightcurve/sinusoidal/sinusoidal_example.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/notebooks/lightcurve/sinusoidal/sinusoidal_example.ipynb b/docs/notebooks/lightcurve/sinusoidal/sinusoidal_example.ipynb index 93ec9f9..05e2738 100644 --- a/docs/notebooks/lightcurve/sinusoidal/sinusoidal_example.ipynb +++ b/docs/notebooks/lightcurve/sinusoidal/sinusoidal_example.ipynb @@ -41,7 +41,7 @@ "import pandas as pd\n", "\n", "data_dict = {\n", - " 'FieldMJD_TAI': [60277.351867, 60289.319749, 60289.330920, 60292.334497, 60292.346208],\n", + " 'fieldMJD_TAI': [60277.351867, 60289.319749, 60289.330920, 60292.334497, 60292.346208],\n", " 'LCA': [1, 1, 1, 1, 1],\n", " 'Period': [0.001, 0.001, 0.001, 0.001, 0.001],\n", " 'Time0': [60277.351867, 60277.351867, 60277.351867, 60277.351867, 60277.351867],\n", @@ -69,7 +69,7 @@ ], "metadata": { "kernelspec": { - "display_name": "sorcha_addons", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -83,9 +83,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.13" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }