-
Notifications
You must be signed in to change notification settings - Fork 3
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
Flexible way to fill DATAMAX/MIN BUNIT EXPOSURE in FITS header keywords #393
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #393 +/- ##
==========================================
+ Coverage 75.75% 75.82% +0.06%
==========================================
Files 68 68
Lines 7119 7250 +131
==========================================
+ Hits 5393 5497 +104
- Misses 1726 1753 +27 ☔ View full report in Codecov by Sentry. |
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.
LGTM
In general always better to use to_value(<unit>)
over value
as if in different units value just give the raw number ignoring possible difference e.g unit prefix difference km
v m
.
@@ -109,6 +130,19 @@ def __init__(self, *, service_type, service_subtype, ssid, control, data, | |||
self.name = 'flareflag' | |||
self.level = 'L1' | |||
|
|||
@property | |||
def dmin(self): | |||
return min([self.data['loc_y'].min(), self.data['loc_z'].min()]) |
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.
Is value
or to_value()
not needed here as below?
@@ -75,6 +75,21 @@ def __init__(self, *, service_type, service_subtype, ssid, control, | |||
self.name = 'xray-vis' | |||
self.level = 'L1' | |||
|
|||
@property | |||
def dmin(self): |
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.
Yea this might be tricky as they are complex numbers
Ok normal test look good now but in the E2E tests at L1530 and L2008 don't seem related and are unexpected at least at first look. |
so far only products with "count" data fill in this keywords in a usefull way. with this more flexible way of generating it should be much better to fill this keywords for deticated products