How does leginon find the gain reference - through naming file system or through database?
Added by Michael Cianfrocco over 6 years ago
Hi Anchi,
I know that leginon finds the gain reference for a given session by looking in the directory space for leginon, but I'm wondering about whether leginon uses information in the database for finding the file or if it just simply looking through the file system? Due our file permissions issues here, we are wondering how to share gain references between users more easily.
Thanks,
Mike
Replies (6)
RE: How does leginon find the gain reference - through naming file system or through database? - Added by Anchi Cheng over 6 years ago
Gain references path are found through database. However, it still reads the reference file from the file system, not as a blob in the database. We do require the reference sessions (xxx_ref_a) to be readable by others. You have raised a good point though. Will it be possible to have a directory that is read-writable by all users to host reference sessions ? If so, I can add in the configuration to make that path the reference base path instead of the leginon base path (Base path means the bath under Images section in leginon.cfg).
RE: How does leginon find the gain reference - through naming file system or through database? - Added by Michael Cianfrocco over 6 years ago
Hi Anchi,
Yes we do have directories that are read/writable by all users so this feature would be great! It would solve our problem of read-protected folders that prevents the managers from taking gain references for users.
Thanks!
Mike
RE: How does leginon find the gain reference - through naming file system or through database? - Added by Anchi Cheng over 6 years ago
It turns out that I have this feature already when I tried to resolve a problem of failed disks. See Issure #5471. You just have to set it in leginon.cfg
In the 3.3 and above leginon/leginon.cfg.template, you will find
# Optional restriction of reference path to the specified #[References] #path:
You need to comment out the section and the path part and put in the path you want all users to create and query reference from. Like this
# Optional restriction of reference path to the specified [References] path: /your_common_path/leginon_ref
RE: How does leginon find the gain reference - through naming file system or through database? - Added by Christopher Lilienthal over 6 years ago
Hi Anchi,
If we want to transition to specifying the References path will we need to move all the gain references to that path and update the database accordingly or will it only apply to new sessions/projects?
RE: How does leginon find the gain reference - through naming file system or through database? - Added by Anchi Cheng over 6 years ago
If you have very few, it may be easier to move files and then update leginondb.SessionData.`image path` for reference sessions '*_ref_*'
If you accumulated quite a lot, closing write permission to those folder will force new references user takes to go to the new location. The only problem is that K2 dark references are never retaken so they will remain on the old disk so that those disks need to remain readable, unless you redo them.
RE: How does leginon find the gain reference - through naming file system or through database? - Added by Anchi Cheng over 6 years ago
Of course if you configure leginon.cfg for all users to use the specified common path, it will tell you that you need new references taken for everything for any new images taken and ignore the ones in the old path. That is an option for you, too, moving forward.