Skip to content
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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Stix cube #119

wants to merge 9 commits into from

Conversation

samaloney
Copy link
Member

No description provided.

Copy link

codecov bot commented May 18, 2024

Codecov Report

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

Project coverage is 26.54%. Comparing base (8867c2d) to head (95ac698).

Files Patch % Lines
stixpy/product/scratch.py 14.70% 29 Missing ⚠️
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.


# 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 astropy.time import Time
from ndcube import NDCube
from ndcube.extra_coords import QuantityTableCoordinate, TimeTableCoordinate

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