instamatic-dev / instamatic

Python program for automated electron diffraction data collection
https://instamatic.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
57 stars 25 forks source link

Interface and microscope #46

Closed rds-itga closed 3 years ago

rds-itga commented 3 years ago

Hi, I have a question, to use the jeol-1400 configuration I filled the field

microscope: jeol-1400

within the settings.yaml config file but do i have to call

ctrl = TEMController.initialize(tem_name='jeol', cam_name=None)

or

ctrl = TEMController.initialize(tem_name='jeol-1400', cam_name=None)

The fact is that I observed an unexpected behaviour yesterday: I called

ctrl = TEMController.initialize(tem_name='jeol', cam_name=None)

with

microscope: jeol-1400

within settings.yaml but when i called

ctrl.tem.getMagnificationRanges()

I got those from jeol.yaml and not those from jeol-1400.yaml I don't know if I am clear

Thanks

stefsmeets commented 3 years ago

Hi @rds-itga , I think I understand, it also still gets me confused sometimes 😅 What you describe fits with how it is intended to work.

The idea is that if you filled out the settings.yaml then you can use:

ctrl = TEMController.initialize()

Then it will use the value configured in settings.yaml

If you set tem_name='jeol', then it will override the value you set, and use the given value instead. This seems to be what is happening.

If you want to be really in the clear, just have a single file called jeol.yaml.

rds-itga commented 3 years ago

Ok, I understand, it is clear to me now. Thank you very much! Regards