Misc improvements from N. Besch and P. Jamaux
Closes #9 and #79.
Added
- Add new
utc_range,utc_rangesandutc_ca_rangefunctions analog toet_range,et_rangesandet_ca_range:
>>> utc_range('2033-01-01T00:00:00', '2033-JAN-01 00:00:10', '5 sec')
array(['2033-01-01T00:00:00.000', '2033-01-01T00:00:05.000', '2033-01-01T00:00:10.000'], dtype='datetime64[ms]')
- New
AUunit andau_ticksticker, with an extended example on the gallery to illustrated how to use it:
>>> from planetary_coverage.ticks import AU
>>> AU
149,597,870.7 # [km]
- New math
distfunction:
>>> from planetary_coverage.math import dist
>>> dist([1, 0, 0], [-1, 0, 0])
2
- Add scatter plot in equirectangular map prohection:
fig = plt.figure(figsize=(15, 10))
ax = fig.add_subplot(projection=EUROPA)
ax.scatter(flyby, 'inc', s=flyby.alt / 1e2, vmin=0, vmax=90, cmap='turbo_r', cbar=True)
- Add
ax.set_view()to zoom on a given area (with/without margins):
fig = plt.figure(figsize=(6, 6))
ax = fig.add_subplot(projection=CALLISTO)
ax.add_patch(roi)
ax.set_view(221.5, 229.5, 40, 46.5, margin=15) # lon_e_0, lon_e_1, lat_0, lat_1 + 15 % margin
It is also possible to do ax.set_view(roi) to zoom on the ROI directly.
The same method can be used with any Trajectory object.
-
ax.set_xlim()andax.set_ylim()now reset the longitude and latitude ticks grid automatically.
Fixes
- Raise
ValueErrorwhen stop time is before start time:
>>> tour['2000-01-01':'1999-01-01']
ValueError: Stop time (1999-01-01) should be after start time (2000-01-01)
- Get a single point value if start time is equal to stop time:
>>> tour['2000-01-01':'2000-01-01']
<SpacecraftTrajectory> Observer: JUICE | Target: GANYMEDE
- UTC start time: 2000-01-01T00:00:00.000
- UTC stop time: 2000-01-01T00:00:00.000
- Nb of pts: 1
- Temporal numpy array can now be used in
TourConfig(raised error before):
tour[np.array(['2000-01-01', '2000-01-02'])]
dtype='object':
tour[np.array([123, '2000-01-02'], dtype='object')]
- Fix
km_ticksfor large values, eg.100,000,000 kminstead of1e+07 kmbefore:
- Fix
anglefunction for null vector:
>>> angle([1, 0, 0], [0, 0, 0])
0 # 90 before
- Bézier curves control points are replaced by regular polygons (before / after):
The contour of the patch is not correctly reproduced but in most case, the different should be small enough. See this comment for more details.
-
ROIno longer requires to have an explicit name (removeUnnameddefault value):
>>> ROI('Amset', lons_e=[180, 180, 185, 185], lats=[-18, -14, -14, -18])
<ROI> Amset
- Lons E: [180, 180, 185, 185]
- Lats: [-18, -14, -14, -18]
-
Fix text clipping outside the view area.
-
Fix
Juicecase in the docs instead ofJUICE.
Edited by benoit seignovert





