extends pld_fabrication dictionary with UoM's
now keys with numeric values are sub-dictionaries with a "value" and a "units" key - unitS not unit to comply directly with NeXus format, which turned out to be a good idea to avoid confusion since eLabFTW uses the word "units" for the list of accepted units and "unit" for the selected one... NOTE: UoM = Unit of Measurement
This commit is contained in:
92
src/main.py
92
src/main.py
@@ -135,9 +135,15 @@ def make_nexus_schema_dictionary(substrate_object, layers):
|
|||||||
"name": substrate_object.name,
|
"name": substrate_object.name,
|
||||||
"chemical_formula" : substrate_object.get_compound_formula(apikey),
|
"chemical_formula" : substrate_object.get_compound_formula(apikey),
|
||||||
"orientation" : substrate_object.orientation,
|
"orientation" : substrate_object.orientation,
|
||||||
"miscut_angle" : substrate_object.miscut_angle,
|
"miscut_angle" : {
|
||||||
|
"value": substrate_object.miscut_angle,
|
||||||
|
"units": substrate_object.miscut_angle_unit
|
||||||
|
},
|
||||||
"miscut_direction" : substrate_object.miscut_direction,
|
"miscut_direction" : substrate_object.miscut_direction,
|
||||||
"thickness" : substrate_object.thickness,
|
"thickness" : {
|
||||||
|
"value": substrate_object.thickness,
|
||||||
|
"units": substrate_object.thickness_unit,
|
||||||
|
},
|
||||||
"dimensions" : substrate_object.dimensions,
|
"dimensions" : substrate_object.dimensions,
|
||||||
"surface_treatment" : substrate_object.surface_treatment,
|
"surface_treatment" : substrate_object.surface_treatment,
|
||||||
"manufacturer" : substrate_object.manufacturer,
|
"manufacturer" : substrate_object.manufacturer,
|
||||||
@@ -157,11 +163,14 @@ def make_nexus_schema_dictionary(substrate_object, layers):
|
|||||||
"description" : target_object.description,
|
"description" : target_object.description,
|
||||||
"shape" : target_object.shape,
|
"shape" : target_object.shape,
|
||||||
"dimensions" : target_object.dimensions,
|
"dimensions" : target_object.dimensions,
|
||||||
"thickness" : target_object.thickness,
|
"thickness" : {
|
||||||
|
"value": target_object.thickness,
|
||||||
|
"units": target_object.thickness_unit,
|
||||||
|
},
|
||||||
"solid_form" : target_object.solid_form,
|
"solid_form" : target_object.solid_form,
|
||||||
"manufacturer" : target_object.manufacturer,
|
"manufacturer" : target_object.manufacturer,
|
||||||
|
"batch_id" : target_object.name,
|
||||||
# TO-DO: currently not available:
|
# TO-DO: currently not available:
|
||||||
# "batch_id" : target_object.batch_id,
|
|
||||||
}
|
}
|
||||||
multilayer[name] = {
|
multilayer[name] = {
|
||||||
"target": target_dict,
|
"target": target_dict,
|
||||||
@@ -169,17 +178,44 @@ def make_nexus_schema_dictionary(substrate_object, layers):
|
|||||||
"operator": layer.operator,
|
"operator": layer.operator,
|
||||||
"description": layer.description,
|
"description": layer.description,
|
||||||
"number_of_pulses": layer.number_of_pulses,
|
"number_of_pulses": layer.number_of_pulses,
|
||||||
"deposition_time": layer.deposition_time,
|
"deposition_time": {
|
||||||
"temperature": layer.temperature,
|
"value": layer.deposition_time,
|
||||||
|
"units": layer.deposition_time_unit,
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"value": layer.temperature,
|
||||||
|
"units": layer.temperature_unit,
|
||||||
|
},
|
||||||
"heating_method": layer.heating_method,
|
"heating_method": layer.heating_method,
|
||||||
"layer_thickness": layer.layer_thickness,
|
"layer_thickness": {
|
||||||
|
"value": layer.layer_thickness,
|
||||||
|
"units": layer.layer_thickness_unit,
|
||||||
|
},
|
||||||
"buffer_gas": layer.buffer_gas,
|
"buffer_gas": layer.buffer_gas,
|
||||||
"process_pressure": layer.process_pressure,
|
"process_pressure": {
|
||||||
"heater_target_distance": layer.heater_target_distance,
|
"value": layer.process_pressure,
|
||||||
"repetition_rate": layer.repetition_rate,
|
"units": layer.process_pressure_unit,
|
||||||
"laser_fluence": layer.laser_fluence,
|
},
|
||||||
"laser_spot_area": layer.laser_spot_area,
|
"heater_target_distance": {
|
||||||
"laser_energy": layer.laser_energy,
|
"value": layer.heater_target_distance,
|
||||||
|
"units": layer.heater_target_distance_unit,
|
||||||
|
},
|
||||||
|
"repetition_rate": {
|
||||||
|
"value": layer.repetition_rate,
|
||||||
|
"units": layer.repetition_rate_unit,
|
||||||
|
},
|
||||||
|
"laser_fluence": {
|
||||||
|
"value": layer.laser_fluence,
|
||||||
|
"units": layer.laser_fluence_unit,
|
||||||
|
},
|
||||||
|
"laser_spot_area": {
|
||||||
|
"value": layer.laser_spot_area,
|
||||||
|
"units": layer.laser_spot_area_unit,
|
||||||
|
},
|
||||||
|
"laser_energy": {
|
||||||
|
"value": layer.laser_energy,
|
||||||
|
"units": layer.laser_energy_unit,
|
||||||
|
},
|
||||||
"laser_rastering": {
|
"laser_rastering": {
|
||||||
"geometry": layer.laser_rastering_geometry,
|
"geometry": layer.laser_rastering_geometry,
|
||||||
"positions": layer.laser_rastering_positions,
|
"positions": layer.laser_rastering_positions,
|
||||||
@@ -187,15 +223,33 @@ def make_nexus_schema_dictionary(substrate_object, layers):
|
|||||||
},
|
},
|
||||||
"pre_annealing": {
|
"pre_annealing": {
|
||||||
"ambient_gas": layer.pre_annealing_ambient_gas,
|
"ambient_gas": layer.pre_annealing_ambient_gas,
|
||||||
"pressure": layer.pre_annealing_pressure,
|
"pressure": {
|
||||||
"temperature": layer.pre_annealing_temperature,
|
"value": layer.pre_annealing_pressure,
|
||||||
"duration": layer.pre_annealing_duration,
|
"units": layer.pre_annealing_pressure_unit,
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"value": layer.pre_annealing_temperature,
|
||||||
|
"units": layer.pre_annealing_temperature_unit,
|
||||||
|
},
|
||||||
|
"duration": {
|
||||||
|
"value": layer.pre_annealing_duration,
|
||||||
|
"units": layer.pre_annealing_duration_unit,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"post_annealing": {
|
"post_annealing": {
|
||||||
"ambient_gas": layer.post_annealing_ambient_gas,
|
"ambient_gas": layer.post_annealing_ambient_gas,
|
||||||
"pressure": layer.post_annealing_pressure,
|
"pressure": {
|
||||||
"temperature": layer.post_annealing_temperature,
|
"value": layer.post_annealing_pressure,
|
||||||
"duration": layer.post_annealing_duration,
|
"units": layer.post_annealing_pressure_unit,
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"value": layer.post_annealing_temperature,
|
||||||
|
"units": layer.post_annealing_temperature_unit,
|
||||||
|
},
|
||||||
|
"duration": {
|
||||||
|
"value": layer.post_annealing_duration,
|
||||||
|
"units": layer.post_annealing_duration_unit,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return pld_fabrication
|
return pld_fabrication
|
||||||
|
|||||||
Reference in New Issue
Block a user