Skip to content

Commit

Permalink
Volume as process udf to calculate amount
Browse files Browse the repository at this point in the history
  • Loading branch information
idalindegaard committed Jan 16, 2025
1 parent 7c12a17 commit 373ac80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cg_lims/EPPs/udf/calculate/calculate_amount_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@options.concentration_udf()
@options.amount_udf_option()
@options.volume_udf()
@options.total_volume_process_udf()
@options.subtract_volume()
@options.preset_volume()
@options.measurement()
Expand All @@ -24,6 +25,7 @@ def calculate_amount_ng(
ctx: click.Context,
amount_udf: str,
volume_udf: str,
total_volume_pudf: str,
concentration_udf: str,
subtract_volume: str,
preset_volume: float,
Expand All @@ -48,6 +50,8 @@ def calculate_amount_ng(
for artifact in artifacts:
if preset_volume:
vol = float(preset_volume)
elif total_volume_pudf:
vol: float = process.udf.get(total_volume_pudf)
elif volume_udf:
vol = artifact.udf.get(volume_udf)
conc: float = artifact.udf.get(concentration_udf)
Expand Down

0 comments on commit 373ac80

Please sign in to comment.