Skip to content

Conversation

@samaloney
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented May 18, 2024

Codecov Report

Attention: Patch coverage is 14.70588% with 29 lines in your changes missing coverage. Please review.

Project coverage is 26.54%. Comparing base (8867c2d) to head (95ac698).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
stixpy/product/scratch.py 14.70% 29 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (8867c2d) and HEAD (95ac698). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (8867c2d) HEAD (95ac698)
3 1
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


combine_coord = time_coord & energy_coord

# I'm not sure what should live in the meta vs extra_coords
Copy link
Contributor

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")
Copy link
Contributor

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 stixpy.extern.meta import Meta


class PossionUncertainty(NDUncertainty):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very exciting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants