Skip to content

Commit

Permalink
Merge pull request #19 from dirac-institute/variable_name
Browse files Browse the repository at this point in the history
Updating variable name.
  • Loading branch information
mschwamb authored Mar 25, 2024
2 parents 9390421 + e58c1e5 commit 6c38327
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/notebooks/lightcurve/sinusoidal/sinusoidal_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -69,7 +69,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "sorcha_addons",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/lightcurve/sinusoidal/test_sinusoidal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 6c38327

Please sign in to comment.