RATS 10.1
RATS 10.1

CTOR( options )   start end newstart

# list of complex series

# list of real series

 

CTOR transfers data from complex series to real series. You must do this if, for example, you want to graph any data created in the frequency domain. It is also necessary if you have real-valued series which you have created in the frequency domain by an operating such as frequency domain-filtering.

 

The companion instruction RTOC transfers data from real series into complex series.

Parameters

start, end

range to transfer. By default, the (possibly different) defined range of each transferred series.

newstart

starting entry in destination series. By default, same as start. The default starting entry may change from series to series if you use the default start to end range

Options

PART=[REAL]/ABSVALUE/IMAGINARY

PART specifies which part of the complex numbers you want to send to the time domain. (ABSVALUE = Absolute Value)

 

INTERVAL=sampling interval [1]

You can use the INTERVAL option to reduce the number of frequencies transferred. CTOR copies just one entry out of each sampling interval, beginning with start. Because spectral estimates are usually quite smooth, you will lose very little detail.

Examples

ctor(interval=4) 1 720

#     1

#  spectrum
 

copies the real part of every fourth entry of complex series 1 to entries 1 through 180 of the real series SPECTRUM.



This next example sends two series to the frequency domain, filters them by using a seasonal mask on the Fourier transforms, then sends the results back. Note that, while this produces “values” for series 1 and 2 which go beyond the actual data length, it is only the original range which is actually useful.

 

compute nords=2*%freqsize(2018:6)

freq 3 nords

rtoc 1960:1 2018:6

# x y

# 1 2

fft 1

fft 2

cmask 3 1 nords

cmult 1 3

cmult 2 3

ift 1

ift 2

ctor 1960:1 2018:6

# 1 2

# xadj yadj

 


Copyright © 2025 Thomas A. Doan