diff --git a/.gitignore b/.gitignore
index 2815199..4689238 100644
--- a/.gitignore
+++ b/.gitignore
@@ -129,4 +129,4 @@ dmypy.json
.pyre/
# project specific configuration
-*config.yaml
+*config.yaml
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index dc3504b..0408512 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -5,131 +5,15 @@
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -140,7 +24,6 @@
@@ -166,52 +49,55 @@
- {
+ "keyToString": {
+ "Python tests.pytest for test_Merge.TestJSONMerge.executor": "Run",
+ "Python tests.pytest for test_Merge.TestJSONMerge.test_get_a_jsonfile_structure.executor": "Run",
+ "Python tests.pytest for test_Merge.TestJSONMerge.test_get_indices.executor": "Run",
+ "Python tests.pytest for test_Merge.TestJSONMerge.test_merge_jsonfiles.executor": "Run",
+ "Python tests.pytest for test_Merge.TestJSONMerge.test_replace_id.executor": "Run",
+ "Python tests.pytest for test_Merge.TestJSONMerge.test_safe_load_json.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_add_a_groupfield.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_complete_jsonfile1_with_jsonfile2_groupefield.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_complete_jsonfile1_with_jsonfile2_groupefield.test_replicate_groupfield.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_construct_extracted_json.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_orderjsonfile.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_orderjsonfile.test_add_a_groupfield.executor": "Run",
+ "Python tests.pytest for test_extractor.TestJsonOperations.test_replicate_groupfield.executor": "Run",
+ "Python tests.pytest for test_extractor.test_complete_jsonfile1_with_jsonfile2_groupefield.executor": "Run",
+ "Python tests.pytest in test_extractor.py.executor": "Run",
+ "Python.BidsDatatype.executor": "Run",
+ "Python.Createdirectory.executor": "Run",
+ "Python.Createfile.executor": "Run",
+ "Python.Extractor.executor": "Debug",
+ "Python.Generator.executor": "Run",
+ "Python.Modality.executor": "Run",
+ "Python.Test_export_bids.executor": "Run",
+ "Python.launch.executor": "Run",
+ "Python.lunch.executor": "Run",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "git-widget-placeholder": "cleanRepo",
+ "last_opened_file_path": "/home/INT/idrissou.f/PycharmProjects/DigLabTools/elab_bridge/template_parts/test_templates",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
+
-
+
@@ -235,30 +121,25 @@
-
+
-
-
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
-
+
@@ -272,11 +153,11 @@
-
+
-
+
@@ -290,11 +171,11 @@
-
+
-
+
@@ -308,11 +189,11 @@
-
+
-
+
@@ -348,7 +229,7 @@
-
+
@@ -362,11 +243,11 @@
-
+
-
+
@@ -380,11 +261,11 @@
-
+
-
+
@@ -398,8 +279,8 @@
-
-
+
+
@@ -408,14 +289,19 @@
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -459,6 +345,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -615,27 +512,29 @@
-
+
-
+
-
+
+
-
+
+
diff --git a/elab_bridge/Extractor.py b/elab_bridge/Extractor.py
index c4d4fe3..8b98148 100644
--- a/elab_bridge/Extractor.py
+++ b/elab_bridge/Extractor.py
@@ -210,7 +210,6 @@ def complete_jsonfile1_with_jsonfile2_groupefield(jsonfiletocompleted, jsonfilet
def orderjsonfile(jsonfile, list_group_field_name, output_jsonfile=None):
-
"""
Orders fields within a JSON file by specified group field names.
Parameters
@@ -237,12 +236,14 @@ def orderjsonfile(jsonfile, list_group_field_name, output_jsonfile=None):
list_group_field = [group['name'] for group in Data['elabftw']['extra_fields_groups']]
logger.debug(f"List of group fields: {list_group_field}")
+
# Validate group names
- missing_groups = [group_name for group_name in list_group_field_name if
- group_name not in list_group_field]
+ missing_groups = [group_name for group_name in list_group_field if
+ group_name not in list_group_field_name]
if missing_groups:
raise ValueError(f"Missing groups in data: {missing_groups}")
+
# Create mapping for group IDs
Dict_group_field_map = {}
for group in Data['elabftw']['extra_fields_groups']:
@@ -280,6 +281,67 @@ def orderjsonfile(jsonfile, list_group_field_name, output_jsonfile=None):
return None
+def replicate_groupfield(jsonfile, id, n_replicat, samefieldname=False, erase_existing=False,
+ json_output=None):
+ """
+ Replicate a groupfield in a JSON file.
+ Extract a groupfield from a JSON file and replicate it n times
+ where for each replication the groupfield id is incremented by 1 and the groupfield name is the parent groupfield name + index.
+
+ :param jsonfile: The JSON file path.
+ :param id: The groupfield id to replicate.
+ :param n_replicat: The number of groupfield to replicate.
+ :param json_output: The path to save the updated JSON file.
+ :param erase_existing: Boolean to indicate if existing data should be erased.
+ :return: The updated JSON data.
+ """
+ data = loadfile(jsonfile)
+ groupfield_name, list_group_field = extract_groupfield_detail(jsonfile, id, id)
+
+ if samefieldname:
+ list_group_field_name = [groupfield_name for i in range(n_replicat)]
+ else:
+ list_group_field_name = [groupfield_name + str(i) for i in range(1, n_replicat + 1)]
+ list_id = [id + i for i in range(1, n_replicat + 1)]
+ list_group_field_name.insert(0, groupfield_name)
+
+ new_fields = []
+ for field in list_group_field:
+ for k, v in field.items():
+ for i in range(1, n_replicat + 1):
+ new_k = f"{k}{i}"
+ new_v = v.copy()
+ new_v['group_id'] = id + i
+ new_fields.append({new_k: new_v})
+
+ if erase_existing:
+ data['elabftw']['extra_fields_groups'] = []
+ data['extra_fields'] = {}
+ else :
+ # Increment IDs of existing groups if they are greater than or equal to the new index
+ for group in data['elabftw']['extra_fields_groups']:
+ if n_replicat +1 <= group['id'] > id:
+ group['id'] += n_replicat+int(group['id'], 0)
+
+ # Update the group_id in existing extra fields
+ extra_fields = data.get('extra_fields', {})
+ for k, v in extra_fields.items():
+ group_id = int(v.get('group_id', 0))
+ if n_replicat +1 <= group['id'] > id:
+
+ v['group_id'] = group_id + n_replicat+int(group['id'], 0)
+ # Replicate the groupfield n times
+ for new_id, name in zip(list_id, list_group_field_name[1:]):
+ data['elabftw']['extra_fields_groups'].append({'id': new_id, 'name': name})
+
+ data['extra_fields'].update(
+ {field_id: details for field in new_fields for field_id, details in field.items()})
+
+ if json_output is not None:
+ savefile(json_output, data)
+ return data
+
+
if __name__ == '__main__':
parser = argparse.ArgumentParser(
@@ -288,7 +350,8 @@ def orderjsonfile(jsonfile, list_group_field_name, output_jsonfile=None):
"- Extracting specific fields from a JSON file and creating a new structured JSON.\n"
"- Merging two JSON files based on group field IDs: Extracting a group field from one "
"JSON file and appending it to another.\n"
- "- Ordering fields within a JSON file by specified group field names."
+ "- Ordering fields within a JSON file by specified group field names.\n"
+ "- Replicating a group field in a JSON file."
),
epilog=(
"Examples of usage:\n"
@@ -302,52 +365,65 @@ def orderjsonfile(jsonfile, list_group_field_name, output_jsonfile=None):
" Order JSON fields:\n"
"python Extractor.py order --jsonfile input.json --list_group_field_name field1 "
"field2 --output_jsonfile ordered.json\n\n"
+ " Replicate group field:\n"
+ "python Extractor.py replicate --jsonfile input.json --id 1 --n_replicat 3 "
+ "--json_output replicated.json\n\n"
"Options:\n"
" extract Extracts fields from a JSON file and saves the output.\n"
" merge Complete a JSON file by adding a group field from another JSON file.\n"
- " order Orders fields in a JSON file by the specified group field names."
+ " order Orders fields in a JSON file by the specified group field names.\n"
+ " replicate Replicates a group field in a JSON file."
),
formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument(
"operation",
- choices=["extract", "merge", "order"],
- help="Specify the operation to perform: 'extract' to extract fields or 'merge' to combine "
- "files.",
+ choices=["extract", "merge", "order", "replicate"],
+ help="Specify the operation to perform: 'extract' to extract fields, 'merge' to combine "
+ "files, 'order' to order fields, or 'replicate' to replicate a group field.",
)
# Arguments for extracting
- parser.add_argument("--jsonfile_extract", '-e', help="The JSON file path for extraction.", type=str)
+ parser.add_argument("--jsonfile_extract", '-e', help="The JSON file path for extraction.",
+ type=str)
parser.add_argument("--id", help="The groupfield ID to match.", type=int)
parser.add_argument("--new_id", help="The new ID to replace for matching fields.", type=int)
- parser.add_argument("--json_output", '-u', help="The path to save the new JSON structure.", type=str,
+ parser.add_argument("--json_output", '-u', help="The path to save the new JSON structure.",
+ type=str,
default=None)
# Arguments for merging
- parser.add_argument("--jsonfiletocompleted", '-c', help="The JSON file to be completed.", type=str)
- parser.add_argument("--jsonfiletoextract", '-x', help="The JSON file to extract the "
- "groupfield from.",
+ parser.add_argument("--jsonfiletocompleted", '-c', help="The JSON file to be completed.",
+ type=str)
+ parser.add_argument("--jsonfiletoextract", '-x', help="The JSON file to extract the "
+ "groupfield from.",
type=str)
parser.add_argument("--json_completed", '-C', help="The path to save the completed JSON file.",
type=str, default=None)
# Arguments for ordering
- parser.add_argument("--jsonfile", '-j', help="The JSON file path for ordering.", type=str)
+ parser.add_argument("--jsonfile", '-j', help="The JSON file path for ordering.", type=str)
parser.add_argument("--list_group_field_name", '-l', help="The list of group field names to "
"order.",
type=str, nargs='+')
parser.add_argument("--output_jsonfile", '-o', help="The path to save the ordered JSON file.",
type=str, default=None)
+ # Arguments for replicating
+ parser.add_argument("--n_replicat", '-n', help="The number of groupfield to replicate",
+ type=int)
+ parser.add_argument("--samefieldname", '-y', help="identical field name for all groupfield",
+ action='store_true')
+ parser.add_argument("--erase_existing", '-r', help="keep only replicat", action='store_true')
+
args = parser.parse_args()
if args.operation == "extract":
if not all([args.jsonfile_extract, args.id, args.new_id, args.json_output]):
print("Error: Missing arguments for the 'extract' operation.")
else:
- construct_extracted_json(args.jsonfile_extract
- , args.id, args.new_id, args.json_output)
+ construct_extracted_json(args.jsonfile_extract, args.id, args.new_id, args.json_output)
print(f"Extraction completed and saved to {args.json_output}.")
elif args.operation == "merge":
@@ -365,9 +441,18 @@ def orderjsonfile(jsonfile, list_group_field_name, output_jsonfile=None):
args.json_completed,
)
print(f"Merging completed and saved to {args.json_completed}.")
+
elif args.operation == "order":
if not all([args.jsonfile, args.list_group_field_name]):
print("Error: Missing arguments for the 'order' operation.")
else:
orderjsonfile(args.jsonfile, args.list_group_field_name, args.output_jsonfile)
- print(f"Ordering completed and saved to {args.jsonfile}.")
+ print(f"Ordering lunch and will be save to {args.jsonfile}.")
+
+ elif args.operation == "replicate":
+ if not all([args.jsonfile, args.id, args.n_replicat]):
+ print("Error: Missing arguments for the 'replicate' operation.")
+ else:
+ replicate_groupfield(args.jsonfile, args.id, args.n_replicat, args.samefieldname,
+ args.erase_existing, args.json_output)
+ print(f"Replication completed and saved to {args.json_output}.")
diff --git a/elab_bridge/template_parts/test_templates/ Merged_output.json b/elab_bridge/template_parts/test_templates/ Merged_output.json
deleted file mode 100644
index 59c5b85..0000000
--- a/elab_bridge/template_parts/test_templates/ Merged_output.json
+++ /dev/null
@@ -1,519 +0,0 @@
-{
- "elabftw": {
- "display_main_text": false,
- "extra_fields_groups": [
- {
- "id": 1,
- "name": "ProjectBIDSMetadata"
- },
- {
- "id": 2,
- "name": "ParticipantBIDSMetadata"
- },
- {
- "id": 3,
- "name": "SessionBIDSMetadata"
- },
- {
- "id": 3,
- "name": "Run "
- },
- {
- "id": 4,
- "name": "EyeTrackingBIDSMETADATA"
- }
- ]
- },
- "extra_fields": {
- "age": {
- "type": "number",
- "unit": "",
- "units": [
- "years",
- "months"
- ],
- "value": "",
- "group_id": 2,
- "position": 5,
- "description": "GDPR !!!. In years or months. Ex: '42 or 0.4'"
- },
- "sex": {
- "type": "radio",
- "options": [
- "F",
- "M",
- "Others"
- ],
- "group_id": 2,
- "position": 7,
- "description": "GDPR"
- },
- "group": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 9,
- "description": "Experimental group. Ex: 'control, under 10 years, ...'"
- },
- "Strain": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 4,
- "description": "The strain of the subject",
- "blank_value_on_duplicate": false
- },
- "Weight": {
- "type": "number",
- "value": "",
- "group_id": 2,
- "position": 10,
- "description": "The weight of the subject [in grams]",
- "blank_value_on_duplicate": false
- },
- "Authors": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 1,
- "description": "List of individuals who contributed to the creation/curation of the dataset."
- },
- "Species": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 3
- },
- "Modality": {
- "type": "select",
- "value": [
- "intracellular microelectrode signals"
- ],
- "options": [
- "extracellular microelectrode signals",
- "intracellular microelectrode signals",
- "EEG",
- "EMG",
- "ECog",
- "optical imaging",
- "behaviour",
- "stimulation (specify below)"
- ],
- "group_id": 2,
- "position": "5",
- "description": "The modalities recorded",
- "allow_multi_values": true,
- "blank_value_on_duplicate": true
- },
- "BirthDate": {
- "type": "datetime-local",
- "value": "",
- "group_id": 2,
- "position": 6
- },
- "DatasetDOI": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 2,
- "description": "The Digital Object Identifier of the dataset (not the corresponding paper)."
- },
- "Subject ID": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 1,
- "description": "subject number or monkey name or etc"
- },
- "handedness": {
- "type": "radio",
- "options": [
- "left",
- "right",
- "ambidextrous"
- ],
- "group_id": 2,
- "position": 8,
- "description": "GDPR"
- },
- "session_id": {
- "type": "text",
- "value": "",
- "group_id": 3,
- "position": 0,
- "required": true,
- "description": "Ex: '01 or predrug or 20231206'"
- },
- "DatasetType": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 3,
- "description": "The interpretation of the dataset. For backwards compatibility, the default value is \"raw\". Must be one of: \"raw\", \"derivative\"."
- },
- "GeneratedBy": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 4,
- "description": "Used to specify provenance of the dataset."
- },
- "DatasetLinks": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 5,
- "description": "Used to map a given from a BIDS URI of the form bids:"
- },
- "Subject GUID": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 2
- },
- "Experimenter 1": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 7,
- "description": " Ex: 'Odile De Ray'"
- },
- "Experimenter 2": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 8,
- "description": " Ex: 'Odile De Ray'"
- },
- "Experimenter 3": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 9,
- "description": " Ex: 'Odile De Ray'"
- },
- "Experiment name": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 6,
- "description": "En fran\u00e7ais: nom de la manip incluant X sujets / Experiment name including around X subjects"
- },
- "Session duration": {
- "type": "number",
- "value": "91",
- "group_id": 3,
- "position": "3",
- "description": "The duration of the session [in minutes]",
- "blank_value_on_duplicate": true
- },
- "HeadCircumference": {
- "type": "number",
- "unit": "",
- "units": [
- "cm"
- ],
- "value": "",
- "group_id": 2,
- "position": 11,
- "description": "Ex: '53.5 or 55'"
- },
- "Ethical Protocol Identifier": {
- "type": "text",
- "value": "defaut format in '5X-16X-vX'",
- "group_id": 1,
- "position": 0,
- "description": "The official ethical protocol id "
- },
- "TaskName": {
- "type": "text",
- "value": "",
- "group_id": 3,
- "position": 1,
- "required": true,
- "description": "Code name of the task (no space and only alphanumeric characters).\n Ex: 'rest or facesnback or headnodding'"
- },
- "Run comment": {
- "type": "text",
- "value": "",
- "group_id": 3,
- "position": 144,
- "description": "Comment about the subject behavior during the run."
- },
- "TaskDescription": {
- "type": "text",
- "value": "",
- "group_id": 3,
- "position": 2,
- "description": "Description of the task"
- },
- "Columns": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 3,
- "description": "Names of columns in file.",
- "blank_value_on_duplicate": false
- },
- "Comment": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "description": "Add comments if needed"
- },
- "StartTime": {
- "type": "number",
- "unit": "seconds",
- "units": [
- "seconds"
- ],
- "value": "",
- "group_id": 4,
- "position": 2,
- "description": "Start time in seconds",
- "blank_value_on_duplicate": false
- },
- "PhysioType": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 8,
- "description": "Defines the specific type of physiological recording",
- "blank_value_on_duplicate": false
- },
- "Run Number": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 4,
- "position": 4,
- "description": "One repetition of a experimental task. defined numerically"
- },
- "RecordedEye": {
- "type": "select",
- "value": [
- "left"
- ],
- "options": [
- "left",
- "right",
- "cyclopean"
- ],
- "group_id": 4,
- "position": 14,
- "description": "Indicates the eye tracked",
- "allow_multi_values": true,
- "blank_value_on_duplicate": false
- },
- "Manufacturer": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 5,
- "description": "Manufacturer of the equipment that produced the measurements.",
- "blank_value_on_duplicate": false
- },
- "PupilFitMethod": {
- "type": "select",
- "value": "centre-of-mass",
- "options": [
- "centre-of-mass",
- "ellipse"
- ],
- "group_id": 4,
- "position": 24,
- "description": "The method employed for fitting the pupil",
- "blank_value_on_duplicate": false
- },
- "RawDataFilters": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 25,
- "description": "Filter settings applied to eye-movement raw data.",
- "blank_value_on_duplicate": false
- },
- "CalibrationType": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 16,
- "description": "The type of the calibration procedure executed last",
- "blank_value_on_duplicate": false
- },
- "CalibrationUnit": {
- "type": "select",
- "value": "pixel",
- "options": [
- "pixel",
- "mm",
- "cm"
- ],
- "group_id": 4,
- "position": 17,
- "description": "Unit of \"CalibrationPosition\". ",
- "blank_value_on_duplicate": false
- },
- "CalibrationCount": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 4,
- "position": 14,
- "description": "The number of calibrations corresponding to this run.",
- "blank_value_on_duplicate": false
- },
- "SoftwareVersions": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 7,
- "description": "Manufacturer's designation of software version",
- "blank_value_on_duplicate": false
- },
- "EyeCameraSettings": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 18,
- "description": "A field to store any settings that influence the resolution and quality of the eye imagery",
- "blank_value_on_duplicate": false
- },
- "EyeTrackingMethod": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 24,
- "description": "Method used to track gaze or pupil position",
- "blank_value_on_duplicate": false
- },
- "SamplingFrequency": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 4,
- "position": 1,
- "description": "Sampling frequency (in Hz) of all the data in the recording",
- "blank_value_on_duplicate": false
- },
- "DeviceSerialNumber": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 4,
- "description": "The serial number of the equipment that produced the measurements",
- "blank_value_on_duplicate": false
- },
- "EyeTrackerDistance": {
- "type": "number",
- "unit": "meter",
- "units": [
- "meter"
- ],
- "value": "",
- "group_id": 4,
- "position": 19,
- "description": "Distance (in meters) between the eye-tracker and the participant eye(s).",
- "blank_value_on_duplicate": false
- },
- "CalibrationPosition": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 15,
- "description": "The type of the calibration procedure executed last",
- "blank_value_on_duplicate": false
- },
- "GazeMappingSettings": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 22,
- "description": "Description of gaze-mapping settings. ",
- "blank_value_on_duplicate": false
- },
- "ScreenAOIDefinition": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 26,
- "description": "A description of the shape of the Screen AOIs and what coordinates are used.",
- "blank_value_on_duplicate": false
- },
- "SampleCoordinateUnits": {
- "type": "select",
- "value": "pixel",
- "options": [
- "pixel",
- "mm",
- "cm"
- ],
- "group_id": 4,
- "position": 11,
- "blank_value_on_duplicate": false
- },
- "EnvironmentCoordinates": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 9,
- "description": "Coordinates origin (or zero), for gaze-on-screen coordinates",
- "blank_value_on_duplicate": false
- },
- "ManufacturersModelName": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 6,
- "description": "Manufacturer's model name of the equipment that produced the measurements.",
- "blank_value_on_duplicate": false
- },
- "SampleCoordinateSystem": {
- "type": "select",
- "value": "gaze-on-screen",
- "options": [
- "gaze-on-screen",
- "eye-in-head",
- "gaze-in-world"
- ],
- "group_id": 4,
- "position": 12,
- "description": "Coordinate system of the gaze position recordings",
- "allow_multi_values": true,
- "blank_value_on_duplicate": false
- },
- "AverageCalibrationError": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 4,
- "position": 13,
- "description": "Average calibration error in visual degree. ",
- "blank_value_on_duplicate": false
- },
- "MaximalCalibrationError": {
- "type": "number",
- "unit": "degrees",
- "units": [
- "degrees"
- ],
- "value": "",
- "group_id": 4,
- "position": 23,
- "description": "Maximal calibration error in degrees",
- "blank_value_on_duplicate": false
- },
- "FeatureDetectionSettings": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "position": 21,
- "description": "Description of feature detection settings. For example, minimum/maximum pupil size.",
- "blank_value_on_duplicate": false
- }
- }
-}
\ No newline at end of file
diff --git a/elab_bridge/template_parts/test_templates/ MergedeEPPP.json b/elab_bridge/template_parts/test_templates/ MergedeEPPP.json
deleted file mode 100644
index 740a533..0000000
--- a/elab_bridge/template_parts/test_templates/ MergedeEPPP.json
+++ /dev/null
@@ -1,683 +0,0 @@
-{
- "elabftw": {
- "display_main_text": false,
- "extra_fields_groups": [
- {
- "id": 1,
- "name": "Project_BIDS_Metadata"
- },
- {
- "id": 2,
- "name": "Subject_BIDS_Metadata"
- },
- {
- "id": 3,
- "name": "Recording_BIDS_Metadata"
- },
- {
- "id": 4,
- "name": "MicroEphys_BIDS_Metadata"
- },
- {
- "id": 5,
- "name": "EyeTracking_BIDS_METADATA"
- },
- {
- "id": 6,
- "name": "VisuoMotorLaminar_Specifique_Metadata"
- }
- ]
- },
- "extra_fields": {
- "Age": {
- "type": "number",
- "unit": "",
- "units": [
- "years",
- "months",
- "days"
- ],
- "value": "",
- "group_id": 2,
- "position": 4,
- "description": "in years, month or days",
- "blank_value_on_duplicate": false
- },
- "Sex": {
- "type": "radio",
- "options": [
- "F",
- "M",
- "Others"
- ],
- "group_id": 2,
- "position": 7,
- "description": "",
- "blank_value_on_duplicate": false
- },
- "Group": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 9,
- "description": "Experimental group. Ex: 'control, under 10 years, ...'",
- "blank_value_on_duplicate": false
- },
- "Strain": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 3,
- "description": "The strain of the subject",
- "blank_value_on_duplicate": false
- },
- "Weight": {
- "type": "number",
- "unit": "",
- "units": [
- "kg",
- "g"
- ],
- "value": "",
- "group_id": 2,
- "position": 10,
- "description": "Ex: '53.5 or 55'",
- "blank_value_on_duplicate": false
- },
- "Authors": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 2,
- "description": "List of individuals who contributed to the creation of the project.",
- "blank_value_on_duplicate": false
- },
- "Comment": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "description": "Add comments if needed"
- },
- "Species": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 2,
- "blank_value_on_duplicate": false
- },
- "BirthDate": {
- "type": "datetime-local",
- "value": "",
- "group_id": 2,
- "position": 6,
- "blank_value_on_duplicate": false
- },
- "SessionId": {
- "type": "text",
- "value": "",
- "group_id": 3,
- "position": 0,
- "required": true,
- "description": "Ex: 01, predrug , 20231206 , 20231206S01",
- "blank_value_on_duplicate": false
- },
- "DatasetDOI": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 3,
- "description": "The Digital Object Identifier of the dataset (not the corresponding paper).",
- "blank_value_on_duplicate": false
- },
- "Handedness": {
- "type": "radio",
- "options": [
- "left",
- "right",
- "ambidextrous"
- ],
- "group_id": 2,
- "position": 8,
- "description": "GDPR",
- "blank_value_on_duplicate": false
- },
- "Modalities": {
- "type": "select",
- "value": [
- "intracellular microelectrode signals"
- ],
- "options": [
- "MRI",
- "MEG",
- "EEG",
- "iEEG",
- "Physio (cardiac, respiration, etc.)",
- "Behaviour",
- "Genetic descriptor",
- "PET",
- "Microscopy",
- "NIRS",
- "Motion",
- "MRS",
- "Microelectode Electrophysiology",
- "Video",
- "EyeTracking"
- ],
- "group_id": 2,
- "position": 5,
- "description": "The modalities recorded",
- "allow_multi_values": true,
- "blank_value_on_duplicate": true
- },
- "Subject ID": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 0,
- "description": "subject number or monkey name or etc",
- "blank_value_on_duplicate": false
- },
- "DatasetType": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 4,
- "description": "The interpretation of the dataset. Must be one of: 'raw', 'derivative'.",
- "blank_value_on_duplicate": false
- },
- "GeneratedBy": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 5,
- "description": "Used to specify provenance of the dataset.",
- "blank_value_on_duplicate": false
- },
- "ProjectName": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 0,
- "description": "Experiment name including around X subjects",
- "blank_value_on_duplicate": false
- },
- "SessionDate": {
- "type": "date",
- "value": "",
- "group_id": 3,
- "position": 2,
- "blank_value_on_duplicate": false
- },
- "SubjectGUID": {
- "type": "text",
- "value": "",
- "group_id": 2,
- "position": 1,
- "blank_value_on_duplicate": false
- },
- "DatasetLinks": {
- "type": "text",
- "value": "",
- "group_id": 1,
- "position": 6,
- "description": "Used to map a given from a BIDS URI of the form bids:",
- "blank_value_on_duplicate": false
- },
- "SessionComment": {
- "type": "text",
- "value": "",
- "group_id": 3
- },
- "HeadCircumference": {
- "type": "number",
- "unit": "",
- "units": [
- "cm"
- ],
- "value": "",
- "group_id": 2,
- "position": 11,
- "description": "Ex: '53.5 or 55'",
- "blank_value_on_duplicate": false
- },
- "Ethical Protocol Identifier": {
- "type": "text",
- "value": "default format in '5X-16X-vX'",
- "group_id": 1,
- "position": 1,
- "description": "The official ethical protocol id",
- "blank_value_on_duplicate": false
- },
- "ProbIDList": {
- "type": "text",
- "value": "[p023, p021]",
- "group_id": 4,
- "blank_value_on_duplicate": false
- },
- "HemisphereList": {
- "type": "text",
- "value": "[left, right]",
- "group_id": 4,
- "blank_value_on_duplicate": false
- },
- "BrainRegionList": {
- "type": "text",
- "value": "[motor cortex , visual cortex]",
- "group_id": 4,
- "blank_value_on_duplicate": false
- },
- "CoordinateSystemFile": {
- "type": "text",
- "value": "BIDS_coordsystem.json",
- "group_id": 4,
- "description": "file path",
- "blank_value_on_duplicate": false
- },
- "ProbesDescriptionFile": {
- "type": "text",
- "value": "BIDS_probes.tsv",
- "group_id": 4,
- "description": "file path",
- "blank_value_on_duplicate": false
- },
- "ChannelsDescriptionFile": {
- "type": "text",
- "value": "BIDS_channels.tsv",
- "group_id": 4,
- "description": "file path",
- "blank_value_on_duplicate": false
- },
- "ElectrodesDescriptionFile": {
- "type": "text",
- "value": "BIDS_electrodes.tsv",
- "group_id": 4,
- "description": "file path",
- "blank_value_on_duplicate": false
- },
- "Comment on the MicroephysBidsMetadata": {
- "type": "text",
- "value": "",
- "group_id": 4,
- "blank_value_on_duplicate": false
- },
- "Columns": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 3,
- "description": "Names of columns in file.",
- "blank_value_on_duplicate": false
- },
- "StartTime": {
- "type": "number",
- "unit": "seconds",
- "units": [
- "seconds"
- ],
- "value": "",
- "group_id": 5,
- "position": 2,
- "description": "Start time in seconds",
- "blank_value_on_duplicate": false
- },
- "PhysioType": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 8,
- "description": "Defines the specific type of physiological recording",
- "blank_value_on_duplicate": false
- },
- "Run Number": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 5,
- "position": 4,
- "description": "One repetition of a experimental task. defined numerically"
- },
- "RecordedEye": {
- "type": "select",
- "value": [
- "left"
- ],
- "options": [
- "left",
- "right",
- "cyclopean"
- ],
- "group_id": 5,
- "position": 14,
- "description": "Indicates the eye tracked",
- "allow_multi_values": true,
- "blank_value_on_duplicate": false
- },
- "Manufacturer": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 5,
- "description": "Manufacturer of the equipment that produced the measurements.",
- "blank_value_on_duplicate": false
- },
- "PupilFitMethod": {
- "type": "select",
- "value": "centre-of-mass",
- "options": [
- "centre-of-mass",
- "ellipse"
- ],
- "group_id": 5,
- "position": 24,
- "description": "The method employed for fitting the pupil",
- "blank_value_on_duplicate": false
- },
- "RawDataFilters": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 25,
- "description": "Filter settings applied to eye-movement raw data.",
- "blank_value_on_duplicate": false
- },
- "CalibrationType": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 16,
- "description": "The type of the calibration procedure executed last",
- "blank_value_on_duplicate": false
- },
- "CalibrationUnit": {
- "type": "select",
- "value": "pixel",
- "options": [
- "pixel",
- "mm",
- "cm"
- ],
- "group_id": 5,
- "position": 17,
- "description": "Unit of \"CalibrationPosition\". ",
- "blank_value_on_duplicate": false
- },
- "CalibrationCount": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 5,
- "position": 14,
- "description": "The number of calibrations corresponding to this run.",
- "blank_value_on_duplicate": false
- },
- "SoftwareVersions": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 7,
- "description": "Manufacturer's designation of software version",
- "blank_value_on_duplicate": false
- },
- "EyeCameraSettings": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 18,
- "description": "A field to store any settings that influence the resolution and quality of the eye imagery",
- "blank_value_on_duplicate": false
- },
- "EyeTrackingMethod": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 24,
- "description": "Method used to track gaze or pupil position",
- "blank_value_on_duplicate": false
- },
- "SamplingFrequency": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 5,
- "position": 1,
- "description": "Sampling frequency (in Hz) of all the data in the recording",
- "blank_value_on_duplicate": false
- },
- "DeviceSerialNumber": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 4,
- "description": "The serial number of the equipment that produced the measurements",
- "blank_value_on_duplicate": false
- },
- "EyeTrackerDistance": {
- "type": "number",
- "unit": "meter",
- "units": [
- "meter"
- ],
- "value": "",
- "group_id": 5,
- "position": 19,
- "description": "Distance (in meters) between the eye-tracker and the participant eye(s).",
- "blank_value_on_duplicate": false
- },
- "CalibrationPosition": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 15,
- "description": "The type of the calibration procedure executed last",
- "blank_value_on_duplicate": false
- },
- "GazeMappingSettings": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 22,
- "description": "Description of gaze-mapping settings. ",
- "blank_value_on_duplicate": false
- },
- "ScreenAOIDefinition": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 26,
- "description": "A description of the shape of the Screen AOIs and what coordinates are used.",
- "blank_value_on_duplicate": false
- },
- "SampleCoordinateUnits": {
- "type": "select",
- "value": "pixel",
- "options": [
- "pixel",
- "mm",
- "cm"
- ],
- "group_id": 5,
- "position": 11,
- "blank_value_on_duplicate": false
- },
- "EnvironmentCoordinates": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 9,
- "description": "Coordinates origin (or zero), for gaze-on-screen coordinates",
- "blank_value_on_duplicate": false
- },
- "ManufacturersModelName": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 6,
- "description": "Manufacturer's model name of the equipment that produced the measurements.",
- "blank_value_on_duplicate": false
- },
- "SampleCoordinateSystem": {
- "type": "select",
- "value": "gaze-on-screen",
- "options": [
- "gaze-on-screen",
- "eye-in-head",
- "gaze-in-world"
- ],
- "group_id": 5,
- "position": 12,
- "description": "Coordinate system of the gaze position recordings",
- "allow_multi_values": true,
- "blank_value_on_duplicate": false
- },
- "AverageCalibrationError": {
- "type": "number",
- "unit": "",
- "units": [],
- "value": "",
- "group_id": 5,
- "position": 13,
- "description": "Average calibration error in visual degree. ",
- "blank_value_on_duplicate": false
- },
- "MaximalCalibrationError": {
- "type": "number",
- "unit": "degrees",
- "units": [
- "degrees"
- ],
- "value": "",
- "group_id": 5,
- "position": 23,
- "description": "Maximal calibration error in degrees",
- "blank_value_on_duplicate": false
- },
- "FeatureDetectionSettings": {
- "type": "text",
- "value": "",
- "group_id": 5,
- "position": 21,
- "description": "Description of feature detection settings. For example, minimum/maximum pupil size.",
- "blank_value_on_duplicate": false
- },
- "Duration": {
- "type": "text",
- "value": "",
- "group_id": 6,
- "position": 3,
- "blank_value_on_duplicate": false
- },
- "TaskName": {
- "type": "select",
- "value": "DMSBlocked",
- "options": [
- "DMSBlocked",
- "DMSRandom",
- "DMS",
- "Reward schedule",
- "Movie watching",
- "Groove",
- "RestingState"
- ],
- "group_id": 6,
- "position": 0,
- "blank_value_on_duplicate": false
- },
- "Stop Time": {
- "type": "datetime-local",
- "value": "",
- "group_id": 6,
- "position": 2,
- "blank_value_on_duplicate": false
- },
- "Start Time": {
- "type": "datetime-local",
- "value": "",
- "group_id": 6,
- "position": 1,
- "blank_value_on_duplicate": false
- },
- " RewardType": {
- "type": "radio",
- "value": "liquid",
- "options": [
- "liquid",
- "solid"
- ],
- "group_id": 6,
- "position": 5,
- "blank_value_on_duplicate": false
- },
- "Special Event": {
- "type": "radio",
- "value": "yes",
- "options": [
- "yes",
- "no"
- ],
- "group_id": 6,
- "position": 10,
- "blank_value_on_duplicate": false
- },
- "Experimenter 1": {
- "type": "users",
- "value": "",
- "group_id": 6,
- "position": 7,
- "blank_value_on_duplicate": false
- },
- "Experimenter 2": {
- "type": "users",
- "value": "",
- "group_id": 6,
- "position": 8,
- "blank_value_on_duplicate": false
- },
- "Experimenter 3": {
- "type": "users",
- "value": "",
- "group_id": 6,
- "position": 9,
- "blank_value_on_duplicate": false
- },
- "RewardQuantity": {
- "type": "number",
- "unit": "",
- "units": [
- "g",
- "ml"
- ],
- "value": "",
- "group_id": 6,
- "position": 6
- },
- " Witch Color First": {
- "type": "radio",
- "value": "pink",
- "options": [
- "pink",
- "blue",
- "none"
- ],
- "group_id": 6,
- "position": 4,
- "blank_value_on_duplicate": false
- },
- "Special Event Time": {
- "type": "datetime-local",
- "value": "",
- "group_id": 6,
- "position": 11,
- "blank_value_on_duplicate": false
- },
- "CommentSpecialEvent": {
- "type": "text",
- "value": "Martin",
- "group_id": 6,
- "position": 12,
- "blank_value_on_duplicate": false
- }
- }
-}
\ No newline at end of file
diff --git a/elab_bridge/template_parts/test_templates/Generic.json b/elab_bridge/template_parts/test_templates/Generic.json
new file mode 100644
index 0000000..4852a45
--- /dev/null
+++ b/elab_bridge/template_parts/test_templates/Generic.json
@@ -0,0 +1,221 @@
+{
+ "elabftw": {
+ "display_main_text": false,
+ "extra_fields_groups": [
+ {
+ "id": 1,
+ "name": "GENERIC_BIDS_PROJECT"
+ },
+ {
+ "id": 2,
+ "name": "GENERIC_BIDS_PARTICIPANT"
+ },
+ {
+ "id": 3,
+ "name": "GENERIC_BIDS_SESSION"
+ }
+ ]
+ },
+ "extra_fields": {
+ "age": {
+ "type": "number",
+ "unit": "",
+ "units": [
+ "years",
+ "months"
+ ],
+ "value": "",
+ "group_id": 2,
+ "position": 5,
+ "description": " In years or months. Ex: '42 or 0.4'"
+ },
+ "sex": {
+ "type": "radio",
+ "options": [
+ "F",
+ "M",
+ "Others"
+ ],
+ "group_id": 2,
+ "position": 7,
+ "description": "GDPR"
+ },
+ "group": {
+ "type": "text",
+ "value": "",
+ "group_id": 2,
+ "position": 9,
+ "description": "Experimental group. Ex: 'control, under 10 years, ...'"
+ },
+ "Strain": {
+ "type": "text",
+ "value": "",
+ "group_id": 2,
+ "position": 4,
+ "description": "The strain of the subject",
+ "blank_value_on_duplicate": false
+ },
+ "Weight": {
+ "type": "number",
+ "value": "",
+ "group_id": 2,
+ "position": 10,
+ "description": "The weight of the subject [in grams]",
+ "blank_value_on_duplicate": false
+ },
+ "Authors": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 1,
+ "description": "List of individuals who contributed to the creation/curation of the dataset."
+ },
+ "Species": {
+ "type": "text",
+ "value": "",
+ "group_id": 2,
+ "position": 3
+ },
+ "Modality": {
+ "type": "select",
+ "value": [
+ "intracellular microelectrode signals"
+ ],
+ "options": [
+ "extracellular microelectrode signals",
+ "intracellular microelectrode signals",
+ "EEG",
+ "EMG",
+ "ECog",
+ "optical imaging",
+ "behaviour",
+ "stimulation (specify below)"
+ ],
+ "group_id": 2,
+ "position": "5",
+ "description": "The modalities recorded",
+ "allow_multi_values": true,
+ "blank_value_on_duplicate": true
+ },
+ "BirthDate": {
+ "type": "datetime-local",
+ "value": "",
+ "group_id": 2,
+ "position": 6
+ },
+ "DatasetDOI": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 2,
+ "description": "The Digital Object Identifier of the dataset (not the corresponding paper)."
+ },
+ "Subject ID": {
+ "type": "text",
+ "value": "",
+ "group_id": 2,
+ "position": 1,
+ "description": "subject number or monkey name or etc"
+ },
+ "handedness": {
+ "type": "radio",
+ "options": [
+ "left",
+ "right",
+ "ambidextrous"
+ ],
+ "group_id": 2,
+ "position": 8,
+ "description": "GDPR"
+ },
+ "session_id": {
+ "type": "text",
+ "value": "",
+ "group_id": 3,
+ "position": 0,
+ "required": true,
+ "description": "Ex: '01 or predrug or 20231206'"
+ },
+ "DatasetType": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 3,
+ "description": "The interpretation of the dataset. For backwards compatibility, the default value is \"raw\". Must be one of: \"raw\", \"derivative\"."
+ },
+ "GeneratedBy": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 4,
+ "description": "Used to specify provenance of the dataset."
+ },
+ "DatasetLinks": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 5,
+ "description": "Used to map a given from a BIDS URI of the form bids:"
+ },
+ "Subject GUID": {
+ "type": "text",
+ "value": "",
+ "group_id": 2,
+ "position": 2
+ },
+ "Experimenter 1": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 7,
+ "description": " Ex: 'Odile De Ray'"
+ },
+ "Experimenter 2": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 8,
+ "description": " Ex: 'Odile De Ray'"
+ },
+ "Experimenter 3": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 9,
+ "description": " Ex: 'Odile De Ray'"
+ },
+ "Experiment name": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "position": 6,
+ "description": " Experiment name including around X subjects"
+ },
+ "Session duration": {
+ "type": "number",
+ "value": "91",
+ "group_id": 3,
+ "position": "3",
+ "description": "The duration of the session [in minutes]",
+ "blank_value_on_duplicate": true
+ },
+ "HeadCircumference": {
+ "type": "number",
+ "unit": "",
+ "units": [
+ "cm"
+ ],
+ "value": "",
+ "group_id": 2,
+ "position": 11,
+ "description": "Ex: '53.5 or 55'"
+ },
+ "Ethical Protocol Identifier": {
+ "type": "text",
+ "value": "defaut format in '5X-16X-vX'",
+ "group_id": 1,
+ "position": 0,
+ "description": "The official ethical protocol id "
+ }
+ }
+}
\ No newline at end of file
diff --git a/elab_bridge/template_parts/test_templates/Microephys.json b/elab_bridge/template_parts/test_templates/Microephys.json
new file mode 100644
index 0000000..7a2de03
--- /dev/null
+++ b/elab_bridge/template_parts/test_templates/Microephys.json
@@ -0,0 +1,64 @@
+{
+ "elabftw": {
+ "extra_fields_groups": [
+ {
+ "id": 1,
+ "name": "MicroEphys_BIDS_Metadata"
+ }
+ ]
+ },
+ "extra_fields": {
+ "ProbIDList": {
+ "type": "text",
+ "value": "[p023, p021]",
+ "group_id": 1,
+ "blank_value_on_duplicate": false
+ },
+ "HemisphereList": {
+ "type": "text",
+ "value": "[left, right]",
+ "group_id": 1,
+ "blank_value_on_duplicate": false
+ },
+ "BrainRegionList": {
+ "type": "text",
+ "value": "[motor cortex , visual cortex]",
+ "group_id": 1,
+ "blank_value_on_duplicate": false
+ },
+ "CoordinateSystemFile": {
+ "type": "text",
+ "value": "BIDS_coordsystem.json",
+ "group_id": 1,
+ "description": "file path",
+ "blank_value_on_duplicate": false
+ },
+ "ProbesDescriptionFile": {
+ "type": "text",
+ "value": "BIDS_probes.tsv",
+ "group_id": 1,
+ "description": "file path",
+ "blank_value_on_duplicate": false
+ },
+ "ChannelsDescriptionFile": {
+ "type": "text",
+ "value": "BIDS_channels.tsv",
+ "group_id": 1,
+ "description": "file path",
+ "blank_value_on_duplicate": false
+ },
+ "ElectrodesDescriptionFile": {
+ "type": "text",
+ "value": "BIDS_electrodes.tsv",
+ "group_id": 1,
+ "description": "file path",
+ "blank_value_on_duplicate": false
+ },
+ "Comment on the MicroephysBidsMetadata": {
+ "type": "text",
+ "value": "",
+ "group_id": 1,
+ "blank_value_on_duplicate": false
+ }
+ }
+}
\ No newline at end of file
diff --git a/elab_bridge/template_parts/test_templates/Spiccy_clamp_spec.json b/elab_bridge/template_parts/test_templates/Spiccy_clamp_spec.json
new file mode 100644
index 0000000..27706ba
--- /dev/null
+++ b/elab_bridge/template_parts/test_templates/Spiccy_clamp_spec.json
@@ -0,0 +1,144 @@
+{
+ "elabftw": {
+ "display_main_text": true,
+ "extra_fields_groups": [
+ {
+ "id": 2,
+ "name": "Run"
+ }
+ ]
+ },
+ "extra_fields": {
+ "Cm": {
+ "unit": "pF",
+ "value": 4.3,
+ "group_id": 2
+ },
+ "Re": {
+ "unit": "Moh",
+ "value": 3,
+ "group_id": 2
+ },
+ "Rm": {
+ "value": "Goh",
+ "group_id": 2
+ },
+ "Rs": {
+ "unit": "Moh",
+ "value": 18.9,
+ "group_id": 2
+ },
+ "VR": {
+ "unit": "mV",
+ "value": "na",
+ "group_id": 2
+ },
+ "hc": {
+ "unit": "pA",
+ "value": -10,
+ "group_id": 2
+ },
+ "Cell": {
+ "type": "text",
+ "value": "",
+ "group_id": 2
+ },
+ "Rseal": {
+ "unit": "Goh",
+ "value": 2.1,
+ "group_id": 2
+ },
+ "Slice": {
+ "unit": "X",
+ "value": 1,
+ "group_id": 2
+ },
+ "Comp80": {
+ "value": "80% comp.",
+ "group_id": 2
+ },
+ "Offset": {
+ "unit": "mV",
+ "value": 26.01,
+ "group_id": 2
+ },
+ "CellType": {
+ "unit": "Y",
+ "value": "CSF-cN",
+ "group_id": 2
+ },
+ "SampleID": {
+ "type": "text",
+ "value": "",
+ "group_id": 2,
+ "position": 1,
+ "description": "A sample identifier of the form sample-