Closed jmrohwer closed 2 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?
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).
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.
Currently, when a new dimensionless unit is created, this matches on
abs
,absorption
ordimensionless
, but theUnitDef
is created asabsorption
: https://github.com/EnzymeML/PyEnzyme/blob/32011fc22ee36bece374dedd2a30454ff384eb77/pyenzyme/enzymeml/tools/unitcreator.py#L68-L80I would suggest that this
UnitDef
is created asdimensionless
, for the following reasons:abs
orabsorption
, so we can continue matching on that, but the UnitDef should have the genericdimensionless
name.absorption
, which makes no sense at all.