Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
icdp-osg
mdis-datagen
Commits
e409b375
Commit
e409b375
authored
Jul 25, 2020
by
Knut Behrends
Browse files
finetuning of scientis-inserter
parent
5ec9fa06
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/classes/fake-core-defaults.js
View file @
e409b375
...
...
@@ -41,7 +41,7 @@ CoreDefaults.rqd_intensity = {
3
:
"
good (75-90%)
"
,
4
:
"
excellent (90-100%)
"
,
}
CoreDefaults
.
curator
=
[
"
KB
"
,
"
CK
"
,
"
KH
"
]
CoreDefaults
.
curator
=
[
"
KB
"
,
"
CK
"
,
"
KH
"
,
"
UR
"
,
"
TK
"
,
"
TH
"
]
//CoreDefaults.curator = ["KB", "CK", "CKö", "KH", "UR", "TK", "JRRT", "GRRM"]
CoreDefaults
.
methods_core
=
[
[
"
MSCL
"
,
"
Core Section Scan
"
],
...
...
@@ -62,4 +62,45 @@ CoreDefaults.last_section = [1, 2, 2, 2, 3, 4, 4]
CoreDefaults
.
core_loss_reason
=
[
"
unknown
"
,
"
fallback
"
,
"
-
"
,
"
-
"
,
"
-
"
,
"
-
"
]
CoreDefaults
.
temperature
=
12
CoreDefaults
.
request_type
=
[
"
Mort
"
,
"
Post-Mort
"
,
"
ShipShip
"
,
"
ShipShore
"
,
"
unknown
"
,
]
CoreDefaults
.
sample_purpose
=
{
"
---
"
:
"
undefined, no specific subsample type
"
,
ATP
:
"
microbiology, for ATP
"
,
DNA
:
"
microbiology, for DNA
"
,
"
fracture filling
"
:
"
microbiology, material sampled from open fractures
"
,
MU
:
"
Mud
"
,
Q_TS
:
"
Quartz-rich sample for thin section
"
,
R_TS
:
"
Bulk rock sample for thin section
"
,
UW_CU
:
"
Unwashed cuttings
"
,
W_CU
:
"
Washed cuttings
"
,
WO
:
"
Wood or fossil for C14
"
,
}
CoreDefaults
.
sampling_units
=
{
ccm
:
"
cubic centimeter
"
,
g
:
"
gram
"
,
l
:
"
liter
"
,
ml
:
"
milli liter
"
,
}
CoreDefaults
.
sample_material
=
{
Biology
:
""
,
Gas
:
""
,
Ice
:
""
,
"
Liquid>aqueous
"
:
""
,
"
Liquid>organic
"
:
""
,
Mineral
:
""
,
Other
:
""
,
Particulate
:
""
,
Rock
:
""
,
Sediment
:
""
,
Soil
:
""
,
}
module
.
exports
=
CoreDefaults
src/classes/fake-scientists.js
View file @
e409b375
...
...
@@ -23,10 +23,10 @@ module.exports = class SampleScientist {
}
}
find_first_name
()
{
return
faker
.
fake
(
"
{{name.firstName}}
"
)
return
this
.
_scientist
.
first_name
//return
faker.fake("{{name.firstName}}")
}
find_last_name
()
{
return
faker
.
fake
(
"
{{name
.last
N
ame
}}
"
)
return
this
.
_scientist
.
last
_n
ame
}
find_title
()
{
const
title_fakes
=
[
...
...
@@ -44,7 +44,7 @@ module.exports = class SampleScientist {
"
MSc.
"
,
"
Dr. h.c.
"
,
"
Stud. rer. geol.
"
,
"
Dr. habil.
, Dr. med. dent.
"
,
"
Dr. habil.
"
,
"
Dr. Ing.
"
,
]
...
...
@@ -54,7 +54,17 @@ module.exports = class SampleScientist {
}
find_institute
()
{
let
d
=
util
.
shuffle
([
"
Geophysics
"
,
"
Geology
"
,
"
Microbiology
"
,
"
Paleontology
"
])
.
shuffle
([
"
Geophysics
"
,
"
Geology
"
,
"
Microbiology
"
,
"
Paleontology
"
,
"
Oceanography
"
,
"
Energy
"
,
"
Fishery
"
,
"
Mineralogy
"
,
"
System Sciences
"
,
])
.
pop
()
let
i
=
util
.
shuffle
([
"
Centre
"
,
"
Institute
"
,
"
Institute
"
,
"
Society
"
,
"
Academy
"
])
...
...
src/scientist-inserter.js
View file @
e409b375
...
...
@@ -103,7 +103,7 @@ axutil
Promise
.
all
(
fake_scientist_promises
).
then
((
s
)
=>
console
.
log
(
`
#############################################################
Created fake scientists from entries in file
${
options
.
infile
}
Created fake scientists from
${
scientists_from_file
.
length
}
entries in file
${
options
.
infile
}
############################################################# `
)
)
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment