angularsen / UnitsNet

Makes life working with units of measurement just a little bit better.
https://www.nuget.org/packages/UnitsNet/
MIT No Attribution
2.65k stars 382 forks source link

New Quantity 'EnzymeActivity' and units "U/mL" #1401

Closed rogerfydp closed 4 months ago

rogerfydp commented 4 months ago

Is your feature request related to a problem? Please describe. Within existing library we could not find a quantity/unit suitable for "EnzymeActivity".

Describe the solution you'd like "Units/mL" (units per millilitre) specifically measures the enzyme activity, representing the amount of enzyme that catalyses the conversion of one micromole (µmol) of substrate per minute (see Enzyme unit), present in one millilitre of solution. The unit “U/mL” is often used, where U is summarizing µmol/minute. It would be beneficial to add a new quantity called " EnzymeActivity" to include Units per millilitre (Units/mL) such as:

Describe alternatives you've considered While MassConcentration and VolumeConcentration exist, I don't believe these fit as U is describing a rate, not volume or mass.

We've seen a similar issue opened "Insulin concentration" (#1344 ) but we believe with a different scope, as while the units like IU/mL used for insulin concentration do measure biological activity, they are specifically calibrated per substance and cannot be universally applied or converted to other types of measurements without specific biological context. Each biological unit (e.g., insulin units) is standardized differently based on the biological effect, which does not translate to enzyme activity where the standardization is based on catalytic transformation rates.

angularsen commented 4 months ago

This is not a good fit for UnitsNet unfortunately.

  1. Too narrow / domain specific
  2. There are almost infinite variations of Unit X per Unit Y and each requires a new quantity with a bunch of generated code increasing the binary size, so it does not scale well in UnitsNet's architecture

At this point I will close this as not planned.

Maybe in the future if we can solve breaking up UnitsNet into modular pieces, we can revisit. However it does not seem straight forward.