MingjieJian / pymoog

Python wrapper for MOOG
MIT License
11 stars 4 forks source link

rundir -> rundirX with rundirX.lock #28

Closed MingjieJian closed 3 years ago

MingjieJian commented 3 years ago

Now all the MOOG running is located in ~/.pymoog/rundir, which make it impossible to run two MOOG in the same time since the seond running will remove all the files for the first run in that folder. Inspired by Telfit (https://github.com/kgullikson88/Telluric-Fitter), it is better to have multiple rundir folders (e.g., rundir1, rundir2, rundi3, ...) when necessary and use a plain text file rundir1.lock to lock the corresponding folder to avoid conflict.

However this change will make it harder to check the input and output for MOOG after the program is done: the users do not know which rundir they should check and the lock will be remove once it is finished. I am thinking of copying the whole folder into a new place (maybe ~/.pymoog/record/) and rename it using the driver name and time (e.g., abfind_20201203_105403/) when a new keyword is set (e.g., record=True).

Detail process: