labimotion 2.2.0.rc17 → 2.3.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/labimotion/apis/mtt_api.rb +6 -3
- data/lib/labimotion/utils/units.rb +177 -20
- data/lib/labimotion/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed76c84363276af955102072d3491035f014dedb9fcdc835b4ec9c2e9ba199ee
|
|
4
|
+
data.tar.gz: 8a5e3a1d1c5ac1fb497d278c1f9a3237dfc0f93271729e05c602339879d6a204
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d9d033f42be38117263ab30d502a3eafa5f9fa3b983f834dd1b1e14ab55537c91fafafd5b1643a6d3e2ea5e2e2ec17a8a072220cef56a4b80a34deca8f6600c
|
|
7
|
+
data.tar.gz: 926082586397c99e47f634733d2e258b463a9340809e45d5a0d4a788ff508c0335279e80baabef1f89b851691777d764b8657b6825b40a420e962dab4c6e6f36
|
|
@@ -29,12 +29,15 @@ module Labimotion
|
|
|
29
29
|
|
|
30
30
|
resource :mtt do
|
|
31
31
|
namespace :requests do
|
|
32
|
-
desc 'Get MTT requests for current user'
|
|
32
|
+
desc 'Get MTT requests for current user, scoped to a single element'
|
|
33
|
+
params do
|
|
34
|
+
requires :element_id, type: Integer, desc: 'Only return requests for this element'
|
|
35
|
+
end
|
|
33
36
|
get do
|
|
34
|
-
# Get
|
|
37
|
+
# Get requests created by current user for the selected element only
|
|
35
38
|
requests = Labimotion::DoseRespRequest
|
|
36
39
|
.includes(:dose_resp_outputs)
|
|
37
|
-
.where(created_by: current_user.id)
|
|
40
|
+
.where(created_by: current_user.id, element_id: params[:element_id])
|
|
38
41
|
.order(created_at: :desc)
|
|
39
42
|
|
|
40
43
|
# Return formatted response
|
|
@@ -51,6 +51,20 @@ module Labimotion
|
|
|
51
51
|
{ "key": "pmol", "label": "pmol", "nm": 1.0e12 }
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
+
{
|
|
55
|
+
"type": "numeric",
|
|
56
|
+
"field": "areal_density",
|
|
57
|
+
"label": "Areal density",
|
|
58
|
+
"default": "",
|
|
59
|
+
"position": 38,
|
|
60
|
+
"placeholder": "areal density",
|
|
61
|
+
"units": [
|
|
62
|
+
{ "key": "kg_m2", "label": "kg m<sup>-2</sup>", "nm": 1 },
|
|
63
|
+
{ "key": "t_m2", "label": "t m<sup>-2</sup>", "nm": 0.001 },
|
|
64
|
+
{ "key": "kg_cm2", "label": "kg cm<sup>-2</sup>", "nm": 1e-4 },
|
|
65
|
+
{ "key": "g_m2", "label": "g m<sup>-2</sup>", "nm": 1000 }
|
|
66
|
+
]
|
|
67
|
+
},
|
|
54
68
|
{
|
|
55
69
|
"type": "numeric",
|
|
56
70
|
"field": "molarity",
|
|
@@ -93,16 +107,34 @@ module Labimotion
|
|
|
93
107
|
"field": "conductivity",
|
|
94
108
|
"label": "Conductivity",
|
|
95
109
|
"default": "",
|
|
96
|
-
"position":
|
|
110
|
+
"position": 62,
|
|
97
111
|
"placeholder": "conductivity",
|
|
98
|
-
"units": [
|
|
112
|
+
"units": [
|
|
113
|
+
{ "key": "s_m", "label": "S/m", "nm": 1 },
|
|
114
|
+
{ "key": "ms_cm", "label": "mS/cm", "nm": 10 }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "numeric",
|
|
119
|
+
"field": "currency",
|
|
120
|
+
"label": "Currency",
|
|
121
|
+
"default": "",
|
|
122
|
+
"position": 64,
|
|
123
|
+
"placeholder": "Currency",
|
|
124
|
+
"units": [
|
|
125
|
+
{ "key": "eur", "label": "EUR", "nm": 1, "unit_type": "eur" },
|
|
126
|
+
{ "key": "chf", "label": "CHF", "nm": 1, "unit_type": "chf" },
|
|
127
|
+
{ "key": "gbp", "label": "GBP", "nm": 1, "unit_type": "gbp" },
|
|
128
|
+
{ "key": "usd", "label": "USD", "nm": 1, "unit_type": "usd" },
|
|
129
|
+
{ "key": "jpy", "label": "JPY", "nm": 1, "unit_type": "jpy" }
|
|
130
|
+
]
|
|
99
131
|
},
|
|
100
132
|
{
|
|
101
133
|
"type": "numeric",
|
|
102
134
|
"field": "current",
|
|
103
135
|
"label": "Current",
|
|
104
136
|
"default": "",
|
|
105
|
-
"position":
|
|
137
|
+
"position": 67,
|
|
106
138
|
"placeholder": "Current",
|
|
107
139
|
"units": [
|
|
108
140
|
{ "key": "A", "label": "A", "nm": 1 },
|
|
@@ -251,6 +283,17 @@ module Labimotion
|
|
|
251
283
|
{ "key": "k_j", "label": "kJ", "nm": 1 }
|
|
252
284
|
]
|
|
253
285
|
},
|
|
286
|
+
{
|
|
287
|
+
"type": "numeric",
|
|
288
|
+
"field": "free_energy",
|
|
289
|
+
"label": "Free Energy/enthalpy",
|
|
290
|
+
"default": "",
|
|
291
|
+
"position": 89,
|
|
292
|
+
"placeholder": "Free Energy/enthalpy",
|
|
293
|
+
"units": [
|
|
294
|
+
{ "key": "kj_mol", "label": "kJ/mol", "nm": 1 }
|
|
295
|
+
]
|
|
296
|
+
},
|
|
254
297
|
{
|
|
255
298
|
"type": "numeric",
|
|
256
299
|
"field": "enzyme_activity",
|
|
@@ -260,9 +303,9 @@ module Labimotion
|
|
|
260
303
|
"placeholder": "Enzyme activity",
|
|
261
304
|
"units": [
|
|
262
305
|
{ "key": "u_l", "label": "U/L", "nm": 1 },
|
|
263
|
-
{ "key": "u_ml", "label": "U/mL", "nm":
|
|
264
|
-
{ "key": "u_g", "label": "U/g", "nm":
|
|
265
|
-
{ "key": "u_mg", "label": "U/mg", "nm":
|
|
306
|
+
{ "key": "u_ml", "label": "U/mL", "nm": 1e-3 },
|
|
307
|
+
{ "key": "u_g", "label": "U/g", "nm": 1e-3 },
|
|
308
|
+
{ "key": "u_mg", "label": "U/mg", "nm": 1e-6 }
|
|
266
309
|
]
|
|
267
310
|
},
|
|
268
311
|
{
|
|
@@ -284,9 +327,10 @@ module Labimotion
|
|
|
284
327
|
"position": 100,
|
|
285
328
|
"placeholder": "Flow rate",
|
|
286
329
|
"units": [
|
|
287
|
-
{ "key": "
|
|
288
|
-
{ "key": "ml_min", "label": "
|
|
289
|
-
{ "key": "
|
|
330
|
+
{ "key": "l_m", "label": "L/min", "nm": 1 },
|
|
331
|
+
{ "key": "ml_min", "label": "mL/min", "nm": 1000 },
|
|
332
|
+
{ "key": "ul_min", "label": "µL/min", "nm": 1000000 },
|
|
333
|
+
{ "key": "ml_h", "label": "mL/h", "nm": 60000 }
|
|
290
334
|
]
|
|
291
335
|
},
|
|
292
336
|
{
|
|
@@ -297,19 +341,26 @@ module Labimotion
|
|
|
297
341
|
"position": 103,
|
|
298
342
|
"placeholder": "frequency",
|
|
299
343
|
"units": [
|
|
300
|
-
{ "key": "
|
|
301
|
-
{ "key": "
|
|
302
|
-
{ "key": "
|
|
344
|
+
{ "key": "hz", "label": "Hz", "nm": 1 },
|
|
345
|
+
{ "key": "khz", "label": "kHz", "nm": 1e-3 },
|
|
346
|
+
{ "key": "mhz", "label": "MHz", "nm": 1e-6 }
|
|
303
347
|
]
|
|
304
348
|
},
|
|
305
349
|
{
|
|
306
350
|
"type": "numeric",
|
|
307
351
|
"field": "heating_rate",
|
|
308
|
-
"label": "Heating rate",
|
|
352
|
+
"label": "Heating rate (Temperature ramp)",
|
|
309
353
|
"default": "",
|
|
310
354
|
"position": 106,
|
|
311
355
|
"placeholder": "heating rate",
|
|
312
|
-
"units": [
|
|
356
|
+
"units": [
|
|
357
|
+
{ "key": "k_min", "label": "K/min", "nm": 1 },
|
|
358
|
+
{ "key": "k_s", "label": "K/s", "nm": 0.016666666666667 },
|
|
359
|
+
{ "key": "k_h", "label": "K/h", "nm": 60 },
|
|
360
|
+
{ "key": "degc_min", "label": "°C min<sup>-1</sup>", "nm": 1 },
|
|
361
|
+
{ "key": "degc_s", "label": "°C s<sup>-1</sup>", "nm": 0.016666666666667 },
|
|
362
|
+
{ "key": "degc_h", "label": "°C h<sup>-1</sup>", "nm": 60 }
|
|
363
|
+
]
|
|
313
364
|
},
|
|
314
365
|
{
|
|
315
366
|
"type": "numeric",
|
|
@@ -346,6 +397,29 @@ module Labimotion
|
|
|
346
397
|
{ "key": "ug", "label": "µg", "nm": 1000000 }
|
|
347
398
|
]
|
|
348
399
|
},
|
|
400
|
+
{
|
|
401
|
+
"type": "numeric",
|
|
402
|
+
"field": "mass_fraction",
|
|
403
|
+
"label": "Mass fraction",
|
|
404
|
+
"default": "",
|
|
405
|
+
"position": 123,
|
|
406
|
+
"placeholder": "mass fraction",
|
|
407
|
+
"units": [
|
|
408
|
+
{ "key": "wt_p", "label": "wt.%", "nm": 1 }
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"type": "numeric",
|
|
413
|
+
"field": "mass_loading",
|
|
414
|
+
"label": "Mass loading",
|
|
415
|
+
"default": "",
|
|
416
|
+
"position": 125,
|
|
417
|
+
"placeholder": "mass loading",
|
|
418
|
+
"units": [
|
|
419
|
+
{ "key": "g_cm2", "label": "g cm<sup>-2</sup>", "nm": 1 },
|
|
420
|
+
{ "key": "mg_cm2", "label": "mg cm<sup>-2</sup>", "nm": 1000 }
|
|
421
|
+
]
|
|
422
|
+
},
|
|
349
423
|
{
|
|
350
424
|
"type": "numeric",
|
|
351
425
|
"field": "mass_molecule",
|
|
@@ -358,6 +432,28 @@ module Labimotion
|
|
|
358
432
|
{ "key": "kilo_dalton", "label": "kD", "nm": 1 }
|
|
359
433
|
]
|
|
360
434
|
},
|
|
435
|
+
{
|
|
436
|
+
"type": "numeric",
|
|
437
|
+
"field": "molar_conductivity",
|
|
438
|
+
"label": "Molar conductivity",
|
|
439
|
+
"default": "",
|
|
440
|
+
"position": 127,
|
|
441
|
+
"placeholder": "molar conductivity",
|
|
442
|
+
"units": [
|
|
443
|
+
{ "key": "s_cm2_mol", "label": "S cm<sup>2</sup> mol<sup>-1</sup>", "nm": 1 }
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"type": "numeric",
|
|
448
|
+
"field": "molar_entropy",
|
|
449
|
+
"label": "Molar Entropy",
|
|
450
|
+
"default": "",
|
|
451
|
+
"position": 128,
|
|
452
|
+
"placeholder": "Molar Entropy",
|
|
453
|
+
"units": [
|
|
454
|
+
{ "key": "j_mol_k", "label": "J/(mol*K)", "nm": 1 }
|
|
455
|
+
]
|
|
456
|
+
},
|
|
361
457
|
{
|
|
362
458
|
"type": "numeric",
|
|
363
459
|
"field": "molecular_weight",
|
|
@@ -402,6 +498,30 @@ module Labimotion
|
|
|
402
498
|
{ "key": "mbar", "label": "mbar", "nm": 1013.25 }
|
|
403
499
|
]
|
|
404
500
|
},
|
|
501
|
+
{
|
|
502
|
+
"type": "numeric",
|
|
503
|
+
"field": "process_rate",
|
|
504
|
+
"label": "Process rate",
|
|
505
|
+
"default": "",
|
|
506
|
+
"position": 143,
|
|
507
|
+
"placeholder": "Process rate",
|
|
508
|
+
"units": [
|
|
509
|
+
{ "key": "1_s", "label": "1/s", "nm": 1 },
|
|
510
|
+
{ "key": "1_min", "label": "1/min", "nm": 60 },
|
|
511
|
+
{ "key": "1_h", "label": "1/h", "nm": 3600 }
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"type": "numeric",
|
|
516
|
+
"field": "rate_constant",
|
|
517
|
+
"label": "Rate constant",
|
|
518
|
+
"default": "",
|
|
519
|
+
"position": 146,
|
|
520
|
+
"placeholder": "Rate constant",
|
|
521
|
+
"units": [
|
|
522
|
+
{ "key": "1_m_s", "label": "1/(M*s)", "nm": 1 }
|
|
523
|
+
]
|
|
524
|
+
},
|
|
405
525
|
{
|
|
406
526
|
"type": "numeric",
|
|
407
527
|
"field": "reaction_rate",
|
|
@@ -410,8 +530,8 @@ module Labimotion
|
|
|
410
530
|
"position": 150,
|
|
411
531
|
"placeholder": "Reaction rate",
|
|
412
532
|
"units": [
|
|
413
|
-
{ "key": "mol_lmin", "label": "mol
|
|
414
|
-
{ "key": "mol_lsec", "label": "mol
|
|
533
|
+
{ "key": "mol_lmin", "label": "mol L<sup>-1</sup> min<sup>-1</sup>", "nm": 1 },
|
|
534
|
+
{ "key": "mol_lsec", "label": "mol L<sup>-1</sup> s<sup>-1</sup>", "nm": 0.016666666666667 }
|
|
415
535
|
]
|
|
416
536
|
},
|
|
417
537
|
{
|
|
@@ -448,8 +568,9 @@ module Labimotion
|
|
|
448
568
|
"units": [
|
|
449
569
|
{ "key": "ma_g", "label": "mA/g", "nm": 1000, "unit_type": "mass" },
|
|
450
570
|
{ "key": "a_g", "label": "A/g", "nm": 1, "unit_type": "mass" },
|
|
571
|
+
{ "key": "ma_cm2", "label": "mA/cm<sup>2</sup>", "nm": 1000, "unit_type": "area" },
|
|
451
572
|
{ "key": "a_cm2", "label": "A/cm<sup>2</sup>", "nm": 1, "unit_type": "area" },
|
|
452
|
-
{ "key": "
|
|
573
|
+
{ "key": "a_mm2", "label": "A/mm<sup>2</sup>", "nm": 0.01, "unit_type": "area" }
|
|
453
574
|
]
|
|
454
575
|
},
|
|
455
576
|
{
|
|
@@ -495,7 +616,7 @@ module Labimotion
|
|
|
495
616
|
{ "key": "cm_s", "label": "cm/s", "nm": 1 },
|
|
496
617
|
{ "key": "mm_s", "label": "mm/s", "nm": 10 },
|
|
497
618
|
{ "key": "um_m", "label": "µm/min", "nm": 600000 },
|
|
498
|
-
{ "key": "nm_m", "label": "nm/min", "nm":
|
|
619
|
+
{ "key": "nm_m", "label": "nm/min", "nm": 600000000 },
|
|
499
620
|
{ "key": "cm_h", "label": "cm/h", "nm": 3600 },
|
|
500
621
|
{ "key": "mm_h", "label": "mm/h", "nm": 36000 }
|
|
501
622
|
]
|
|
@@ -540,6 +661,31 @@ module Labimotion
|
|
|
540
661
|
{ "key": "K", "label": "K" }
|
|
541
662
|
]
|
|
542
663
|
},
|
|
664
|
+
{
|
|
665
|
+
"type": "numeric",
|
|
666
|
+
"field": "tensile_force",
|
|
667
|
+
"label": "Tensile force",
|
|
668
|
+
"default": "",
|
|
669
|
+
"position": 185,
|
|
670
|
+
"placeholder": "tensile force",
|
|
671
|
+
"units": [
|
|
672
|
+
{ "key": "n", "label": "N", "nm": 1 },
|
|
673
|
+
{ "key": "kn", "label": "kN", "nm": 0.001 },
|
|
674
|
+
{ "key": "mn", "label": "mN", "nm": 1000 }
|
|
675
|
+
]
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"type": "numeric",
|
|
679
|
+
"field": "tensile_stress",
|
|
680
|
+
"label": "Tensile stress",
|
|
681
|
+
"default": "",
|
|
682
|
+
"position": 186,
|
|
683
|
+
"placeholder": "tensile stress",
|
|
684
|
+
"units": [
|
|
685
|
+
{ "key": "n_cm2", "label": "N cm<sup>-2</sup>", "nm": 1 },
|
|
686
|
+
{ "key": "n_mm2", "label": "N mm<sup>-2</sup>", "nm": 0.01 }
|
|
687
|
+
]
|
|
688
|
+
},
|
|
543
689
|
{
|
|
544
690
|
"type": "numeric",
|
|
545
691
|
"field": "turnover_number",
|
|
@@ -575,7 +721,7 @@ module Labimotion
|
|
|
575
721
|
"field": "voltage",
|
|
576
722
|
"label": "Voltage",
|
|
577
723
|
"default": "",
|
|
578
|
-
"position":
|
|
724
|
+
"position": 206,
|
|
579
725
|
"placeholder": "voltage",
|
|
580
726
|
"units": [
|
|
581
727
|
{ "key": "mv", "label": "mV", "nm": 1000 },
|
|
@@ -597,6 +743,17 @@ module Labimotion
|
|
|
597
743
|
{ "key": "nl", "label": "nl", "nm": 1000000000 }
|
|
598
744
|
]
|
|
599
745
|
},
|
|
746
|
+
{
|
|
747
|
+
"type": "numeric",
|
|
748
|
+
"field": "volume_fraction",
|
|
749
|
+
"label": "Volume fraction",
|
|
750
|
+
"default": "",
|
|
751
|
+
"position": 218,
|
|
752
|
+
"placeholder": "volume fraction",
|
|
753
|
+
"units": [
|
|
754
|
+
{ "key": "vol_p", "label": "vol.%", "nm": 1 }
|
|
755
|
+
]
|
|
756
|
+
},
|
|
600
757
|
{
|
|
601
758
|
"type": "numeric",
|
|
602
759
|
"field": "volumes_metric",
|
|
@@ -610,6 +767,6 @@ module Labimotion
|
|
|
610
767
|
{ "key": "m3", "label": "m³", "nm": 0.000001 }
|
|
611
768
|
]
|
|
612
769
|
}
|
|
613
|
-
|
|
770
|
+
]
|
|
614
771
|
end
|
|
615
772
|
end
|
data/lib/labimotion/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: labimotion
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0.rc1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chia-Lin Lin
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-07-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: caxlsx
|