Skip to content

Commit

Permalink
Fixed references to conj_calc.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
KCollins committed Sep 18, 2024
1 parent 95d0db5 commit 20e0947
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 26 deletions.
8 changes: 5 additions & 3 deletions conjugate_map/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""init.py"""

from importlib import metadata

from conjugate_map.conjCalcFunctions import calc_mlat_rings
from conjugate_map.conjCalcFunctions import conjcalc
from conjugate_map.conjCalcFunctions import findconj
from conjugate_map.conj_calc import calc_mlat_rings
from conjugate_map.conj_calc import conjcalc
from conjugate_map.conj_calc import findconj

# Set version
__version__ = metadata.version('conjugate_map')
29 changes: 24 additions & 5 deletions notebooks/ConjugateMap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "7c2caf78-4aad-4dc3-955f-8930304a22e8",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Load IGRF coefficients ...\n"
]
}
],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
Expand All @@ -54,7 +62,7 @@
"\n",
"# Import functions:\n",
"import datetime\n",
"import conjugate_map.conjCalcFunctions as conj"
"import conjugate_map.conj_calc as conj"
]
},
{
Expand All @@ -72,10 +80,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "b2a0e98a-519e-4f5d-91e6-71976b2bef44",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Geopack: \n",
"(39.240006321966526, 291.07394597054764)\n",
"AACGM: \n",
"(36.700798441742975, -68.00768971281151)\n"
]
}
],
"source": [
"ut = dt.datetime(1980, 11, 3, 18, 0, 0)\n",
"lat, lon = [-64, -64]\n",
Expand Down
44 changes: 26 additions & 18 deletions notebooks/MWE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 1,
"id": "ec3504cd-321d-44f1-9f16-d734bb36803f",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Load IGRF coefficients ...\n"
]
}
],
"source": [
"import conjugate_map.conj_calc as conj\n",
"import datetime as dt\n",
"import pandas as pd\n",
"import conjugate_map.conjCalcFunctions as conj"
"import pandas as pd"
]
},
{
Expand All @@ -30,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"id": "f317508d-cb3b-4460-a34e-2cc68db06b36",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -76,7 +84,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"id": "d8dcceae-625c-4dc3-ac19-65b0421bf6fe",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -143,7 +151,7 @@
"3 SSI 40.019511 -105.240014"
]
},
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -168,7 +176,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"id": "c9a95d25-9fc2-4956-9ce7-16c446b8d377",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -208,17 +216,17 @@
" <td>-77.846323</td>\n",
" <td>166.668235</td>\n",
" <td>S</td>\n",
" <td>72.903812</td>\n",
" <td>-97.197534</td>\n",
" <td>72.903864</td>\n",
" <td>-97.197593</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>SPA</td>\n",
" <td>-90.000000</td>\n",
" <td>0.000000</td>\n",
" <td>S</td>\n",
" <td>68.065575</td>\n",
" <td>-66.258363</td>\n",
" <td>68.065639</td>\n",
" <td>-66.258335</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
Expand All @@ -244,13 +252,13 @@
],
"text/plain": [
" Name lat lon Hemisphere PLAT PLON\n",
"0 McMurdo -77.846323 166.668235 S 72.903812 -97.197534\n",
"1 SPA -90.000000 0.000000 S 68.065575 -66.258363\n",
"0 McMurdo -77.846323 166.668235 S 72.903864 -97.197593\n",
"1 SPA -90.000000 0.000000 S 68.065639 -66.258335\n",
"2 PGC 44.984308 -93.182207 N 44.984308 -93.182207\n",
"3 SSI 40.019511 -105.240014 N 40.019511 -105.240014"
]
},
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -269,17 +277,17 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 5,
"id": "b0813286-2a83-4262-9a68-7cda035760cd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Help on function conjcalc in module conjugate_map.conjCalcFunctions:\n",
"Help on function conjcalc in module conjugate_map.conj_calc:\n",
"\n",
"conjcalc(gdf, latname='GLAT', lonname='GLON', dtime=datetime.datetime(2024, 9, 17, 19, 48, 17, 133527, tzinfo=datetime.timezone.utc), is_verbose=False, method='aacgm', mode='S2N', is_saved=False, directory='output/', name='stations')\n",
"conjcalc(gdf, latname='GLAT', lonname='GLON', dtime=datetime.datetime(2024, 9, 18, 1, 18, 15, 128633, tzinfo=datetime.timezone.utc), is_verbose=False, method='aacgm', mode='S2N', is_saved=False, directory='output/', name='stations')\n",
" Calculate the geographic latitudes and longitudes of conjugate points for\n",
" all points in a dataframe. Calls findconj().\n",
" \n",
Expand Down

0 comments on commit 20e0947

Please sign in to comment.