---
name: "kmo_copy"
section: "7"
platform: "linux"
package: "cpl-plugin-kmos-doc"
version: "2.1.0+dfsg-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/kmo_copy"
---

# kmo\_copy(7)

Copy a section of a cube to another cube, image or spectrum

## NAME

kmo\_copy - Copy a section of a cube to another cube, image or spectrum

## SYNOPSIS

esorex **kmo\_copy** \[OPTIONS\] FILE.sof

## DESCRIPTION

With this recipe a specified region of an IFU-based cube (F3I), image (F2I) or vector (F1I) can be copied to a new FITS file. One can copy just a plane out of a cube (any orientation) or a vector out of an image etc. By default the operation applies to all IFUs. The input data can contain noise frames which is then copied in the same manner as the input data.

It is also possible to extract a specific IFU out of a KMOS FITS structure with 24 IFU extensions or 48 extensions if noise is present.

### BASIC PARAMETERS

\--ifu Use this parameter to apply the operation to a specific IFU.

\--x --y --z These are the start values in each dimension. The first pixel is adressed with 1.

\--xsize --ysize --zsize These are the extents in each dimension to copy.

\--autocrop If set to TRUE all borders containing NaN values are cropped. Vectors will be shortened, images and cubes can get smaller. In This special case following parameters can be omitted: --x, --y, --z, --xsize, --ysize and --zsize.

Examples: --------- extract a cube-section of a cube:  esorex kmo\_copy --x=3 --y=2 --z=1 --xsize=2 --ysize=3 --zsize=6 copy.sof

extract plane: esorex kmo\_copy --x=3 --y=2 --z=1 --xsize=2 --ysize=3 copy.sof

extract vector just of IFU 4: esorex kmo\_copy --x=3 --y=2 --z=1 --ysize=3 --ifu=4 copy.sof

extract whole IFU 4: esorex kmo\_copy --x=1 --y=1 --z=1 --xsize=\<NAXIS1\> --ysize=\<NAXIS2\> \
                                            \--zsize=\<NAXIS3\> --ifu=4 copy.sof

extract scalar: esorex kmo\_copy --x=3 --y=2 --z=1 copy.sof

with copy.sof: F3I.fits    DATA

  Input files:

   DO                    KMOS                                                  \
    category              Type   Explanation                    Required #Frames\
    \--------              -----  -----------                    -------- -------\
    \<none or any\>         F3I    Data cube                         Y        1   \
    or                                                                          \
    \<none or any\>         F2I    Image                                          \
    or                                                                          \
    \<none or any\>         F1I    Vector                                         \
                                 (All inputs with or                            \
                                 without noise frame)

  Output files:

   DO                    KMOS\
    category              Type   Explanation\
    \--------              -----  -----------\
    COPY                  F3I or Cropped input data\
                          F2I or                   \
                          F1I

## OPTIONS

- **--ifu** *\<int\>*

  Specific IFU to process (int; default: -1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.ifu** \[default = *-1*\].

- **--autocrop** *\<bool\>*

  Crop automatically NaN values at borders (bool; default: False). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.autocrop** \[default = *False*\].

- **--x** *\<int\>*

  Start value in first dimension (pixels). (int; default: 1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.x** \[default = *1*\].

- **--y** *\<int\>*

  Start value in second dimension (pixels). (int; default: 1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.y** \[default = *1*\].

- **--z** *\<int\>*

  Start value in third dimension (pixels). (int; default: 1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.z** \[default = *1*\].

- **--xsize** *\<int\>*

  Length in first dimension (pixels). (int; default: 1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.xsize** \[default = *1*\].

- **--ysize** *\<int\>*

  Length in second dimension (pixels). (int; default: 1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.ysize** \[default = *1*\].

- **--zsize** *\<int\>*

  Length in third dimension (pixels). (int; default: 1). The full name of this option for the EsoRex configuration file is **kmos.kmo\_copy.zsize** \[default = *1*\].

Note that it is possible to create a configuration file containing these options, along with suitable default values. Please refer to the details provided by the 'esorex --help' command.

## SEE ALSO

The full documentation for the kmos pipeline can be downloaded as  a PDF file using the following URL:

-

  **ftp://ftp.eso.org/pub/dfs/pipelines/kmos/kmos-pipeline-manual-2.9.pdf**

An overview over the existing ESO pipelines can be found on the web page **https://www.eso.org/sci/software/pipelines/**.

Basic documentation about the EsoRex program can be found at the esorex (1)  man page.

It is possible to call the pipelines from python using the python-cpl package. See **https://packages.python.org/python-cpl/index.html** for further information.

The other recipes of the kmos pipeline are [*kmo\_arithmetic*(7)](/kmo_arithmetic/7.md), [*kmo\_fit\_profile*(7)](/kmo_fit_profile/7.md), [*kmo\_fits\_strip*(7)](/kmo_fits_strip/7.md), [*kmo\_make\_image*(7)](/kmo_make_image/7.md), [*kmo\_noise\_map*(7)](/kmo_noise_map/7.md), [*kmo\_rotate*(7)](/kmo_rotate/7.md), [*kmo\_shift*(7)](/kmo_shift/7.md), [*kmo\_sky\_mask*(7)](/kmo_sky_mask/7.md), [*kmo\_stats*(7)](/kmo_stats/7.md), [*kmos\_combine*(7)](/kmos_combine/7.md), [*kmos\_dark*(7)](/kmos_dark/7.md), [*kmos\_extract\_spec*(7)](/kmos_extract_spec/7.md), [*kmos\_flat*(7)](/kmos_flat/7.md), [*kmos\_gen\_reflines*(7)](/kmos_gen_reflines/7.md), [*kmos\_gen\_telluric*(7)](/kmos_gen_telluric/7.md), [*kmos\_illumination*(7)](/kmos_illumination/7.md), [*kmos\_reconstruct*(7)](/kmos_reconstruct/7.md), [*kmos\_sci\_red*(7)](/kmos_sci_red/7.md), [*kmos\_sky\_tweak*(7)](/kmos_sky_tweak/7.md), [*kmos\_std\_star*(7)](/kmos_std_star/7.md), [*kmos\_test*(7)](/kmos_test/7.md), [*kmos\_wave\_cal*(7)](/kmos_wave_cal/7.md)

## VERSION

kmo\_copy 2.1.0

## AUTHOR

Alex Agudo Berbel \<usd-help@eso.org\>

## BUG REPORTS

Please report any problems to usd-help@eso.org. Alternatively, you may send a report to the ESO User Support Department \<usd-help@eso.org\>.

## LICENSE

This file is part of the CRIRES Instrument Pipeline Copyright (C) 2002,2003 European Southern Observatory

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,  MA  02111-1307  USA
