Skip to content

Commit 2ebcd09

Browse files
committed
SpiceyPy 5.1.0
* adds wrappers for the majority of new function in n67
1 parent 7e920dd commit 2ebcd09

File tree

5 files changed

+60
-100
lines changed

5 files changed

+60
-100
lines changed

CHANGELOG.md

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,72 @@ All notable changes to SpiceyPy will be documented here
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project tries to adhere to [Semantic Versioning](http://semver.org/).
66

7+
## [5.1.0] - 2022-07-09
8+
adds wrappers for the majority of new function in n67
9+
### Added
10+
- azlcpo
11+
- azlrec
12+
- chbigr
13+
- chbint
14+
- chbval
15+
- ckfrot
16+
- ckfxfm
17+
- ckgr02
18+
- ckgr03
19+
- ckmeta
20+
- cknr02
21+
- cknr03
22+
- dafhsf
23+
- dasadc
24+
- dasadd
25+
- dasadi
26+
- dashfs
27+
- daslla
28+
- dasllc
29+
- dasonw
30+
- dasops
31+
- dasrdd
32+
- dasrdi
33+
- dasudd
34+
- dasudi
35+
- daswbr
36+
- dazldr
37+
- dlabns
38+
- dlaens
39+
- dlaopn
40+
- dnearp
41+
- drdazl
42+
- ednmpt
43+
- edpnt
44+
- evsgp4
45+
- getfvn
46+
- hrmesp
47+
- invstm
48+
- lgresp
49+
- lgrint
50+
- qderiv
51+
- recazl
52+
- stlabx
53+
- tagnpt
54+
- tkfram
55+
- tparch
56+
- trgsep
57+
- twovxf
58+
- vprojg
59+
60+
### Fixed
61+
- fixed docstring for frinfo
62+
- fixed freebsd support in getspice
63+
764
## [5.0.1] - 2022-03-23
865
minor update to make ld_library_path update safer
9-
1066
### Fixed
1167
- override of ld_library_path is now temporary
1268

1369
### Changed
1470
- updated copyrights for 2022
1571

1672
## [5.0.0] - 2022-02-17
17-
1873
### Changed
1974
- switched to N67 CSPICE, no new wrapper functions yet
2075
- removed deprecated named args mentioned in 4.0.1 release notes
@@ -25,7 +80,6 @@ minor update to make ld_library_path update safer
2580
- ndim param for: unormg, vaddg, vdistg, vdotg, vequg, vhatg, vminug, vnromg, vrelg, vsclg, vsepg, vsubg, vzerog
2681

2782
## [4.0.3] - 2021-11-14
28-
2983
### Added
3084
- changelog now rendered in docs
3185
- runtime override of cspice via env var or ld_library_path
@@ -42,7 +96,6 @@ minor update to make ld_library_path update safer
4296
- updated install commands in docs to use pip instead of setup.py
4397

4498
## [4.0.2] - 2021-08-13
45-
4699
### Fixed
47100
- getfat variables size #420
48101
- safer cleanups in tests

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
# built documents.
6666
#
6767
# The short X.Y version.
68-
version = "5.0.1"
68+
version = "5.1.0"
6969
# The full version, including alpha/beta/rc tags.
70-
release = "5.0.1"
70+
release = "5.1.0"
7171

7272
# The language for content autogenerated by Sphinx. Refer to documentation
7373
# for a list of supported languages.

src/spiceypy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424
__author__ = "AndrewAnnex"
25-
__version__ = "5.0.1"
25+
__version__ = "5.1.0"
2626

2727
from .spiceypy import *
2828
from .utils import support_types

src/spiceypy/spiceypy.py

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,38 +2759,6 @@ def dasopw(fname: str) -> int:
27592759
return handle.value
27602760

27612761

2762-
@spice_error_check
2763-
def dasrdc(
2764-
handle: int, first: int, last: int, bpos: int, epos: int, datlen: int
2765-
) -> list:
2766-
"""
2767-
Read character data from a range of DAS logical addresses.
2768-
2769-
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasrdc_c.html
2770-
2771-
:param handle: DAS file handle.
2772-
:param first: start range of DAS character logical addresses.
2773-
:param last: end range of DAS character logical addresses.
2774-
:param bpos: end positions of substrings.
2775-
:param epos: begin positions of substrings.
2776-
:param datlen: Common length of the character arrays in data.
2777-
:return: Data having addresses first through last.
2778-
"""
2779-
_handle = ctypes.c_int(handle)
2780-
_first = ctypes.c_int(first)
2781-
_last = ctypes.c_int(last)
2782-
_bpos = ctypes.c_int(bpos)
2783-
_epos = ctypes.c_int(epos)
2784-
_datlen = ctypes.c_int(datlen)
2785-
sublen = epos - bpos + 1
2786-
r = int((last - first + sublen) // sublen)
2787-
_data = stypes.empty_char_array(x_len=epos + 1, y_len=r)
2788-
libspice.dasrdc_c(
2789-
_handle, _first, _last, _bpos, _epos, _datlen, ctypes.byref(_data)
2790-
)
2791-
return stypes.c_vector_to_python(_data)
2792-
2793-
27942762
@spice_error_check
27952763
def dasrdd(handle: int, first: int, last: int) -> ndarray:
27962764
"""
@@ -2876,41 +2844,6 @@ def dasrfr(
28762844
)
28772845

28782846

2879-
@spice_error_check
2880-
def dasudc(
2881-
handle: int,
2882-
first: int,
2883-
last: int,
2884-
bpos: int,
2885-
epos: int,
2886-
datlen: int,
2887-
data: Sequence[str],
2888-
) -> None:
2889-
"""
2890-
Update character data in a specified range of DAS logical
2891-
addresses with substrings of a character array.
2892-
2893-
https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/dasudc_c.html
2894-
2895-
:param handle: DAS file handle.
2896-
:param last: Range of DAS character logical addresses.
2897-
:param bpos: Begin and end positions of substrings.
2898-
:param epos: Begin and end positions of substrings.
2899-
:param datlen: Common length of the character arrays in data.
2900-
:param data: Data having addresses first through last.
2901-
"""
2902-
_handle = ctypes.c_int(handle)
2903-
_first = ctypes.c_int(first)
2904-
_last = ctypes.c_int(last)
2905-
_bpos = ctypes.c_int(bpos)
2906-
_epos = ctypes.c_int(epos)
2907-
_datlen = ctypes.c_int(datlen)
2908-
sublen = epos - bpos + 1
2909-
r = int((last - first + sublen) // sublen)
2910-
_data = stypes.list_to_char_array_ptr(data, x_len=epos + 1, y_len=r)
2911-
libspice.dasudc_c(_handle, _first, _last, _bpos, _epos, _datlen, _data)
2912-
2913-
29142847
@spice_error_check
29152848
def dasudd(handle: int, first: int, last: int, data: ndarray) -> None:
29162849
"""

src/spiceypy/tests/test_wrapper.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,32 +1974,6 @@ def test_dpr():
19741974
assert spice.dpr() == 180.0 / np.arccos(-1.0)
19751975

19761976

1977-
@pytest.mark.xfail
1978-
def test_dasudc_dasrdc():
1979-
daspath = os.path.join(cwd, "ex_dasudc.das")
1980-
cleanup_kernel(daspath)
1981-
handle = spice.dasonw(daspath, "TEST", "ex_dasudc", 140)
1982-
idata = ["oooo", "xxxx"]
1983-
spice.dasadc(handle, 8, 0, 3, 4, idata) # write initial contents
1984-
spice.dascls(handle)
1985-
# read the file
1986-
handle = spice.dasopr(daspath)
1987-
rdata = spice.dasrdc(handle, 1, 8, 0, 3, 4)
1988-
assert rdata == idata
1989-
spice.dascls(handle)
1990-
# update the file
1991-
handle = spice.dasopw(daspath)
1992-
fdata = ["yyyy", "xxaa"]
1993-
spice.dasudc(handle, 1, 4, 0, 3, 4, fdata) # update contents
1994-
spice.dascls(handle)
1995-
# load and ensure data was written
1996-
handle = spice.dasopr(daspath)
1997-
rdata = spice.dasrdc(handle, 1, 4, 0, 3, 4)
1998-
assert rdata == fdata
1999-
spice.dascls(handle)
2000-
cleanup_kernel(daspath)
2001-
2002-
20031977
def test_dasudi_dasrdi():
20041978
daspath = os.path.join(cwd, "ex_dasudi.das")
20051979
cleanup_kernel(daspath)

0 commit comments

Comments
 (0)