-
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
Modified NominalComposition to include basis, default unknown
#13
base: master
Are you sure you want to change the base?
Conversation
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.
Given that compositions with different bases are not comparable, does it make sense to put the basis as a required member in the CompositionBounds
? If so, how do we deal with "other" (see inline).
----------------|------------|---------|----------- | ||
`type` | String | Req. | "nominal\_composition" | ||
`quantities` | Map[String, Number]| Empty set | | Map[String, Number] | ||
`basis` | `mass`, `volume`, `number`, `unknown` | `unknown` | The type of measurement that informed the quantity |
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.
What about "other"? I'm thinking about some of the exotic formulations use cases like dry basis.
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.
Dry basis is still a mass (or molar or volume) basis. Compositions are not guaranteed to be normalized, so a user filter or Attribute Template could meet that need.
More complex expressions like molarity are so complex that explicit attributes are probably the only reasonable solution.
At present, we only validate component names in a |
Rather than This is the root on my ambivalence on {
"type": "property_template",
"name": "Solution composition (volume)",
"description": "Composition of the solution on a volume basis",
"bounds": {
"type": "composition_bounds",
"components": ["water", "ethanol", "oils"]
}
} What is gained by having it as an explicit enum? |
That's an interesting point. I'm comfortable with the
There are two things empowered by this change:
|
👍
This makes sense, but won't the default value (unknown) make it just as easy for this information to be omitted as it was before? EDIT to answer my own question: if the basis is specified in the template, then it won't be optional anymore because the default wouldn't fit the template. I agree there is some additional value just to having it be a first class concept (to be weighted against the risk that it is misinterpreted or misused).
You previously said "Compositions are not guaranteed to be normalized". If that's the case, then I don't know that we can do automated conversions. The dry basis is a good example. If you're using a dry basis, then you have an implicit ingredient included in the calculation (moisture) that would also have to be converted between mass/volume/number. If you just know it is a mass basis but not specifically a dry mass basis, then the automatic conversion will be wrong (right?). |
If you have an un-normalized set and you convert to another un-normalized set using densities, you haven't lost anything. The information a customer wants is almost assuredly the ratios in a certain basis. If it's a dry-basis mass fraction, you just wouldn't be able to generate a wet-basis mass fraction, but that's baked into not knowing anything about the fractions for water. Generating the dry-basis mole fraction just requires molar masses. |
@kroenlein are you still working on this PR? |
As per discussion on #data-platform-dojo, proposed fix for ambiguity in basis for procured material specs.