tomography / XRFtomo

a repository for xray fluorescence data processing
Other
3 stars 6 forks source link

added configuration file #12

Closed decarlof closed 5 years ago

decarlof commented 5 years ago

This pull request adds general template configuration xfluo.conf file that can be used to store/recall the GUI settings. It also allows for usage of xfluo with the command line. In this case the settings of the last time the GUI run will be used. All GUI settings can be also modified selecting the corresponding parameter (see readme file for instructions). Because of this change the json file that was handling the three options for the theta pv has been removed and its functionality added to xfluo.conf

decarlof commented 5 years ago

@aglowacki please have a look at this pull request. Here I replace the json file that handled the status of 1 gui field only with a more general approach that allows to set any field as status variable, that can be recalled at the next gui execution. The same functionality is now also available through command line.

FabricioSMarin commented 5 years ago

@decarlof The theta PV field does not seems to be saving upon exit. The second time I run it, it loads the default string. I also get a QBasicTimer message if the theta PV is modified.

(py37) fabricio@y2p-pc:~/conda/tmp_xfluo/bin$ python xfluo gui QBasicTimer::start: QBasicTimer can only be used with threads started with QThread QBasicTimer::start: QBasicTimer can only be used with threads started with QThread (py37) fabricio@y2p-pc:~/conda/tmp_xfluo/bin$

decarlof commented 5 years ago

@FabricioSMarin that is correct. The saving of the pv field in the params list should be added somewhere. The call will be something like

self.params.theta_pv = ....

This can be in the code using that field or in the label class. Regarding the error message I will need to look into it.

FabricioSMarin commented 5 years ago

I added the self.params.theta_pv line as you suggested and a couple other things. As a bonus, the error or warning message does not appear anymore.

decarlof commented 5 years ago

great! I am closing it