Compare commits
2 Commits
6f618b2340
...
0a879cbfe9
| Author | SHA256 | Date | |
|---|---|---|---|
| 0a879cbfe9 | |||
| f60b58f2f2 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,6 +1,9 @@
|
|||||||
# ignora log di h5tojson e jsontoh5
|
# ignores logs of h5tojson, jsontoh5
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
|
# ignores output json of main.py
|
||||||
|
output/*.json
|
||||||
|
|
||||||
# ---> Python
|
# ---> Python
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|||||||
0
output/placeholder
Normal file
0
output/placeholder
Normal file
@@ -198,7 +198,7 @@ def make_nexus_schema_dictionary(substrate_object, layers):
|
|||||||
"duration": layer.post_annealing_duration,
|
"duration": layer.post_annealing_duration,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
return json.dumps(pld_fabrication, indent=2)
|
return pld_fabrication
|
||||||
|
|
||||||
if __name__=="__main__":
|
if __name__=="__main__":
|
||||||
# TO-DO: place the API base URL somewhere else.
|
# TO-DO: place the API base URL somewhere else.
|
||||||
@@ -209,5 +209,7 @@ if __name__=="__main__":
|
|||||||
sample = Entrypoint(data)
|
sample = Entrypoint(data)
|
||||||
substrate_object = chain_entrypoint_to_batch(sample) # Substrate-class object
|
substrate_object = chain_entrypoint_to_batch(sample) # Substrate-class object
|
||||||
layers = chain_entrypoint_to_layers(sample) # list of Layer-class objects
|
layers = chain_entrypoint_to_layers(sample) # list of Layer-class objects
|
||||||
print(make_nexus_schema_dictionary(substrate_object, layers)) # debug
|
result = make_nexus_schema_dictionary(substrate_object, layers)
|
||||||
|
# print(make_nexus_schema_dictionary(substrate_object, layers)) # debug
|
||||||
|
with open (f"output/sample-{elabid}.json", "w") as f:
|
||||||
|
json.dump(result, f, indent=3)
|
||||||
|
|||||||
Reference in New Issue
Block a user