Table of Contents

Name

marshrink- shrinks a mar image into an image with smaller diameter

Synopsis

marshrink [ -h (--help) ] [ -d (--delete) ] [ -f (--force) ] [ -l (--list) ] [ -r (--recursive) ] [ -v (--verbose) ] [ -z (--zero) ] [ -noz (--nozero) ] [ -c (--center) XOFF YOFF ] [ -dia (--diameter) DIAMETER ] [ -nx (-m, --mode) NX ] [ -ny) NY ] [ -n NAME ] [ -o DIR ] [ -out FORMAT ] [ -x (--xoff) XOFF ] [ -y (--yoff) YOFF ] file1 file2 ...

Description

marshrink shrinks an image to one with a smaller size. By default, the center of the original image will be the center of the resulting image. By applying offsets in x and y the new center can be shifted.

Options

-h, --help
Provides a summary of the options.
-l, --list
Lists the selected files (directories) only, no output.
-f, --force
Forces image output, even if a file with the same name already exists. The default is to skip output.
-d, --delete
Deletes input image after successful conversion. The default is to keep the input file.
-r, --recursive
If the file argument (see below) is a directory, all images in this directory and its subdirectories will be converted. This is a very fast way of converting large numbers of images scattered in many directories.
-z, --zero
Set pixels outside the new DIAMETER to zero to produce round diffraction images.
-noz, --nozero
Do not set pixels outside the new DIAMETER to zero. This is the default.
-v, --verbose
Writes more information to stdout.
-o DIR
Place output images in directory DIR. Default is: same directory as input images.
-out FORMAT
Specify output format, either ’mar345’ or ’image’ (mar300). Default is: mar345.
-n, --name NAME
Root name of output images. Default is: keep existing root name.
-c, --center XOFF YOFF
Shift the center of the excised image in x by XOFF and in y by YOFF pixels from the physical center of the original image. XOFF and YOFF can be negative. Default is: NY/2
-dia, --diameter NX
Shrink image to a diameter of NX pixels. Default is: none.
-nx, -m, --mode NX
Shrink image to a diameter of NX pixels. Default is: none.
-ny NY
Shrink image in y direction to a size of NY pixels. Default is: none.
-x, --xoff XOFF
Shift the center of the excised image in x by XOFF pixels from the physical center of the original image. XOFF can be negative. Default is: NX/2
-y, --yoff YOFF
Shift the center of the excised image in y by YOFF pixels from the physical center of the original image. YOFF can be negative. Default is: NY/2
file1 file2 ...
Image files to convert. Wildcards allowed.

Examples

marshrink -nx 1200 -z xtal_001.mar2000
Reduces file xtal_001.mar2000 with 2000 x 2000 pixels to a file with 1200 x 1200 pixels centered at the original center of the image (x=1000, y=1000). All pixels outside a radius of 600 pixels are set to 0. This is equivalent to collect data in scanmode 1200 instead of scanmode 2000. The name of the output file is xtal_001.mar1200
marshrink -nx 1200 -z -x 5 -y -10 xtal_001.mar2000
Same as above but the center of the new image is now shifted by 5 pixels in x and -10 pixels in y corresponding to a physical center of the original image of x = 1005 and y=990.

See Also

mar345_formats

Author

Claudio Klein, marXperts GmbH, Norderstedt, Germany

Copyright

© Copyright 2014 marXperts GmbH, Norderstedt, Germany

Address

marXperts GmbHPhone: +49 - (40) - 529 884-0
Werkstr. 3 FAX: +49 - (40) - 529 884-20
D-22844 Norderstedt - GERMANYinfo@marXperts.com
www.marXperts.com


Table of Contents