Project

General

Profile

Reconnecting Leginon to a new microscope computer

Added by Gregory Alushin over 10 years ago

Hello-

Unfortunately we recently had a complete failure of the windows PC controlling our F20, such that the computer had to be totally replaced by FEI.

We reinstalled the necessary components on this PC and attempted to start a Leginon session using the same linux box we previously used to control the microscope, which is untouched. Leginon can talk to the microscope and vice versa, but it looks like all presets, calibrations, etc. have been lost. One thing that has changed is that the name of the microscope computer, which is input into the "connect to clients" dialogue, is now different (as would be expected by default on a new computer).

My question is: would it be possible to recover presets, calibrations, etc., by changing the name of the new microscope computer so that leginon associates it with previously stored calibrations? Or are these at least partially stored on the windows computer itself, such that all the calibrations will need to be redone?

Thanks!
-Greg Alushin


Replies (2)

RE: Reconnecting Leginon to a new microscope computer - Added by Anchi Cheng over 10 years ago

You don't need to redo calibrations.

The leginon database uses hostname at two places:

1. Associate an instrument (scope/camera) to the hostname in order to identify it from same model on a different host.
2. Keep a record of what Leginon application has been launched on which client so that you can go back to it easily next time.

The first one is what makes the calibrations to associate to a host. The second is just for convenience, so let's not worry about it.

You will have to do this with a few mysql query. Assuming that your database is on host called "dbserver", your mysql username is "usr_object" and has password assigned to it, and your leginon database is called "leginondb". You will connect to it through mysql command like this:

mysql -h dbserver -u usr_object -p leginondb

Once in there, first check if you have created new instrument on the host of named "newhost" by now. We need to rename it to "dummyhost" so that it is not confusing later.
mysql> select `DEF_id` from InstrumentData where hostname like "newhost";

If this gives you a number or two as the id number of the each record, rename on these record with the `DEF_id`s like so (the DEF_id in this example is 6):
mysql> update InstrumentData set hostname="dummyhost" where `DEF_id`= 6;

Now we are ready to change the old hostname "oldhost" to "newhost". Basically, this repeats the same process.

mysql> select `DEF_id` from InstrumentData where hostname like "oldhost";

This gives you a few id numbers for the records, execute the rename command on these record with the `DEF_id`s like so (the DEF_id in this example is 4):
mysql> update InstrumentData set hostname="newhost" where `DEF_id`= 4;

Exit mysql when you are done
exit;

That should do it.

RE: Reconnecting Leginon to a new microscope computer - Added by Gregory Alushin over 10 years ago

Worked like a charm. Thanks, Anchi, you're the best!

-Greg

    (1-2/2)