-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stix cube #119
base: main
Are you sure you want to change the base?
Stix cube #119
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
===========================================
- Coverage 72.53% 26.54% -45.99%
===========================================
Files 31 32 +1
Lines 1857 1891 +34
===========================================
- Hits 1347 502 -845
- Misses 510 1389 +879 ☔ View full report in Codecov by Sentry. |
|
||
# I'm not sure what should live in the meta vs extra_coords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ndcube-land, a coordinate is a strictly monotonic sampling of a coordinate space, i.e., the values must be numerical, ordered and strictly increasing or decreasing. If your property doesn't satisfy this, then it's axis-aligned metadata. Once ndcube #455 is merged and ndcube 2.3 released, NDCube
will support axis-aligned metadata. This will be the appropriate place for detector labels, as they will be sliced when the cube is sliced. And we can add functionality to a class STIXMeta(ndcube.Meta)
so that detector labels are properly combined when the data is rebinned.
meta = Meta({"detector": ["a", "b", "c"]}, data_shape=pd_shape) | ||
|
||
scube = NDCube(data=pd, wcs=combine_coord.wcs, meta=meta) | ||
scube.extra_coords.add("integration_time", 0, [2, 3] * u.s, physical_types="time.duration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following from the above comment, "integration time" should be considered metadata, not a coordinate.
from astropy.time import Time | ||
from ndcube import NDCube | ||
from ndcube.extra_coords import QuantityTableCoordinate, TimeTableCoordinate | ||
|
||
from stixpy.extern.meta import Meta | ||
|
||
|
||
class PossionUncertainty(NDUncertainty): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very exciting!
No description provided.