Closed c-poole closed 4 years ago
The scope of this PR has expanded some since the original post. New features that have also been included make it so that if the config file is changed, the prompt that asks you whether or not you want the config.cfg
version or the version in your settings.hdf5
file will properly halt console output so that cs.py
doesn't appear to hang on you. Based on the config file found (the one you picked if they differ), you can construct a different instance of the experiment class that only has instruments, analyses, properties, etc. related to your experiment. I made a FNODE
class as an example of how to implement this and intend to run on that in the future instead of AQuA
. Default behavior will be no change to other experiments. You have to opt-in to this by making your own class and modifying cs.py
. I did a simple test with 5 iterations and 30 measurements per iteration and found a results.hdf5
file size reduction from 6.3KB to 4.4KB. With the introduction of experiment specific classes, I also introduced a way to customize the drop-down menu that opens windows to only include the options relevant to you. You make a window_dict
variable in your Experiment
child class and only keep the options from the default dictionary stored in cs_GUI.enaml
. This won't effect the drop-down menu until the windowmanagement
branch is also merged in, but with both branches you can customize your experiment and window menu.
Modifies Requirements.txt to only contain ACTUAL dependencies for the project. Removes the need to specify Origin install path by pushing it to Requirements file. Modifies all config files to be consistent with new Origin set-up. Only loads config once and passes the reference instead of repeatedly loading in each module that uses it. Changes README to reflect changes to installation procedures.
To get this branch working for you, do the following: checkout the branch pip install the requirements file in your virtual environment when you start up cspy, you will get a warning that your config file is changed compared to the save d one and be prompted for which you want to use. Enter N. This prompt will not stall output to the command line so you may not notice it.
That's all. So long as you are working with a settings file that has the up to date config stored, you won't be prompted again in the future and won't have to worry about the details of getting CsPy to work nicely with Origin.
Fixes #45