Skip to content

Commit

Permalink
Merge pull request #27 from emolter/active-dev
Browse files Browse the repository at this point in the history
fixed imports by changing init files
  • Loading branch information
emolter authored Jul 22, 2023
2 parents 03807de + 3693c4c commit 7ee2e4c
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 68 deletions.
58 changes: 16 additions & 42 deletions notebooks/nav-tutorial.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions notebooks/ring-system-modeling-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
" mean median ... var sum \n",
"----------------- ----------------- ... ------------------ -----------------\n",
"36.14308731686408 25.11417579650879 ... 1011.9609202491774 1818902.802280782\n"
" mean median std var sum \n",
"----------------- ----------------- ------------------ ------------------ -----------------\n",
"36.14308731686408 25.11417579650879 31.811333204522843 1011.9609202491774 1818902.802280782\n"
]
}
],
Expand Down Expand Up @@ -614,7 +614,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/g0/r491pzqx4kx0tfmpx8970ntm0000gn/T/ipykernel_61861/668933652.py:33: UserWarning: FixedFormatter should only be used together with FixedLocator\n",
"/var/folders/g0/r491pzqx4kx0tfmpx8970ntm0000gn/T/ipykernel_56602/668933652.py:33: UserWarning: FixedFormatter should only be used together with FixedLocator\n",
" ax.set_xticklabels(ax.get_xticks()/1000)\n"
]
},
Expand Down Expand Up @@ -1020,7 +1020,7 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 26,
"id": "5d1cd377",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1064,7 +1064,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 27,
"id": "8ce1410f",
"metadata": {},
"outputs": [
Expand All @@ -1075,7 +1075,7 @@
"<IPython.core.display.Image object>"
]
},
"execution_count": 29,
"execution_count": 27,
"metadata": {
"image/gif": {
"height": 600,
Expand Down
20 changes: 10 additions & 10 deletions notebooks/utils-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"id": "9210d119",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -159,10 +159,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
" targetname datetime_str datetime_jd solar_presence flags RA DEC RA_app DEC_app RA_rate DEC_rate AZ EL AZ_rate EL_rate sat_X sat_Y sat_PANG siderealtime airmass magextinct V surfbright illumination illum_defect sat_sep sat_vis ang_width PDObsLon PDObsLat PDSunLon PDSunLat SubSol_ang SubSol_dist NPole_ang NPole_dist EclLon EclLat r r_rate delta delta_rate lighttime vel_sun vel_obs elong elongFlag alpha lunar_elong lunar_illum sat_alpha sunTargetPA velocityPA OrbPlaneAng constellation TDB-UT ObsEclLon ObsEclLat NPole_RA NPole_DEC GlxLon GlxLat solartime earth_lighttime RA_3sigma DEC_3sigma SMAA_3sigma SMIA_3sigma Theta_3sigma Area_3sigma RSS_3sigma r_3sigma r_rate_3sigma SBand_3sigma XBand_3sigma DoppDelay_3sigma true_anom hour_angle alpha_true PABLon PABLat\n",
" --- --- d --- --- deg deg deg deg arcsec / h arcsec / h deg deg arcsec / min arcsec / min arcsec arcsec deg --- --- mag mag mag / arcsec2 % arcsec arcsec --- arcsec deg deg deg deg deg arcsec deg arcsec deg deg AU km / s AU km / s min km / s km / s deg --- deg deg % deg deg deg deg --- s deg deg deg deg deg deg --- min arcsec arcsec arcsec arcsec deg arcsec2 arcsec km km / s Hz Hz s deg --- deg deg deg \n",
"------------- -------------------- ----------------- -------------- ----- -------- ------- -------- ------- ---------- ---------- --- --- ------------ ------------ -------- -------- -------- ------------ ------- ---------- ------ ------------- ------------ ------------ -------- ------- --------- ---------- -------- ---------- -------- ---------- ----------- --------- ---------- ------- ------ -------------- --------- ---------------- ---------- ----------- ---------- ---------- ------ --------- ------ ----------- ----------- --------- ----------- ---------- ----------- ------------- --------- ---------- ---------- --------- --------- ---------- ---------- --------- --------------- --------- ---------- ----------- ----------- ------------ ----------- ---------- -------- ------------- ------------ ------------ ---------------- --------- ---------- ---------- ------ -------\n",
"Jupiter (599) 2023-May-02 21:26:31 2460067.393414352 24.93604 9.21753 25.23567 9.33307 33.09154 12.71324 -- -- -- -- -50442.1 -22210.4 248.213 -- 999 -- -2.054 5.295 99.92618 0.0246 55706.41 * 33.31284 217.986259 3.116942 221.101303 3.259532 65.06 0.9 337.4405 15.553 23.3577 -1.271 4.954060028596 0.1027113 5.91800735730444 -6.6025343 49.21856637 13.7038615 42.7786264 15.474 /L 3.1084 161.2 91.3389 161.4176 245.014 248.507 -0.18898 Psc 69.185475 26.7802765 -1.0626817 268.05808 64.49681 142.440131 -51.817859 -- 0.0 -- -- -- -- -- -- -- -- -- -- -- -- 9.1749 -- 3.1139 24.909 -1.1681\n"
" targetname datetime_str datetime_jd solar_presence lunar_presence RA DEC RA_app DEC_app RA_rate DEC_rate AZ EL AZ_rate EL_rate sat_X sat_Y sat_PANG siderealtime airmass magextinct V surfbright illumination illum_defect sat_sep sat_vis ang_width PDObsLon PDObsLat PDSunLon PDSunLat SubSol_ang SubSol_dist NPole_ang NPole_dist EclLon EclLat r r_rate delta delta_rate lighttime vel_sun vel_obs elong elongFlag alpha lunar_elong lunar_illum sat_alpha sunTargetPA velocityPA OrbPlaneAng constellation TDB-UT ObsEclLon ObsEclLat NPole_RA NPole_DEC GlxLon GlxLat solartime earth_lighttime RA_3sigma DEC_3sigma SMAA_3sigma SMIA_3sigma Theta_3sigma Area_3sigma RSS_3sigma r_3sigma r_rate_3sigma SBand_3sigma XBand_3sigma DoppDelay_3sigma true_anom hour_angle alpha_true PABLon PABLat\n",
" --- --- d --- --- deg deg deg deg arcsec / h arcsec / h deg deg arcsec / min arcsec / min arcsec arcsec deg --- --- mag mag mag / arcsec2 % arcsec arcsec --- arcsec deg deg deg deg deg arcsec deg arcsec deg deg AU km / s AU km / s min km / s km / s deg --- deg deg % deg deg deg deg --- s deg deg deg deg deg deg --- min arcsec arcsec arcsec arcsec deg arcsec2 arcsec km km / s Hz Hz s deg --- deg deg deg \n",
"------------- -------------------- ----------------- -------------- -------------- -------- ------- -------- -------- ---------- ---------- --- --- ------------ ------------ ---------- --------- -------- ------------ ------- ---------- ------ ------------- ------------ ------------ -------- ------- --------- ---------- -------- ---------- -------- ---------- ----------- --------- ---------- ------- ------- -------------- --------- ---------------- ----------- ---------- ---------- ---------- ------- --------- ------- ----------- ----------- --------- ----------- ---------- ----------- ------------- --------- ---------- ---------- --------- --------- ---------- ---------- --------- --------------- --------- ---------- ----------- ----------- ------------ ----------- ---------- -------- ------------- ------------ ------------ ---------------- --------- ---------- ---------- ------- -------\n",
"Jupiter (599) 2023-Jul-22 16:01:24 2460148.167638889 40.19323 14.3796 40.51321 14.48005 18.54264 5.443738 -- -- -- -- -274490.01 -20707.16 280.868 -- 999 -- -2.307 5.361 98.99349 0.3899 277295.3 * 38.74003 323.215891 3.647646 334.746749 3.418082 72.12 3.87 341.4351 18.077 30.7442 -1.2232 4.960726995505 0.1816532 5.08893897707319 -25.6870428 42.3234149 13.6849002 32.4407047 77.0265 /L 11.5145 130.5 20.383 91.459 252.035 251.603 0.08438 Ari 69.183559 42.5857459 -1.1904864 268.05806 64.49679 158.877077 -40.739407 -- 0.0 -- -- -- -- -- -- -- -- -- -- -- -- 16.4597 -- 11.5158 36.5008 -1.2142\n"
]
}
],
Expand All @@ -181,18 +181,18 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 6,
"id": "30d6e637",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" targetname datetime_str datetime_jd solar_presence flags RA DEC RA_app DEC_app RA_rate DEC_rate AZ EL AZ_rate EL_rate sat_X sat_Y sat_PANG siderealtime airmass magextinct V surfbright illumination illum_defect sat_sep sat_vis ang_width PDObsLon PDObsLat PDSunLon PDSunLat SubSol_ang SubSol_dist NPole_ang NPole_dist EclLon EclLat r r_rate delta delta_rate lighttime vel_sun vel_obs elong elongFlag alpha lunar_elong lunar_illum sat_alpha sunTargetPA velocityPA OrbPlaneAng constellation TDB-UT ObsEclLon ObsEclLat NPole_RA NPole_DEC GlxLon GlxLat solartime earth_lighttime RA_3sigma DEC_3sigma SMAA_3sigma SMIA_3sigma Theta_3sigma Area_3sigma RSS_3sigma r_3sigma r_rate_3sigma SBand_3sigma XBand_3sigma DoppDelay_3sigma true_anom hour_angle alpha_true PABLon PABLat\n",
" --- --- d --- --- deg deg deg deg arcsec / h arcsec / h deg deg arcsec / min arcsec / min arcsec arcsec deg --- --- mag mag mag / arcsec2 % arcsec arcsec --- arcsec deg deg deg deg deg arcsec deg arcsec deg deg AU km / s AU km / s min km / s km / s deg --- deg deg % deg deg deg deg --- s deg deg deg deg deg deg --- min arcsec arcsec arcsec arcsec deg arcsec2 arcsec km km / s Hz Hz s deg --- deg deg deg \n",
"------------- ----------------- ----------------- -------------- ----- --------- --------- --------- --------- ---------- ---------- ---------- --------- ------------ ------------ ---------- ---------- -------- ------------ ------- ---------- ----- ------------- ------------ ------------ -------- ------- --------- --------- --------- -------- -------- ---------- ----------- --------- ---------- -------- ------ -------------- ---------- ---------------- ---------- ----------- --------- ---------- -------- --------- ------ ----------- ----------- --------- ----------- ---------- ----------- ------------- --------- ----------- --------- --------- --------- ---------- --------- ------------- --------------- --------- ---------- ----------- ----------- ------------ ----------- ---------- -------- ------------- ------------ ------------ ---------------- --------- ------------ ---------- ------- ------\n",
"Jupiter (599) 1994-Jul-16 20:13 2449550.342361111 * 213.25946 -12.18286 213.19106 -12.15803 5.902723 -2.87891 103.892463 -1.205187 501.78 725.51 326174.133 -120437.47 98.876 8.6713333888 999 -- -2.11 5.541 99.14532 0.3284 363714.1 * 38.42845 81.605459 -3.417513 70.98207 -3.56489 289.67 3.54 20.6435 -17.936 225.7758 1.0648 5.417202860036 -0.3161016 5.13020024376608 25.7802051 42.66657439 12.534906 26.6589241 101.0317 /T 10.608 2.924 59.9989 68.3603 109.651 289.99 0.06118 Vir 61.183653 215.0912804 1.124912 268.05799 64.4958 332.296937 45.984193 12.9415708965 0.000354 -- -- -- -- -- -- -- -- -- -- -- -- 210.4525 -5.541404253 10.609 220.468 1.0993\n"
" targetname datetime_str datetime_jd solar_presence lunar_presence RA DEC RA_app DEC_app RA_rate DEC_rate AZ EL AZ_rate EL_rate sat_X sat_Y sat_PANG siderealtime airmass magextinct V surfbright illumination illum_defect sat_sep sat_vis ang_width PDObsLon PDObsLat PDSunLon PDSunLat SubSol_ang SubSol_dist NPole_ang NPole_dist EclLon EclLat r r_rate delta delta_rate lighttime vel_sun vel_obs elong elongFlag alpha lunar_elong lunar_illum sat_alpha sunTargetPA velocityPA OrbPlaneAng constellation TDB-UT ObsEclLon ObsEclLat NPole_RA NPole_DEC GlxLon GlxLat solartime earth_lighttime RA_3sigma DEC_3sigma SMAA_3sigma SMIA_3sigma Theta_3sigma Area_3sigma RSS_3sigma r_3sigma r_rate_3sigma SBand_3sigma XBand_3sigma DoppDelay_3sigma true_anom hour_angle alpha_true PABLon PABLat\n",
" --- --- d --- --- deg deg deg deg arcsec / h arcsec / h deg deg arcsec / min arcsec / min arcsec arcsec deg --- --- mag mag mag / arcsec2 % arcsec arcsec --- arcsec deg deg deg deg deg arcsec deg arcsec deg deg AU km / s AU km / s min km / s km / s deg --- deg deg % deg deg deg deg --- s deg deg deg deg deg deg --- min arcsec arcsec arcsec arcsec deg arcsec2 arcsec km km / s Hz Hz s deg --- deg deg deg \n",
"------------- ----------------- ----------------- -------------- -------------- --------- --------- --------- --------- ---------- ---------- ---------- --------- ------------ ------------ ---------- ---------- -------- ------------ ------- ---------- ----- ------------- ------------ ------------ -------- ------- --------- --------- --------- -------- -------- ---------- ----------- --------- ---------- -------- ------ -------------- ---------- ---------------- ---------- ----------- --------- ---------- -------- --------- ------ ----------- ----------- --------- ----------- ---------- ----------- ------------- --------- ----------- --------- --------- --------- ---------- --------- ------------- --------------- --------- ---------- ----------- ----------- ------------ ----------- ---------- -------- ------------- ------------ ------------ ---------------- --------- ------------ ---------- ------- ------\n",
"Jupiter (599) 1994-Jul-16 20:13 2449550.342361111 * 213.25946 -12.18286 213.19106 -12.15803 5.902723 -2.87891 103.892463 -1.205187 501.78 725.51 326174.133 -120437.47 98.876 8.6713333888 999 -- -2.11 5.541 99.14532 0.3284 363714.1 * 38.42845 81.605459 -3.417513 70.98207 -3.56489 289.67 3.54 20.6435 -17.936 225.7758 1.0648 5.417202860036 -0.3161016 5.13020024376608 25.7802051 42.66657439 12.534906 26.6589241 101.0317 /T 10.608 2.924 59.9989 68.3603 109.651 289.99 0.06118 Vir 61.183653 215.0912804 1.124912 268.05799 64.4958 332.296937 45.984193 12.9415708965 0.000354 -- -- -- -- -- -- -- -- -- -- -- -- 210.4525 -5.541404253 10.609 220.468 1.0993\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions pylanetary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from ._astropy_init import * # noqa
# ----------------------------------------------------------------------------

__all__ = []
#__all__ = []
# Then you can be explicit to control what ends up in the namespace,
__all__ += [] # noqa
#__all__ += [] # noqa
# or you can keep everything from the subpackage with the following instead
# __all__ += example_mod.__all__
Binary file modified pylanetary/navigation/tests/data/lat_g_keck.npy
Binary file not shown.
Binary file modified pylanetary/navigation/tests/data/ldmodel.npy
Binary file not shown.
Binary file modified pylanetary/navigation/tests/data/mu_projected.npy
Binary file not shown.
Binary file modified pylanetary/navigation/tests/data/projected.npy
Binary file not shown.
6 changes: 3 additions & 3 deletions pylanetary/navigation/tests/test_nav_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ def test_navigation(datadir):
# load data, ephem, lat_g, lon_w, mu
obs_time = '2019-10-28 08:50:50'
obs_code=568 #Keck Horizons observatory code
pixscale_arcsec = 0.009942 #arcsec, keck
pixscale_arcsec = 0.009971 #arcsec, keck
flux=2000
a=0.1
beam=0.05
beam=0.5
keck_uranus = np.load(os.path.join(datadir, 'keck_uranus.npy'))


ura = Body('Uranus', epoch=obs_time, location=obs_code)
nav = navigation.Nav(keck_uranus, ura, pixscale_arcsec)

ldmodel_expected = np.load(os.path.join(datadir, 'ldmodel.npy'))
ldmodel = nav.ldmodel(flux, a, beam = beam, law='exp')

assert np.allclose(ldmodel, ldmodel_expected, rtol=1e-5, equal_nan=True)

# test co-location algorithms
Expand Down
8 changes: 4 additions & 4 deletions pylanetary/rings/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .core import *

__all__ = [
"Ring",
"RingSystemModelObservation"
]
#__all__ = [
# "Ring",
# "RingSystemModelObservation"
#]

0 comments on commit 7ee2e4c

Please sign in to comment.