Skip to content

Commit

Permalink
Small tweaks in the notebooks to teset additional features of the lus…
Browse files Browse the repository at this point in the history
…eepy API
  • Loading branch information
buddhasystem committed Oct 31, 2023
1 parent 2352717 commit f02b6f7
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
1 change: 1 addition & 0 deletions DEVNOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ the development procerss.

* Added the temperature profile to the Sun class
* Added the sunrise index to the Sun class
* Improved the API in _luseepy_ so a tuple of start and end can be provided as an argument

## FIXME

Expand Down
47 changes: 32 additions & 15 deletions notebooks/lusee-test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [
{
Expand All @@ -21,14 +21,14 @@
"text": [
"Path:\n",
"-------------------------------------\n",
"path: /home/maxim/projects/lusee/opsim/notebooks\n",
"path: /home/maxim/projects/lusee/luseepy\n",
"path: /home/maxim/projects/lusee/opsim\n",
"path: /home/maxim/.virtualenvs/lusee/lib/python3.10/site-packages/backports\n",
"path: /usr/local/lib/python310.zip\n",
"path: /usr/local/lib/python3.10\n",
"path: /usr/local/lib/python3.10/lib-dynload\n",
"path: /home/maxim/.virtualenvs/lusee-simpy/lib/python3.10/site-packages\n",
"/home/maxim/projects/lusee/opsim/notebooks\n",
"/home/maxim/projects/lusee/luseepy\n",
"/home/maxim/projects/lusee/opsim\n",
"/home/maxim/.virtualenvs/lusee/lib/python3.10/site-packages/backports\n",
"/usr/local/lib/python310.zip\n",
"/usr/local/lib/python3.10\n",
"/usr/local/lib/python3.10/lib-dynload\n",
"/home/maxim/.virtualenvs/lusee-simpy/lib/python3.10/site-packages\n",
"-------------------------------------\n",
"lusee version: 1.2-dev\n"
]
Expand All @@ -47,15 +47,15 @@
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import lusee\n",
"from lusee import Observation\n",
"from lusee import Observation\n",
"\n",
"# import nav\n",
"from nav import * # includes luseepy\n",
"# ----------------------------------------------------\n",
"print(\"Path:\")\n",
"print(\"-------------------------------------\")\n",
"for path_part in sys.path:\n",
" if path_part!='': print(f'''path: {path_part}''')\n",
" if path_part!='': print(f'''{path_part}''')\n",
"print(\"-------------------------------------\")\n",
"print(f'''lusee version: {lusee.__version__}''')\n",
"\n"
Expand All @@ -65,15 +65,32 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"time: ('2025-02-10 00:00:00', '2025-02-11 23:45:00')\n",
"deltaT_sec: 100\n",
"lun_height_m: 0\n",
"lun_lun_long_deg: 182.258\n",
"lun_lun_lat_deg: -23.814\n"
]
}
],
"source": [
"# Basic test of the Observation object\n",
"interval = \"2025-02-10 00:00:00 to 2025-02-11 23:45:00\"\n",
"o = Observation(interval)\n",
"\n",
"tuple_test = (\"2025-02-10 00:00:00\", \"2025-02-11 23:45:00\")\n",
"o_test = Observation(tuple_test)\n",
"\n"
"o_test = Observation(tuple_test, deltaT_sec = 100)\n",
"\n",
"print(f'''time: {o_test.time}''')\n",
"print(f'''deltaT_sec: {o_test.deltaT_sec}''')\n",
"print(f'''lun_height_m: {o_test.lun_height_m}''')\n",
"print(f'''lun_lun_long_deg: {o_test.lun_long_deg}''')\n",
"print(f'''lun_lun_lat_deg: {o_test.lun_lat_deg}''')\n"
]
},
{
Expand All @@ -90,7 +107,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down
10 changes: 5 additions & 5 deletions notebooks/sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 1,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -107,7 +107,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -153,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -163,7 +163,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit f02b6f7

Please sign in to comment.