mirror of
https://github.com/c-sooyoung/bo-ptycho.git
synced 2026-09-17 19:29:07 +09:00
24 lines
430 B
Python
24 lines
430 B
Python
import sys
|
|
import yaml
|
|
|
|
import job
|
|
|
|
def main(config_yaml):
|
|
|
|
with open(config_yaml, 'r') as f:
|
|
config = yaml.safe_load(f)
|
|
|
|
job_types = {
|
|
'random+sobo': job.sobo_job
|
|
}
|
|
|
|
job_types[config['job']['type']](config)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) != 2:
|
|
print("Usage: python bo-ptycho.py <config_yaml>")
|
|
sys.exit(1)
|
|
config_yaml = sys.argv[1]
|
|
main(config_yaml)
|