labimotion 2.1.0.rc9 → 2.1.0.rc10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6d531f720a6e62743918a54244a11e0487e36e832df383cc40606a4ede20241
4
- data.tar.gz: 8eea6d130958617f8bf7cabe2c439c3053b768c93c292c41852f13d20116ca2b
3
+ metadata.gz: 8d9456ffe5c3e059a5e8dfc78ca671f0565c051bad7473c91e609de05d43b4d1
4
+ data.tar.gz: d05ebbe88cd259e6c88fdc2d7948e5369646d6ec00260eb113db61ffcf29cc37
5
5
  SHA512:
6
- metadata.gz: ed51beb0f134c8e36e1b588f7263270448902d8bf1b17be03fc44b63f0129fcc1992606a2248c957cecd446cf7c6124babdabf515e0834f684dfc9d927254c5b
7
- data.tar.gz: 1ec3c99f675ce7c32d3a497117504441da819e26073ac6aa50720e55c3ca255497b4d79919f65f8062f0eee2ee9b8f39ff723cacbe011a729434680e25a4931d
6
+ metadata.gz: 7f77618f29d0a9c79e45f9c8bbdb30e387c79566966add00c7172877e40bdceca94f655b5e48a666325152f24a7d4b3f3e90873e6f2db94c20653025d7fb0e48
7
+ data.tar.gz: 0d0c5438dc13b8b9025311151938abdfaca59e1c5f89b29978f97bc406e109ce22fccefa38df57084a1d76a0b31bfdd1681483bcb116831e368019673389225e
@@ -36,6 +36,13 @@ module Labimotion
36
36
  Labimotion.log_exception(e)
37
37
  end
38
38
 
39
+ def sample_url
40
+ protocol = Rails.env.production? ? 'https' : 'http'
41
+ host = ENV['PUBLIC_URL'] || 'localhost:3000'
42
+ api = 'mydb/collection/all/sample'
43
+ "#{protocol}://#{host}/#{api}"
44
+ end
45
+
39
46
  def build_layers
40
47
  objs = []
41
48
  @properties[Labimotion::Prop::LAYERS]&.keys&.sort_by do |key|
@@ -183,7 +190,8 @@ module Labimotion
183
190
  name = val['el_name'].present? ? "Name: [#{val['el_name']}] \n" : ''
184
191
  ext = val['el_external_label'].present? ? "Ext. Label: [#{val['el_external_label']}] \n" : ''
185
192
  mass = val['el_molecular_weight'].present? ? "Mass: [#{val['el_molecular_weight']}] \n" : ''
186
- "#{label}#{name}#{ext}#{mass}"
193
+ url = val['el_id'].present? ? "#{sample_url}/#{val['el_id']}" : ''
194
+ "#{label}#{name}#{ext}#{mass}#{url}"
187
195
  when Labimotion::FieldType::DRAG_MOLECULE
188
196
  val = sub_val[sub_field['id']]['value'] || {}
189
197
  smile = val['el_smiles'].present? ? "SMILES: [#{val['el_smiles']}] \n" : ''
@@ -194,7 +202,7 @@ module Labimotion
194
202
  when Labimotion::FieldType::SELECT
195
203
  sub_val[sub_field['id']]['value']
196
204
  when Labimotion::FieldType::SYSTEM_DEFINED
197
- unit = Labimotion::Units::FIELDS.find { |o| o[:field] == sub_field['option_layers'] }&.fetch(:units, [])&.find { |u| u[:key] == sub_field['value_system'] }&.fetch(:label, '')
205
+ unit = Labimotion::Units::FIELDS.find { |o| o[:field] == sub_field['option_layers'] }&.fetch(:units, [])&.find { |u| u[:key] == sub_val[sub_field['id']]['value_system'] }&.fetch(:label, '')
198
206
  val = sub_val[sub_field['id']]['value'].to_s + ' ' + unit
199
207
  val = Sablon.content(:html, "<div>" + val + "</div>") if val.include? '<'
200
208
  val
@@ -2,473 +2,614 @@ module Labimotion
2
2
  ## Converter State
3
3
  class Units
4
4
  FIELDS = [
5
- {
6
- "type": "numeric",
7
- "field": "acceleration",
8
- "label": "Acceleration",
9
- "default": "",
10
- "position": 10,
11
- "placeholder": "acceleration",
12
- "units": [{ "key": "mm_s2", "label": "mm/s<sup>2</sup>" }]
13
- },
14
- {
15
- "type": "numeric",
16
- "field": "agitation",
17
- "label": "Agitation",
18
- "default": "",
19
- "position": 20,
20
- "placeholder": "agitation",
21
- "units": [{ "key": "rpm", "label": "rpm" }]
22
- },
23
- {
24
- "type": "numeric",
25
- "field": "amount_enzyme",
26
- "label": "Amount enzyme as μmol/min",
27
- "default": "",
28
- "position": 30,
29
- "placeholder": "amount enzyme as μmol/min",
30
- "units": [
31
- { "key": "u", "label": "U", "nm": 1 },
32
- { "key": "mu", "label": "mU", "nm": 1000 },
33
- { "key": "kat", "label": "kat", "nm": 1.667e-8 },
34
- { "key": "mkat", "label": "mkat", "nm": 1.667e-5 },
35
- { "key": "µkat", "label": "µkat", "nm": 0.01667 },
36
- { "key": "nkat", "label": "nkat", "nm": 16.67 }
37
- ]
38
- },
39
- {
40
- "type": "numeric",
41
- "field": "amount_substance",
42
- "label": "Amount of substance",
43
- "default": "",
44
- "position": 35,
45
- "placeholder": "amount of substance",
46
- "units": [
47
- { "key": "mol", "label": "mol", "nm": 1 },
48
- { "key": "mmol", "label": "mmol", "nm": 1000 },
49
- { "key": "umol", "label": "µmol", "nm": 1000000 },
50
- { "key": "nmol", "label": "nmol", "nm": 1.0e9 },
51
- { "key": "pmol", "label": "pmol", "nm": 1.0e12 }
52
- ]
53
- },
54
- {
55
- "type": "numeric",
56
- "field": "molarity",
57
- "label": "Chem. concentration (Molarity)",
58
- "default": "",
59
- "position": 40,
60
- "placeholder": "molarity",
61
- "units": [
62
- { "key": "mol_l", "label": "mol/L", "nm": 1 },
63
- { "key": "mmol_l", "label": "mmol/L", "nm": 1000 },
64
- { "key": "umol_l", "label": "µmol/L", "nm": 1000000 },
65
- { "key": "nmol_l", "label": "nmol/L", "nm": 1000000000 },
66
- { "key": "pmol_l", "label": "pmol/L", "nm": 1000000000000 }
67
- ]
68
- },
69
- {
70
- "type": "numeric",
71
- "field": "chem_distances",
72
- "label": "Chem. distances",
73
- "default": "",
74
- "position": 50,
75
- "placeholder": "Chem. distances",
76
- "units": [{ "key": "angstrom", "label": "Å" }]
77
- },
78
- {
79
- "type": "numeric",
80
- "field": "concentration",
81
- "label": "Concentration",
82
- "default": "",
83
- "position": 60,
84
- "placeholder": "concentration",
85
- "units": [
86
- { "key": "ng_l", "label": "ng/L", "nm": 1000000 },
87
- { "key": "mg_l", "label": "mg/L", "nm": 1000 },
88
- { "key": "g_l", "label": "g/L", "nm": 1 }
89
- ]
90
- },
91
- {
92
- "type": "numeric",
93
- "field": "conductivity",
94
- "label": "Conductivity",
95
- "default": "",
96
- "position": 66,
97
- "placeholder": "conductivity",
98
- "units": [{ "key": "s_m", "label": "S/m", "nm": 1 }]
99
- },
100
- {
101
- "type": "numeric",
102
- "field": "current",
103
- "label": "Current",
104
- "default": "",
105
- "position": 60,
106
- "placeholder": "Current",
107
- "units": [
108
- { "key": "A", "label": "A", "nm": 1 },
109
- { "key": "mA", "label": "mA", "nm": 1000 },
110
- { "key": "uA", "label": "µA", "nm": 1000000 },
111
- { "key": "nA", "label": "nA", "nm": 1000000000 }
112
- ]
113
- },
114
- {
115
- "type": "numeric",
116
- "field": "degree",
117
- "label": "Degree",
118
- "default": "",
119
- "position": 70,
120
- "placeholder": "degree",
121
- "units": [{ "key": "degree", "label": "°" }]
122
- },
123
- {
124
- "type": "numeric",
125
- "field": "density",
126
- "label": "Density",
127
- "default": "",
128
- "position": 75,
129
- "placeholder": "density",
130
- "units": [
131
- { "key": "g_cm3", "label": "g/cm<sup>3</sup>", "nm": 1 },
132
- { "key": "kg_l", "label": "kg/l", "nm": 1 }
133
- ]
134
- },
135
- {
136
- "type": "numeric",
137
- "field": "duration",
138
- "label": "Duration",
139
- "default": "",
140
- "position": 80,
141
- "placeholder": "duration",
142
- "units": [
143
- { "key": "d", "label": "d", "nm": 1 },
144
- { "key": "h", "label": "h", "nm": 24 },
145
- { "key": "min", "label": "m", "nm": 1440 },
146
- { "key": "s", "label": "s", "nm": 86400 }
147
- ]
148
- },
149
- {
150
- "type": "numeric",
151
- "field": "elastic_modulus",
152
- "label": "Elastic modulus",
153
- "default": "",
154
- "position": 84,
155
- "placeholder": "Elastic modulus",
156
- "units": [
157
- { "key": "m_pa", "label": "MPa", "nm": 1 },
158
- { "key": "k_pa", "label": "kPa", "nm": 1000 },
159
- { "key": "pa", "label": "Pa", "nm": 1000000 }
160
- ]
161
- },
162
- {
163
- "type": "numeric",
164
- "field": "electric_charge_c",
165
- "label": "Electric Charge in C",
166
- "default": "",
167
- "position": 85,
168
- "placeholder": "Electric Charge in C",
169
- "units": [{ "key": "ec_c", "label": "C", "nm": 1 }]
170
- },
171
- {
172
- "type": "numeric",
173
- "field": "electric_charge_mol",
174
- "label": "Electric Charge per mol",
175
- "default": "",
176
- "position": 85,
177
- "placeholder": "Electric Charge per mol",
178
- "units": [{ "key": "ec_mol", "label": "C/mol", "nm": 1 }]
179
- },
180
- {
181
- "type": "numeric",
182
- "field": "electric_field",
183
- "label": "Electric field",
184
- "default": "",
185
- "position": 86,
186
- "placeholder": "Electric field",
187
- "units": [{ "key": "v_m", "label": "V/m", "nm": 1 }]
188
- },
189
- {
190
- "type": "numeric",
191
- "field": "energy",
192
- "label": "Energy",
193
- "default": "",
194
- "position": 88,
195
- "placeholder": "Joule",
196
- "units": [
197
- { "key": "eV", "label": "eV", "nm": 6.241509e21 },
198
- { "key": "keV", "label": "keV", "nm": 6.241509e18 },
199
- { "key": "j", "label": "J", "nm": 1000 },
200
- { "key": "k_j", "label": "kJ", "nm": 1 }
201
- ]
202
- },
203
- {
204
- "type": "numeric",
205
- "field": "enzyme_activity",
206
- "label": "Enzyme activity",
207
- "default": "",
208
- "position": 90,
209
- "placeholder": "Enzyme activity",
210
- "units": [
211
- { "key": "u_l", "label": "U/L", "nm": 1 },
212
- { "key": "u_ml", "label": "U/mL", "nm": 1000 }
213
- ]
214
- },
215
- {
216
- "type": "numeric",
217
- "field": "faraday",
218
- "label": "Faraday (Fd)",
219
- "default": "",
220
- "position": 95,
221
- "placeholder": "Faraday (Fd)",
222
- "units": [
223
- { "key": "faraday", "label": "Fd", "nm": 1 }
224
- ]
225
- },
226
- {
227
- "type": "numeric",
228
- "field": "flow_rate",
229
- "label": "Flow rate",
230
- "default": "",
231
- "position": 100,
232
- "placeholder": "Flow rate",
233
- "units": [
234
- { "key": "ul_min", "label": "µl/min", "nm": 1000000 },
235
- { "key": "ml_min", "label": "ml/min", "nm": 1000 },
236
- { "key": "l_m", "label": "l/m", "nm": 1 }
237
- ]
238
- },
239
- {
240
- "type": "numeric",
241
- "field": "frequency",
242
- "label": "Frequency",
243
- "default": "",
244
- "position": 100,
245
- "placeholder": "frequency",
246
- "units": [
247
- { "key": "mhz", "label": "MHz", "nm": 1000000 },
248
- { "key": "hz", "label": "Hz", "nm": 1000 },
249
- { "key": "khz", "label": "kHz", "nm": 1 }
250
- ]
251
- },
252
- {
253
- "type": "numeric",
254
- "field": "heating_rate",
255
- "label": "Heating rate",
256
- "default": "",
257
- "position": 106,
258
- "placeholder": "heating rate",
259
- "units": [{ "key": "k_min", "label": "K/min", "nm": 1 }]
260
- },
261
- {
262
- "type": "numeric",
263
- "field": "length",
264
- "label": "Length",
265
- "default": "",
266
- "position": 110,
267
- "placeholder": "length",
268
- "units": [
269
- { "key": "mm", "label": "mm", "nm": 1000 },
270
- { "key": "cm", "label": "cm", "nm": 100 },
271
- { "key": "m", "label": "m", "nm": 1 }
272
- ]
273
- },
274
- {
275
- "type": "numeric",
276
- "field": "magnetic_flux_density",
277
- "label": "Magnetic flux density/inductivity",
278
- "default": "",
279
- "position": 120,
280
- "placeholder": "",
281
- "units": [{ "key": "T", "label": "T", "nm": 1 }]
282
- },
283
- {
284
- "type": "numeric",
285
- "field": "mass",
286
- "label": "Mass",
287
- "default": "",
288
- "position": 120,
289
- "placeholder": "mass",
290
- "units": [
291
- { "key": "g", "label": "g", "nm": 1 },
292
- { "key": "mg", "label": "mg", "nm": 1000 },
293
- { "key": "ug", "label": "µg", "nm": 1000000 }
294
- ]
295
- },
296
- {
297
- "type": "numeric",
298
- "field": "mass_molecule",
299
- "label": "Mass of molecule",
300
- "default": "",
301
- "position": 126,
302
- "placeholder": "mass of molecule",
303
- "units": [
304
- { "key": "dalton", "label": "D", "nm": 1000 },
305
- { "key": "kilo_dalton", "label": "kD", "nm": 1 }
306
- ]
307
- },
308
- {
309
- "type": "numeric",
310
- "field": "molecular_weight",
311
- "label": "Molecular weight",
312
- "default": "",
313
- "position": 130,
314
- "placeholder": "Molecular weight",
315
- "units": [{ "key": "g_mol", "label": "g/mol" }]
316
- },
317
- {
318
- "type": "numeric",
319
- "field": "percentage",
320
- "label": "Percentage",
321
- "default": "",
322
- "position": 136,
323
- "placeholder": "percentage",
324
- "units": [{ "key": "p", "label": "%", "nm": 1 }]
325
- },
326
- {
327
- "type": "numeric",
328
- "field": "pressure",
329
- "label": "Pressure",
330
- "default": "",
331
- "position": 140,
332
- "placeholder": "pressure",
333
- "units": [
334
- { "key": "atm", "label": "atm", "nm": 1 },
335
- { "key": "pa", "label": "Pa", "nm": 101325 },
336
- { "key": "torr", "label": "Torr", "nm": 760 }
337
- ]
338
- },
339
- {
340
- "type": "numeric",
341
- "field": "reaction_rate",
342
- "label": "Reaction rate",
343
- "default": "",
344
- "position": 150,
345
- "placeholder": "Reaction rate",
346
- "units": [
347
- { "key": "mol_lmin", "label": "mol/Lmin", "nm": 1 },
348
- { "key": "mol_lsec", "label": "mol/Ls", "nm": 60 }
349
- ]
350
- },
351
- {
352
- "type": "numeric",
353
- "field": "specific_volume",
354
- "label": "Specific Volume",
355
- "default": "",
356
- "position": 160,
357
- "placeholder": "Specific Volume",
358
- "units": [{ "key": "cm3_g", "label": "cm<sup>3</sup>/g", "nm": 1 }]
359
- },
360
- {
361
- "type": "numeric",
362
- "field": "speed",
363
- "label": "Speed",
364
- "default": "",
365
- "position": 165,
366
- "placeholder": "speed",
367
- "units": [
368
- { "key": "cm_s", "label": "cm/s", "nm": 1 },
369
- { "key": "mm_s", "label": "mm/s", "nm": 10 },
370
- { "key": "um_m", "label": "µm/min", "nm": 600000 },
371
- { "key": "nm_m", "label": "nm/min", "nm": 60000000 },
372
- { "key": "cm_h", "label": "cm/h", "nm": 3600 },
373
- { "key": "mm_h", "label": "mm/h", "nm": 36000 }
374
- ]
375
- },
376
- {
377
- "type": "numeric",
378
- "field": "subatomic_length",
379
- "label": "Subatomic length",
380
- "default": "",
381
- "position": 168,
382
- "placeholder": "Subatomic length",
383
- "units": [
384
- { "key": "um", "label": "µm", "nm": 1 },
385
- { "key": "nm", "label": "nm", "nm": 1000 },
386
- { "key": "pm", "label": "pm", "nm": 1000000 }
387
- ]
388
- },
389
- {
390
- "type": "numeric",
391
- "field": "surface",
392
- "label": "Surface",
393
- "default": "",
394
- "position": 170,
395
- "placeholder": "surface",
396
- "units": [
397
- { "key": "a_2", "label": "A<sup>2</sup>", "nm": 1.0e16 },
398
- { "key": "um_2", "label": "µm<sup>2</sup>", "nm": 1.0e8 },
399
- { "key": "mm_2", "label": "mm<sup>2</sup>", "nm": 100 },
400
- { "key": "cm_2", "label": "cm<sup>2</sup>", "nm": 1 }
401
- ]
402
- },
403
- {
404
- "type": "numeric",
405
- "field": "temperature",
406
- "label": "Temperature",
407
- "default": "",
408
- "position": 180,
409
- "placeholder": "temperature",
410
- "units": [
411
- { "key": "C", "label": "°C" },
412
- { "key": "F", "label": "°F" },
413
- { "key": "K", "label": "K" }
414
- ]
415
- },
416
- {
417
- "type": "numeric",
418
- "field": "turnover_number",
419
- "label": "Turnover number",
420
- "default": "",
421
- "position": 190,
422
- "placeholder": "Turnover number",
423
- "units": [{ "key": "1_s", "label": "1/s", "nm": 1 }, { "key": "1_m", "label": "1/m", "nm": 60 }]
424
- },
425
- {
426
- "type": "numeric",
427
- "field": "viscosity",
428
- "label": "Dynamic Viscosity",
429
- "default": "",
430
- "position": 200,
431
- "placeholder": "Dynamic Viscosity",
432
- "units": [
433
- { "key": "pas", "label": "Pas", "nm": 1 },
434
- { "key": "mpas", "label": "mPas", "nm": 1000 }
435
- ]
436
- },
437
- {
438
- "type": "numeric",
439
- "field": "kinematic_viscosity",
440
- "label": "Kinematic Viscosity",
441
- "default": "",
442
- "position": 205,
443
- "placeholder": "Kinematic Viscosity",
444
- "units": [{ "key": "m2_s", "label": "m<sup>2</sup>/s", "nm": 1 }]
445
- },
446
- {
447
- "type": "numeric",
448
- "field": "voltage",
449
- "label": "Voltage",
450
- "default": "",
451
- "position": 200,
452
- "placeholder": "voltage",
453
- "units": [
454
- { "key": "mv", "label": "mV", "nm": 1000 },
455
- { "key": "v", "label": "V", "nm": 1 }
456
- ]
457
- },
458
- {
459
- "type": "numeric",
460
- "field": "volumes",
461
- "label": "Volumes",
462
- "default": "",
463
- "position": 210,
464
- "placeholder": "volume",
465
- "units": [
466
- { "key": "l", "label": "l", "nm": 1 },
467
- { "key": "ml", "label": "ml", "nm": 1000 },
468
- { "key": "ul", "label": "µl", "nm": 1000000 },
469
- { "key": "nl", "label": "nl", "nm": 1000000000 }
470
- ]
471
- }
472
- ]
5
+ {
6
+ "type": "numeric",
7
+ "field": "acceleration",
8
+ "label": "Acceleration",
9
+ "default": "",
10
+ "position": 10,
11
+ "placeholder": "acceleration",
12
+ "units": [{ "key": "mm_s2", "label": "mm/s<sup>2</sup>" }]
13
+ },
14
+ {
15
+ "type": "numeric",
16
+ "field": "agitation",
17
+ "label": "Agitation",
18
+ "default": "",
19
+ "position": 20,
20
+ "placeholder": "agitation",
21
+ "units": [{ "key": "rpm", "label": "rpm" }]
22
+ },
23
+ {
24
+ "type": "numeric",
25
+ "field": "amount_enzyme",
26
+ "label": "Amount enzyme as μmol/min",
27
+ "default": "",
28
+ "position": 30,
29
+ "placeholder": "amount enzyme as μmol/min",
30
+ "units": [
31
+ { "key": "u", "label": "U", "nm": 1 },
32
+ { "key": "mu", "label": "mU", "nm": 1000 },
33
+ { "key": "kat", "label": "kat", "nm": 1.667e-8 },
34
+ { "key": "mkat", "label": "mkat", "nm": 1.667e-5 },
35
+ { "key": "µkat", "label": "µkat", "nm": 0.01667 },
36
+ { "key": "nkat", "label": "nkat", "nm": 16.67 }
37
+ ]
38
+ },
39
+ {
40
+ "type": "numeric",
41
+ "field": "amount_substance",
42
+ "label": "Amount of substance",
43
+ "default": "",
44
+ "position": 35,
45
+ "placeholder": "amount of substance",
46
+ "units": [
47
+ { "key": "mol", "label": "mol", "nm": 1 },
48
+ { "key": "mmol", "label": "mmol", "nm": 1000 },
49
+ { "key": "umol", "label": "µmol", "nm": 1000000 },
50
+ { "key": "nmol", "label": "nmol", "nm": 1.0e9 },
51
+ { "key": "pmol", "label": "pmol", "nm": 1.0e12 }
52
+ ]
53
+ },
54
+ {
55
+ "type": "numeric",
56
+ "field": "molarity",
57
+ "label": "Chem. concentration (Molarity)",
58
+ "default": "",
59
+ "position": 40,
60
+ "placeholder": "molarity",
61
+ "units": [
62
+ { "key": "mol_l", "label": "mol/L", "nm": 1 },
63
+ { "key": "mmol_l", "label": "mmol/L", "nm": 1000 },
64
+ { "key": "umol_l", "label": "µmol/L", "nm": 1000000 },
65
+ { "key": "nmol_l", "label": "nmol/L", "nm": 1000000000 },
66
+ { "key": "pmol_l", "label": "pmol/L", "nm": 1000000000000 }
67
+ ]
68
+ },
69
+ {
70
+ "type": "numeric",
71
+ "field": "chem_distances",
72
+ "label": "Chem. distances",
73
+ "default": "",
74
+ "position": 50,
75
+ "placeholder": "Chem. distances",
76
+ "units": [{ "key": "angstrom", "label": "Å" }]
77
+ },
78
+ {
79
+ "type": "numeric",
80
+ "field": "concentration",
81
+ "label": "Concentration",
82
+ "default": "",
83
+ "position": 60,
84
+ "placeholder": "concentration",
85
+ "units": [
86
+ { "key": "ng_l", "label": "ng/L", "nm": 1000000 },
87
+ { "key": "mg_l", "label": "mg/L", "nm": 1000 },
88
+ { "key": "g_l", "label": "g/L", "nm": 1 }
89
+ ]
90
+ },
91
+ {
92
+ "type": "numeric",
93
+ "field": "conductivity",
94
+ "label": "Conductivity",
95
+ "default": "",
96
+ "position": 66,
97
+ "placeholder": "conductivity",
98
+ "units": [{ "key": "s_m", "label": "S/m", "nm": 1 }]
99
+ },
100
+ {
101
+ "type": "numeric",
102
+ "field": "current",
103
+ "label": "Current",
104
+ "default": "",
105
+ "position": 60,
106
+ "placeholder": "Current",
107
+ "units": [
108
+ { "key": "A", "label": "A", "nm": 1 },
109
+ { "key": "mA", "label": "mA", "nm": 1000 },
110
+ { "key": "uA", "label": "µA", "nm": 1000000 },
111
+ { "key": "nA", "label": "nA", "nm": 1000000000 }
112
+ ]
113
+ },
114
+ {
115
+ "type": "numeric",
116
+ "field": "c_rate",
117
+ "label": "C-rate",
118
+ "default": "",
119
+ "position": 69,
120
+ "placeholder": "C-rate",
121
+ "units": [
122
+ { "key": "c_h", "label": "1/h", "nm": 1 }
123
+ ]
124
+ },
125
+ {
126
+ "type": "numeric",
127
+ "field": "degree",
128
+ "label": "Degree",
129
+ "default": "",
130
+ "position": 70,
131
+ "placeholder": "degree",
132
+ "units": [{ "key": "degree", "label": "°" }]
133
+ },
134
+ {
135
+ "type": "numeric",
136
+ "field": "density",
137
+ "label": "Density",
138
+ "default": "",
139
+ "position": 75,
140
+ "placeholder": "density",
141
+ "units": [
142
+ { "key": "g_cm3", "label": "g/cm<sup>3</sup>", "nm": 1 },
143
+ { "key": "kg_l", "label": "kg/l", "nm": 1 }
144
+ ]
145
+ },
146
+ {
147
+ "type": "numeric",
148
+ "field": "dimensionless_concentration",
149
+ "label": "Dimensionless concentration",
150
+ "default": "",
151
+ "position": 79,
152
+ "placeholder": "dimensionless concentration",
153
+ "units": [
154
+ { "key": "ppm", "label": "ppm", "nm": 1 },
155
+ { "key": "ppb", "label": "ppb", "nm": 1000 }
156
+ ]
157
+ },
158
+ {
159
+ "type": "numeric",
160
+ "field": "duration",
161
+ "label": "Duration",
162
+ "default": "",
163
+ "position": 80,
164
+ "placeholder": "duration",
165
+ "units": [
166
+ { "key": "d", "label": "d", "nm": 1 },
167
+ { "key": "h", "label": "h", "nm": 24 },
168
+ { "key": "min", "label": "m", "nm": 1440 },
169
+ { "key": "s", "label": "s", "nm": 86400 }
170
+ ]
171
+ },
172
+ {
173
+ "type": "numeric",
174
+ "field": "elastic_modulus",
175
+ "label": "Elastic modulus",
176
+ "default": "",
177
+ "position": 81,
178
+ "placeholder": "Elastic modulus",
179
+ "units": [
180
+ { "key": "m_pa", "label": "MPa", "nm": 1 },
181
+ { "key": "k_pa", "label": "kPa", "nm": 1000 },
182
+ { "key": "pa", "label": "Pa", "nm": 1000000 }
183
+ ]
184
+ },
185
+ {
186
+ "type": "numeric",
187
+ "field": "electric_charge_c",
188
+ "label": "Electric Charge in C",
189
+ "default": "",
190
+ "position": 82,
191
+ "placeholder": "Electric Charge in C",
192
+ "units": [{ "key": "ec_c", "label": "C", "nm": 1 }]
193
+ },
194
+ {
195
+ "type": "numeric",
196
+ "field": "electric_charge_mol",
197
+ "label": "Electric Charge per mol",
198
+ "default": "",
199
+ "position": 83,
200
+ "placeholder": "Electric Charge per mol",
201
+ "units": [{ "key": "ec_mol", "label": "C/mol", "nm": 1 }]
202
+ },
203
+ {
204
+ "type": "numeric",
205
+ "field": "electric_field",
206
+ "label": "Electric field",
207
+ "default": "",
208
+ "position": 84,
209
+ "placeholder": "Electric field",
210
+ "units": [{ "key": "v_m", "label": "V/m", "nm": 1 }]
211
+ },
212
+ {
213
+ "type": "numeric",
214
+ "field": "electrical_capacity",
215
+ "label": "Electrical capacity",
216
+ "default": "",
217
+ "position": 85,
218
+ "placeholder": "Electrical capacity",
219
+ "units": [
220
+ { "key": "mah", "label": "mAh", "nm": 1000 },
221
+ { "key": "ah", "label": "Ah", "nm": 1 },
222
+ { "key": "as", "label": "As", "nm": 3600 },
223
+ { "key": "c", "label": "C", "nm": 3600 }
224
+ ]
225
+ },
226
+ {
227
+ "type": "numeric",
228
+ "field": "electrical_potential",
229
+ "label": "Electrical potential",
230
+ "default": "",
231
+ "position": 86,
232
+ "placeholder": "electrical potential",
233
+ "units": [
234
+ { "key": "v_re", "label": "V vs. RE", "nm": 1, "unit_type": "re" },
235
+ { "key": "mv_re", "label": "mV vs. RE", "nm": 1000, "unit_type": "re" },
236
+ { "key": "mv_ce", "label": "mV vs. CE", "nm": 1000, "unit_type": "ce" },
237
+ { "key": "v_ce", "label": "V vs. CE", "nm": 1, "unit_type": "ce" }
238
+ ]
239
+ },
240
+ {
241
+ "type": "numeric",
242
+ "field": "energy",
243
+ "label": "Energy",
244
+ "default": "",
245
+ "position": 88,
246
+ "placeholder": "Joule",
247
+ "units": [
248
+ { "key": "eV", "label": "eV", "nm": 6.241509e21 },
249
+ { "key": "keV", "label": "keV", "nm": 6.241509e18 },
250
+ { "key": "j", "label": "J", "nm": 1000 },
251
+ { "key": "k_j", "label": "kJ", "nm": 1 }
252
+ ]
253
+ },
254
+ {
255
+ "type": "numeric",
256
+ "field": "enzyme_activity",
257
+ "label": "Enzyme activity",
258
+ "default": "",
259
+ "position": 90,
260
+ "placeholder": "Enzyme activity",
261
+ "units": [
262
+ { "key": "u_l", "label": "U/L", "nm": 1 },
263
+ { "key": "u_ml", "label": "U/mL", "nm": 10e-3 },
264
+ { "key": "u_g", "label": "U/g", "nm": 10e-3 },
265
+ { "key": "u_mg", "label": "U/mg", "nm": 10e-6 }
266
+ ]
267
+ },
268
+ {
269
+ "type": "numeric",
270
+ "field": "faraday",
271
+ "label": "Faraday (Fd)",
272
+ "default": "",
273
+ "position": 95,
274
+ "placeholder": "Faraday (Fd)",
275
+ "units": [
276
+ { "key": "faraday", "label": "Fd", "nm": 1 }
277
+ ]
278
+ },
279
+ {
280
+ "type": "numeric",
281
+ "field": "flow_rate",
282
+ "label": "Flow rate",
283
+ "default": "",
284
+ "position": 100,
285
+ "placeholder": "Flow rate",
286
+ "units": [
287
+ { "key": "ul_min", "label": "µl/min", "nm": 1000000 },
288
+ { "key": "ml_min", "label": "ml/min", "nm": 1000 },
289
+ { "key": "l_m", "label": "l/m", "nm": 1 }
290
+ ]
291
+ },
292
+ {
293
+ "type": "numeric",
294
+ "field": "frequency",
295
+ "label": "Frequency",
296
+ "default": "",
297
+ "position": 103,
298
+ "placeholder": "frequency",
299
+ "units": [
300
+ { "key": "mhz", "label": "MHz", "nm": 1000000 },
301
+ { "key": "hz", "label": "Hz", "nm": 1000 },
302
+ { "key": "khz", "label": "kHz", "nm": 1 }
303
+ ]
304
+ },
305
+ {
306
+ "type": "numeric",
307
+ "field": "heating_rate",
308
+ "label": "Heating rate",
309
+ "default": "",
310
+ "position": 106,
311
+ "placeholder": "heating rate",
312
+ "units": [{ "key": "k_min", "label": "K/min", "nm": 1 }]
313
+ },
314
+ {
315
+ "type": "numeric",
316
+ "field": "length",
317
+ "label": "Length",
318
+ "default": "",
319
+ "position": 110,
320
+ "placeholder": "length",
321
+ "units": [
322
+ { "key": "mm", "label": "mm", "nm": 1000 },
323
+ { "key": "cm", "label": "cm", "nm": 100 },
324
+ { "key": "m", "label": "m", "nm": 1 }
325
+ ]
326
+ },
327
+ {
328
+ "type": "numeric",
329
+ "field": "magnetic_flux_density",
330
+ "label": "Magnetic flux density/inductivity",
331
+ "default": "",
332
+ "position": 120,
333
+ "placeholder": "",
334
+ "units": [{ "key": "T", "label": "T", "nm": 1 }]
335
+ },
336
+ {
337
+ "type": "numeric",
338
+ "field": "mass",
339
+ "label": "Mass",
340
+ "default": "",
341
+ "position": 120,
342
+ "placeholder": "mass",
343
+ "units": [
344
+ { "key": "g", "label": "g", "nm": 1 },
345
+ { "key": "mg", "label": "mg", "nm": 1000 },
346
+ { "key": "ug", "label": "µg", "nm": 1000000 }
347
+ ]
348
+ },
349
+ {
350
+ "type": "numeric",
351
+ "field": "mass_molecule",
352
+ "label": "Mass of molecule",
353
+ "default": "",
354
+ "position": 126,
355
+ "placeholder": "mass of molecule",
356
+ "units": [
357
+ { "key": "dalton", "label": "D", "nm": 1000 },
358
+ { "key": "kilo_dalton", "label": "kD", "nm": 1 }
359
+ ]
360
+ },
361
+ {
362
+ "type": "numeric",
363
+ "field": "molecular_weight",
364
+ "label": "Molecular weight",
365
+ "default": "",
366
+ "position": 130,
367
+ "placeholder": "Molecular weight",
368
+ "units": [{ "key": "g_mol", "label": "g/mol" }]
369
+ },
370
+ {
371
+ "type": "numeric",
372
+ "field": "percentage",
373
+ "label": "Percentage",
374
+ "default": "",
375
+ "position": 136,
376
+ "placeholder": "percentage",
377
+ "units": [{ "key": "p", "label": "%", "nm": 1 }]
378
+ },
379
+ {
380
+ "type": "numeric",
381
+ "field": "power",
382
+ "label": "Power",
383
+ "default": "",
384
+ "position": 137,
385
+ "placeholder": "power",
386
+ "units": [{ "key": "watt", "label": "W", "nm": 1 }]
387
+ },
388
+ {
389
+ "type": "numeric",
390
+ "field": "pressure",
391
+ "label": "Pressure",
392
+ "default": "",
393
+ "position": 140,
394
+ "placeholder": "pressure",
395
+ "units": [
396
+ { "key": "atm", "label": "atm", "nm": 1 },
397
+ { "key": "pa", "label": "Pa", "nm": 101325 },
398
+ { "key": "kpa", "label": "kPa", "nm": 101.325 },
399
+ { "key": "hpa", "label": "hPa", "nm": 1013.25 },
400
+ { "key": "torr", "label": "Torr", "nm": 760 },
401
+ { "key": "bar", "label": "bar", "nm": 1.01325 },
402
+ { "key": "mbar", "label": "mbar", "nm": 1013.25 }
403
+ ]
404
+ },
405
+ {
406
+ "type": "numeric",
407
+ "field": "reaction_rate",
408
+ "label": "Reaction rate",
409
+ "default": "",
410
+ "position": 150,
411
+ "placeholder": "Reaction rate",
412
+ "units": [
413
+ { "key": "mol_lmin", "label": "mol/Lmin", "nm": 1 },
414
+ { "key": "mol_lsec", "label": "mol/Ls", "nm": 60 }
415
+ ]
416
+ },
417
+ {
418
+ "type": "numeric",
419
+ "field": "resolution",
420
+ "label": "Resolution",
421
+ "default": "",
422
+ "position": 152,
423
+ "placeholder": "Resolution",
424
+ "units": [
425
+ { "key": "px", "label": "px", "nm": 1 },
426
+ { "key": "mp", "label": "MP", "nm": 1e-6 }
427
+ ]
428
+ },
429
+ {
430
+ "type": "numeric",
431
+ "field": "scan_rate",
432
+ "label": "Scan rate",
433
+ "default": "",
434
+ "position": 155,
435
+ "placeholder": "Scan rate",
436
+ "units": [
437
+ { "key": "mv_s", "label": "mV/s", "nm": 1000 },
438
+ { "key": "v_s", "label": "V/s", "nm": 1 }
439
+ ]
440
+ },
441
+ {
442
+ "type": "numeric",
443
+ "field": "specific_current",
444
+ "label": "Specific current",
445
+ "default": "",
446
+ "position": 156,
447
+ "placeholder": "Specific current",
448
+ "units": [
449
+ { "key": "ma_g", "label": "mA/g", "nm": 1000, "unit_type": "mass" },
450
+ { "key": "a_g", "label": "A/g", "nm": 1, "unit_type": "mass" },
451
+ { "key": "a_cm2", "label": "A/cm<sup>2</sup>", "nm": 1, "unit_type": "area" },
452
+ { "key": "ma_cm2", "label": "mA/cm<sup>2</sup>", "nm": 1000, "unit_type": "area" }
453
+ ]
454
+ },
455
+ {
456
+ "type": "numeric",
457
+ "field": "specific_electrical_capacity",
458
+ "label": "Specific electrical capacity",
459
+ "default": "",
460
+ "position": 157,
461
+ "placeholder": "Specific electrical capacity",
462
+ "units": [
463
+ { "key": "mah_g", "label": "mAh/g", "nm": 1000 },
464
+ { "key": "ah_g", "label": "Ah/g", "nm": 1 }
465
+ ]
466
+ },
467
+ {
468
+ "type": "numeric",
469
+ "field": "specific_surface_area",
470
+ "label": "Specific surface area",
471
+ "default": "",
472
+ "position": 158,
473
+ "placeholder": "Specific surface area",
474
+ "units": [
475
+ { "key": "m2_g", "label": "m<sup>2</sup>/g", "nm": 1 }
476
+ ]
477
+ },
478
+ {
479
+ "type": "numeric",
480
+ "field": "specific_volume",
481
+ "label": "Specific Volume",
482
+ "default": "",
483
+ "position": 160,
484
+ "placeholder": "Specific Volume",
485
+ "units": [{ "key": "cm3_g", "label": "cm<sup>3</sup>/g", "nm": 1 }]
486
+ },
487
+ {
488
+ "type": "numeric",
489
+ "field": "speed",
490
+ "label": "Speed",
491
+ "default": "",
492
+ "position": 165,
493
+ "placeholder": "speed",
494
+ "units": [
495
+ { "key": "cm_s", "label": "cm/s", "nm": 1 },
496
+ { "key": "mm_s", "label": "mm/s", "nm": 10 },
497
+ { "key": "um_m", "label": "µm/min", "nm": 600000 },
498
+ { "key": "nm_m", "label": "nm/min", "nm": 60000000 },
499
+ { "key": "cm_h", "label": "cm/h", "nm": 3600 },
500
+ { "key": "mm_h", "label": "mm/h", "nm": 36000 }
501
+ ]
502
+ },
503
+ {
504
+ "type": "numeric",
505
+ "field": "subatomic_length",
506
+ "label": "Subatomic length",
507
+ "default": "",
508
+ "position": 168,
509
+ "placeholder": "Subatomic length",
510
+ "units": [
511
+ { "key": "um", "label": "µm", "nm": 1 },
512
+ { "key": "nm", "label": "nm", "nm": 1000 },
513
+ { "key": "pm", "label": "pm", "nm": 1000000 }
514
+ ]
515
+ },
516
+ {
517
+ "type": "numeric",
518
+ "field": "surface",
519
+ "label": "Surface",
520
+ "default": "",
521
+ "position": 170,
522
+ "placeholder": "surface",
523
+ "units": [
524
+ { "key": "a_2", "label": "A<sup>2</sup>", "nm": 1.0e16 },
525
+ { "key": "um_2", "label": "µm<sup>2</sup>", "nm": 1.0e8 },
526
+ { "key": "mm_2", "label": "mm<sup>2</sup>", "nm": 100 },
527
+ { "key": "cm_2", "label": "cm<sup>2</sup>", "nm": 1 }
528
+ ]
529
+ },
530
+ {
531
+ "type": "numeric",
532
+ "field": "temperature",
533
+ "label": "Temperature",
534
+ "default": "",
535
+ "position": 180,
536
+ "placeholder": "temperature",
537
+ "units": [
538
+ { "key": "C", "label": "°C" },
539
+ { "key": "F", "label": "°F" },
540
+ { "key": "K", "label": "K" }
541
+ ]
542
+ },
543
+ {
544
+ "type": "numeric",
545
+ "field": "turnover_number",
546
+ "label": "Turnover number",
547
+ "default": "",
548
+ "position": 190,
549
+ "placeholder": "Turnover number",
550
+ "units": [{ "key": "1_s", "label": "1/s", "nm": 1 }, { "key": "1_m", "label": "1/m", "nm": 60 }]
551
+ },
552
+ {
553
+ "type": "numeric",
554
+ "field": "viscosity",
555
+ "label": "Dynamic Viscosity",
556
+ "default": "",
557
+ "position": 200,
558
+ "placeholder": "Dynamic Viscosity",
559
+ "units": [
560
+ { "key": "pas", "label": "Pas", "nm": 1 },
561
+ { "key": "mpas", "label": "mPas", "nm": 1000 }
562
+ ]
563
+ },
564
+ {
565
+ "type": "numeric",
566
+ "field": "kinematic_viscosity",
567
+ "label": "Kinematic Viscosity",
568
+ "default": "",
569
+ "position": 205,
570
+ "placeholder": "Kinematic Viscosity",
571
+ "units": [{ "key": "m2_s", "label": "m<sup>2</sup>/s", "nm": 1 }]
572
+ },
573
+ {
574
+ "type": "numeric",
575
+ "field": "voltage",
576
+ "label": "Voltage",
577
+ "default": "",
578
+ "position": 200,
579
+ "placeholder": "voltage",
580
+ "units": [
581
+ { "key": "mv", "label": "mV", "nm": 1000 },
582
+ { "key": "v", "label": "V", "nm": 1 },
583
+ { "key": "kv", "label": "kV", "nm": 0.001 }
584
+ ]
585
+ },
586
+ {
587
+ "type": "numeric",
588
+ "field": "volumes",
589
+ "label": "Volumes (Litre-based)",
590
+ "default": "",
591
+ "position": 210,
592
+ "placeholder": "volume",
593
+ "units": [
594
+ { "key": "l", "label": "l", "nm": 1 },
595
+ { "key": "ml", "label": "ml", "nm": 1000 },
596
+ { "key": "ul", "label": "µl", "nm": 1000000 },
597
+ { "key": "nl", "label": "nl", "nm": 1000000000 }
598
+ ]
599
+ },
600
+ {
601
+ "type": "numeric",
602
+ "field": "volumes_metric",
603
+ "label": "Volumes (Metric-based)",
604
+ "default": "",
605
+ "position": 220,
606
+ "placeholder": "volume",
607
+ "units": [
608
+ { "key": "cm3", "label": "cm³", "nm": 1 },
609
+ { "key": "mm3", "label": "mm³", "nm": 1000 },
610
+ { "key": "m3", "label": "m³", "nm": 0.000001 }
611
+ ]
612
+ }
613
+ ]
473
614
  end
474
615
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  ## Labimotion Version
4
4
  module Labimotion
5
- VERSION = '2.1.0.rc9'
5
+ VERSION = '2.1.0.rc10'
6
6
  end
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.1.0.rc9
4
+ version: 2.1.0.rc10
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: 2025-11-03 00:00:00.000000000 Z
12
+ date: 2025-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: caxlsx
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.0'
20
+ version: '4.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.0'
27
+ version: '4.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rails
30
30
  requirement: !ruby/object:Gem::Requirement