Project

General

Profile

frame path column in the leginondb.SessionData table populated from

Added by Christopher Lilienthal over 8 years ago

Hello,

I need some help tracking down where this issue lies. The path in the frame path column of the SessionData table within the leginondb database has the wrong path (It is missing a folder) and I would like to know how that entry is populated so I can fix the problem.

Thanks


Replies (7)

RE: frame path column in the leginondb.SessionData table populated from - Added by Anchi Cheng over 8 years ago

When Leginon SetupWizard Page get through asking you session name, image path etc, it creates the session (myami/leginon/gui/wx/SetupWizard.py class Setup, function createSession), it derives the frame path from (myami/leginon/ddinfo.py getRawFrameSessionPathFromSessionPath with image path as the input.

We tried to come up with a few scenario that makes good organization sense. Maybe yours isn't one of them. It would be nice to hear from you what you use and what is the reason for going such a way to see if we can add that in the future.

See File_Server_Setup_Considerations

RE: frame path column in the leginondb.SessionData table populated from - Added by Christopher Lilienthal over 8 years ago

Anchi Cheng wrote:

When Leginon SetupWizard Page get through asking you session name, image path etc, it creates the session (myami/leginon/gui/wx/SetupWizard.py class Setup, function createSession), it derives the frame path from (myami/leginon/ddinfo.py getRawFrameSessionPathFromSessionPath with image path as the input.

We tried to come up with a few scenario that makes good organization sense. Maybe yours isn't one of them. It would be nice to hear from you what you use and what is the reason for going such a way to see if we can add that in the future.

See File_Server_Setup_Considerations

Thank you for the fast response, and I apologize for the slow reply. Let me elaborate on my situation.

I am trying to track down what configuration file is wrong.

We currently have one linux host running our database server, web server, and file server. By file server i mean it mounts our storage via NFS. Here are the configuration files for that host.

$ cat /etc/myami/leginon.cfg

# leginon.conf

[Images]
path: /common/lana/leginon

[User]
fullname:

[Drive Mapping]

$ cat /etc/myami/sinedon.cfg

###########################################################################
## Each section name is the name of a Python module (without the .py).
## Options for each section are valid arguments to MySQLdb.connect:
##   host, db, user, passwd
## The Global section defines defauls for every section but can be overriden
## in each section.
###########################################################################

###########################################################################
## These globals are defaults for all other sections, but each section 
## can override them if necessary.
###########################################################################
[global]
#host: your_database_host
host: localhost
user: EXCLUDED
passwd: EXCLUDED

###########################################################################
## This is an example python->database mapping.
## The classes defined in exampledata.py describe the tables in the
## database configured in this section.
###########################################################################
[projectdata]
db: projectdb

[leginondata]
db: leginondb

###########################################################################
## Please leave this field empty.
###########################################################################
[appiondata]
db:

On our K2 PC here are the config files:

> # leginon.cfg
> 
> # path is a base directory, a session subdirectory will automatically be
> # created under it when the first image is saved for that session.
> #
> # Example
> #
> # [Images]
> # path: /data/leginon          # base directory where images will be stored
> 
> [Images]
> path: /common/lana/leginon
> 
> # Optional. To skip part of leginon start up, enter your full name here.
> #
> # Example
> #
> # [User]
> # fullname: John Doe         # the user firstname lastname
> 
> [User]
> fullname:
> 
> #[Project]
> #default: Default Project
> 
> # Optional. Local drive letters can be mapped to fs on the database server.
> #
> # Example
> #
> # [Drive Mapping]
> # Z: /database/filesystem
> 
> [Drive Mapping]
> L: /common/lana
> 
> # password entered in GUI
> #[Email]
> #host: smtp.yourdomain.com
> #user: user@yourdomain.com
> #from: user@yourdomain.com
> #to: user@yourdomain.com
> 
> # dmsem.cfg
> ### general dm configurations
> [dm]
> # DM Version
> DM_VERSION = 2.31.734.0
> 
> ### K2 Summit configuration through SERIALEMCCD plugin
> [k2]
> # Camera ID
> CAMERA_ID = 0
> # the value in DM camera config
> #FLIP = True
> FLIP = False
> # multiple of 90 degrees (i.e. put 1 if 90 degrees, 3 if 270 degrees)
> # ROTATE = 3
> ROTATE = 0
> # raw frame base directory. Use '\' as path separator
> RAW_FRAME_DIR = L:\leginon\frames\
> # max number of frames to sum in order to return early
> EARLY_RETURN_FRAME_COUNT = 0
> 
> ### Orius configuration if exists
> # [orius]
> # Camera ID
> # CAMERA_ID = 1
> 

With these configuration files I was expecting the entry in the database to be /common/lana/leginon/frames/session but instead it is /common/lana/fames/session .

Any insights would be greatly appreciated.

RE: frame path column in the leginondb.SessionData table populated from - Added by Anchi Cheng over 8 years ago

Actually, the resulting frame path is just what we designed. You only suppose to enter (single) image path in leginon.cfg

We wanted the movie frame directory parallel to the single image (leginon) directory because we realized that it was not possible to keep up with back up on the raw frames. We regularly back up leginon directory which can also include aligned sum of the movie frames. The separation at the top level allows easier separation of backup rule.

I know the name "leginon" is confusing as it is historical.

Hope this is o.k. with you. If you think other ways would be more efficient from management point of view, please let us know.

RE: frame path column in the leginondb.SessionData table populated from - Added by Christopher Lilienthal about 7 years ago

Hi Anchi,

I understand the thinking but it presents some problems.

We are restructuring the directory structure of our storage and I thought, incorrectly as it turns out, that if I set the images path to be /mnt/leginon/sessions/session_name then the frames directory would be /mnt/leginon/frames/session_name. But the frames directory is being set as /mnt/frames/sessions/session_name . It looks like in the python code it is simply replacing an occurence of leginon with frames.

I can think of a couple solutions.
  1. Create an section in the config files called frames and under that have a path directive where we could specify the path to the frame directory we would like.
  2. Instead of simply replacing the text leginon in a path with the text frames you could take the Images path and go up one level and use a frames path there.

Example:
Instead of /mnt/leginon/sessions being changed to /mnt/frames/sessions change it to /mnt/leginon/frames

Just some ideas. Let me know if you'd like me to clarify anything.

RE: frame path column in the leginondb.SessionData table populated from - Added by Anchi Cheng about 7 years ago

Regarding Suggestion 1:

Your suggestion for full flexibility is well-taken. I will see what I can do. We are also planing to pull out reference session that contains gain/dark reference images for all leginon users to read to make it possible to assign all sessions to go to a special directory everyone can read/write.

Regarding Suggestion 2:

Can you mount as

/mnt/data/leginon/session_name ? Then /mnt/data/frames/session_name would work fine as is.

We use at SEMC something like /mnt/username/leginon and by extension /mnt/username/frames that allows tracking of quota.

RE: frame path column in the leginondb.SessionData table populated from - Added by Christopher Lilienthal about 7 years ago

Yes we could do something like that and will likely need to. Unfortunately we used the word leginon as the mount point so we will need to change this or in the interim I may just need to change the code on my end to do things the way we need for now.

Thank you for the help and for taking the time to consider my suggestions.

    (1-7/7)