checkOrder
Return to directory of Todd's CASA extensions
Takes two lists, and if the first list is in decreasing order, then it inverts
both lists. Useful for forcing a spectrum to have increasing frequency vs. channel.
Usage:
au.checkOrder(inpFreq ,inpData)
Inputs:
- inpFreq: the x-axis values
- inpData: the y-axis values
Returns:
- [x-axis values, y-axis values, reversed] where reversed is a Boolean with values: 0="unchanged", 1="lists have been inverted so that x-axis is in increasing order"
Examples:
CASA <3>: au.checkOrder([0,10],[1.15,1.7])
Out[3]: ([0, 10], [1.15, 1.7], 0)
CASA <4>: au.checkOrder([0,-10],[1.15,1.7])
Out[4]: ([-10, 0], [1.7, 1.15], 1)
--
ToddHunter - 2014-08-13