PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v0.7.0 »
- SDSS Spectroscopic Data (`pydl.pydlspec2d`) »
- spec_append

# spec_append

`pydl.pydlspec2d.spec1d.``spec_append`(spec1, spec2, pixshift=0)

  Append the array spec2 to the array spec1 & return a new array.

  If the dimension of these arrays is the same, then append as [spec1,spec2]. If not, increase the size of the smaller array & fill with zeros.

  Parameters:

  spec1, spec2 : `numpy.ndarray`

  > Append `spec2` to `spec1`.

  pixshift : `int`, optional

  > If `pixshift` is set to a positive integer, `spec2` will be padded with `pixshift` zeros on the left side. If `pixshift` is set to a negative integer, `spec1` will be padded with `abs(pixshift)` zeros on the left side. If not set, all zeros will be padded on the right side.

  Returns:

  `numpy.ndarray`

  > A new array containing both `spec1` and `spec2`.