This HTML automatically generated with rman for NEMO
Table of Contents

Name

ccdstretch - stretching (upscaling) an image cube along a given axis

Synopsis

ccdstretch [parameter=value]

Description

ccdstretch stretches a selected axis from a cube by duplicating its pixel values factor times. This of course causes a step function along the stretched axis, but a subsequent ccdsmooth(1NEMO) can fix this. See EXAMPLES below.

Using compress=t an axis can be binned instead of stretched, with the option if to average the values or sum them.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=fileName
Input image cube fileName. No default.
out=fileName
Output image cube fileName. No default.
factor=factor
The factor by which the selected axis is stretched. Must be an integer. [Default: 2]
axis=x|y|z
Select the axis to be stretched. Valid are: x,X,1 for the first axis, y,Y,2 for the second and z,Z,3 for the third axis of the cube. Only one axis can be stretched at the time. Default: z
compress=t|f
Compress (rebin) instead of stretch? [Default: false].
average=t|f
Average when rebinning in compress mode? [Default: true]

Examples

An example of stretching the Z axis of a cube 4 times, and adding some smoothing to make it look less edgy:
  fitsccd cube.fits - | ccdstretch - - 4 z | ccdsmooth - -  nsmooth=2 dir=z | ccdfits
- cube4.fits
  
Depending how much you stretch, the smoothing function and/or number of times to smooth may need to be changed. In this example the axis is stretched 4 times, and two hanning smoothings are then applied.

If multiple axes need to be stretched, the program currently needs to be run multiple times, for example in a Unix pipe, as only one axis at the time can be stretched. Here is an example of stretching a 2 x 2 x 2 cube into a 4 x 4 x 4 cube:

   ccdgen cube0 noise 0,1 2,2,2
   ccdstretch cube0 - 2 x | ccdstretch - - 2 y | ccdstretch - - 2 z | ccdprint
- x= y= z= label=z pixel=t
  
   

See Also

ccdsmooth(1NEMO) , ccdsub(1NEMO) , ccdslice(1NEMO) , image(5NEMO)

Files

src/image/trans/ccdstretch.c

Author

Peter Teuben

Update History


17-aug-2023    V0.1 for Stuart Vogel’s rosetta stone cube    PJT
    paws-pdbi+30m-12co10-1as-cube.fits
19-aug-2023    V0.5 added compress= and average=        PJT


Table of Contents