Inital spice manager for time conversion#3
Conversation
ff63bd4 to
0a632b8
Compare
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
===========================================
- Coverage 100.00% 98.96% -1.04%
===========================================
Files 2 3 +1
Lines 64 97 +33
===========================================
+ Hits 64 96 +32
- Misses 0 1 +1
Continue to review full report at Codecov.
|
80e4a25 to
6ca5047
Compare
| self.mk_path = Path(meta_kernel_path) | ||
| *_, datestamp, version = self.mk_path.name.split('_') | ||
| self.kernel_date = datetime.strptime(datestamp, '%Y%m%d') | ||
| spice.furnsh(str(meta_kernel_path)) |
There was a problem hiding this comment.
I think as spicepy is a wrapper around the CSPICE library it appears to be global in that kernels loaded in one module / function will be available anywhere spicepy is imported. A actual context manager might be a better approach but not sure.
| if isinstance(datetime, Time): | ||
| datetime = datetime.to_datetime() | ||
| et = spice.datetime2et(datetime) |
There was a problem hiding this comment.
a type check might help in long term
crashes with: datetime_to_scet(1)
There was a problem hiding this comment.
I can add a check to make sure its a string, it's not very pythonic in general but in this case probably makes sense.
91f679e to
0a74d69
Compare
0a74d69 to
7db4e42
Compare
Inital spice manager for time conversion
No description provided.