Differences between revisions 8 and 10 (spanning 2 versions)
Revision 8 as of 2010-03-31 21:57:54
Size: 3927
Editor: root
Comment:
Revision 10 as of 2010-03-31 22:02:14
Size: 4367
Editor: root
Comment:
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
emen2client.py download --help == Download Usage ==
Line 44: Line 44:
Example:

{{{
[irees@mbp ~/data]$ emen2client.py download 123456

Username: ianrees
Password:

1 of 1: 404229
 Checking for items to download
 Found 92 items in 93 records

 1 of 92: 2009110400033
  Downloading frame1.dm3.gz -> frame1.dm3...

 2 of 92: 2009110400032
  Downloading frame2.dm3.gz -> frame2.dm3...

 3 of 92: 2009110400031
  Downloading frame3.dm3.gz -> frame3.dm3...

.... snip ....
 
}}}

== Upload Usage ==
Line 49: Line 76:
  Record type can be any valid database protocol.
  Some record types have special, application-specific handlers, e.g.:
  
  ccd CCD Frames
  scan Scanned micrographs
   stack Tomograms
 Record type can be any valid database protocol.
 Some record types have special, application-specific handlers, e.g.:
 
  ccd CCD Frames
  scan Scanned micrographs
  stack Tomograms
Line 56: Line 83:
  Other values, e.g. "volume", will create child records of that type, with 1 file per child record.  Other values, e.g. "volume", will create child records of that type, with 1 file per child record.
Line 58: Line 85:
  Alternatively, you can use "none" for record type and the files will be attached directly to the specified record ID.
  
 Alternatively, you can use "none" for record type and the files will be attached directly to the specified record ID.
 
Line 82: Line 109:
mbp:o2 irees$ emen2client.py upload ccd 410082 *.dm3 [irees@mbp ~/data]$ emen2client.py upload ccd 123456 *.dm3

emen2client.py

Download

* emen2client.py

Usage

emen2client.py --help

./emen2client.py <action>
Actions available: upload, download
For detailed help: ./emen2client.py <action> --help

Download Usage

Usage: emen2client.py download [options] <recid> [filename-pattern]

Options:
  -h, --help            show this help message and exit
  -U USERNAME, --username=USERNAME
                        Username
  -P PASSWORD, --password=PASSWORD
                        Password (Note: specifying passwords in shell commands
                        is not secure)
  -H HOST, --host=HOST  Host endpoint URI
  -C CTXID, --ctxid=CTXID
                        Valid Context ID
  --recurse=RECURSE     Recursion level
  -o, --overwrite       Overwrite existing files (default is to skip)
  -r, --rename          If a file already exists, save with format
                        'duplicate.recid:original_filename.dm3'
  -s, --sidecar         Include sidecar file with EMEN2 metadata in JSON
                        format
  --gzip                Decompress gzip'd files. Requires gzip in path
                        (default)
  --no-gzip             Do not decompress gzip'd files.

Example:

[irees@mbp ~/data]$ emen2client.py download 123456

Username: ianrees
Password: 

1 of 1: 404229
        Checking for items to download
        Found 92 items in 93 records

        1 of 92: 2009110400033
                Downloading frame1.dm3.gz -> frame1.dm3...

        2 of 92: 2009110400032
                Downloading frame2.dm3.gz -> frame2.dm3...

        3 of 92: 2009110400031
                Downloading frame3.dm3.gz -> frame3.dm3...

.... snip ....

Upload Usage

emen2client.py upload --help

Usage: emen2client.py upload [options] <record type> <recid> <files to upload>

        Record type can be any valid database protocol.
        Some record types have special, application-specific handlers, e.g.:
        
                ccd                     CCD Frames
                scan            Scanned micrographs
                stack           Tomograms

        Other values, e.g. "volume", will create child records of that type, with 1 file per child record.

        Alternatively, you can use "none" for record type and the files will be attached directly to the specified record ID.
        
                

Options:
  -h, --help            show this help message and exit
  -U USERNAME, --username=USERNAME
                        Username
  -P PASSWORD, --password=PASSWORD
                        Password (Note: specifying passwords in shell commands
                        is not secure)
  -H HOST, --host=HOST  Host endpoint URI
  -C CTXID, --ctxid=CTXID
                        Valid Context ID
  -q, --noninteractive  Do not prompt for parameter values
  -s, --sidecar         Write sidecar file after upload
  -f, --force           Force re-upload even if a sidecar is found
  --metafile            Attempt to read JAMES/JADAS metadata files (default)
  --no-metafile         Ignore metadata files

Example:

[irees@mbp ~/data]$ emen2client.py upload ccd 123456 *.dm3

Username: ianrees
Password: 

3 Files to upload:
        1.dm3
        2.dm3
        3.dm3

----- tem_magnification_set -----
        Description: Magnification set on microscope
        Units: K

        Common values:
                0) 60.0
                1) 50.0
                2) 40.0
                3) 20.0
                4) 80.0
                5) 100.0
                6) 15.0
                7) 60000.0
                8) 30.0
                9) 25.0

                10) None or N/A
                11) Enter a different not listed above

        Selection (0-11): 0

----- ctf_defocus_set -----
        Description: Intended defocus while imaging, underfocus positive
        Units: um

        Common values:
                0) 1.0
                1) -2.0
                2) 2.0
                3) 1.5
                4) 3.0
                5) 2.5
                6) -3.0
                7) -1.5
                8) -2.5
                9) 0.8

                10) None or N/A
                11) Enter a different not listed above

        Selection (0-11): 0


... snip: additional prompts ommitted for clarity ...


1 of 3: 1.dm3
        Preparing for upload
        Checking and committing records

        1.dm3
                Done. Uploaded 1.dm3 to record 417171 @ 15210.92 kb/sec

2 of 3: 2.dm3
        Preparing for upload
        Checking and committing records

        2.dm3
                Done. Uploaded 2.dm3 to record 417172 @ 15080.45 kb/sec

3 of 3: 3.dm3
        Preparing for upload
        Checking and committing records

        3.dm3
                Done. Uploaded 3.dm3 to record 417173 @ 14253.12 kb/sec

EMEN2/emen2client.py (last edited 2011-05-20 15:58:47 by IanRees)