Differences between revisions 7 and 9 (spanning 2 versions)
Revision 7 as of 2010-03-31 20:37:45
Size: 2645
Editor: root
Comment:
Revision 9 as of 2010-03-31 21:58:26
Size: 3933
Editor: root
Comment:
Deletions are marked like this. Additions are marked like this.
Line 78: Line 78:

Example:

{{{
[irees@mbp ~/data]$ emen2client.py upload ccd 410082 *.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
}}}

emen2client.py

Download

* emen2client.py

Usage

emen2client.py --help

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

emen2client.py download --help

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.

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 410082 *.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)