EnzymeML / PyEnzyme

🧬 - Data management and modeling framework based on EnzymeML.
BSD 2-Clause "Simplified" License
21 stars 9 forks source link

Dimensionless unit #8

Closed jmrohwer closed 2 years ago

jmrohwer commented 3 years ago

Currently, when a new dimensionless unit is created, this matches on abs, absorption or dimensionless, but the UnitDef is created as absorption: https://github.com/EnzymeML/PyEnzyme/blob/32011fc22ee36bece374dedd2a30454ff384eb77/pyenzyme/enzymeml/tools/unitcreator.py#L68-L80

I would suggest that this UnitDef is created as dimensionless, for the following reasons:

JR-1991 commented 3 years ago

Indeed, this makes no sense at all. This was fixed in commit 127735c and now "dimensionless" will correctly be displayed as the name.

I agree with you about "absorbance" being a quantity rather than a unit. The intention was to give an idea of what was measured, because simply "dimensionless" as a unit name does not give any insights to the "nature" of the data. In addition, the unit kind (in the sense of SBML) remains to be "dimensionless" and thus only the name gives indication.

However, giving it a second thought, the Replicate object already has a Type attribute, which gives information about whether data was measured by e.g. absorbance and thus this could be inferred from here.

I wonder, which route we should go - Keeping it or remove it from the unitCreator?

jmrohwer commented 3 years ago

In my opinion removing it would be cleaner, as it is not a unit but a quantity. Given that the Replicate Type attribute can be used to convey (and store) the information, there is really not a need for an "absorbance" unit and it is potentially confusing, aside from the same information potentially being stored in two separate places (Type attribute vs abs unit).

JR-1991 commented 3 years ago

I agree with you, we should remove any redundancy to avoid any confusion. The support for abs/absorbance as unit names was dropped in commit 4d71160. I also added an error message to display the supported prefixes and units, such that it is clear which are supported by PyEnzyme.