Circular shift?
Hi, Robert et al.:
I'm doing some average light curves from simulations where phase is the x axis. It would be useful to have a circular shift function for the y values so I can put the minimum y value at phase = 0.0, for example. Does SM have such a function, or has anyone written a macro? In f90, it's CSHIFT, and in IDL, it's SHIFT ...
Thanks,
Matt Wood, Professor
Florida Tech Dept Physics & Space Sciences
Melbourne, FL, USA
- Forums:
Who's online
There is currently 1 user and 1 guest online.
Online users
- karuiner

vcentre (or vcenter) is the
vcentre (or vcenter) is the Official answer:
load fourier
set z = vcentre(y)
but now that I look it's not very smart. A better solution is:
set i0 = 50 set z = y[do(i0,dimen(y)-1)] concat y[do(0,i0-1)]
and I should update the macro.
Incidently, there's also vshift, but it doesn't use periodic
boundary conditions.
uh-oh
do you still care about this? can you use the vshift macro in the fourier macro file to do what you want? ie
: load fourier
: help vshift