Fixing issue in CDB considering the channel id an int#158
Fixing issue in CDB considering the channel id an int#158pscheidler merged 3 commits intodevelopfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #158 +/- ##
========================================
Coverage 75.32% 75.32%
========================================
Files 13 13
Lines 4016 4016
========================================
Hits 3025 3025
Misses 991 991 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
All IDs (channels, subchannels, calibration, etc.) should probably be uints. |
StokesMIDE
left a comment
There was a problem hiding this comment.
We should change all the ID/IDRef elements to UInteger. Since we don't use any higher than the low 100s, this shouldn't cause any problem with existing data. We might as well do it in one PR.
I'll leave this one for a following PR |
idelib/schemata/mide_ide.xml
Outdated
| <FloatElement name="BivariateCalReferenceValue" id="0x4B05" multiple="0" minver="1">Reference value for the 2nd channel when using bivariate calibration</FloatElement> | ||
| <UIntegerElement name="BivariateChannelIDRef" id="0x4B06" multiple="0" minver="1">Channel ID of the channel to be used as the 2nd parameter for bivariate compensation</UIntegerElement> | ||
| <UIntegerElement name="BivariateSubChannelIDRef" id="0x4B07" multiple="0" minver="1">SubChannel ID of the subchannel to be used as the 2nd parameter for bivariate compensation</UIntegerElement> | ||
| <IntegerElement name="BivariateSubChannelIDRef" id="0x4B07" multiple="0" minver="1">SubChannel ID of the subchannel to be used as the 2nd parameter for bivariate compensation</IntegerElement> |
There was a problem hiding this comment.
Was this changed the other way (UIntegerElement -> IntegerElement) on purpose? Do we ever want negative channel ID references here?
There was a problem hiding this comment.
Good catch! I'd changed it earlier when I thought the intent was for SubChannels to be ints
| <IntegerElement name="BivariateSubChannelIDRef" id="0x4B07" multiple="0" minver="1">SubChannel ID of the subchannel to be used as the 2nd parameter for bivariate compensation</IntegerElement> | |
| <UIntegerElement name="BivariateSubChannelIDRef" id="0x4B07" multiple="0" minver="1">SubChannel ID of the subchannel to be used as the 2nd parameter for bivariate compensation</UIntegerElement> |
The main issue is that the ChannelID element in the CDB is considered an Int, and most other places it is considered a UInt.
Small question: SubChannelsIDs are considered Ints, which is consistent, but odd. Should IDs generally just be uints?