Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | coordsys |
refcode | in | Reference code | |
Allowed: | String | ||
Default: | No change | ||
restfreq | in | Rest frequency | |
Allowed: | Quantum or double | ||
Default: | No change | ||
frequencies | in | Vector of frequencies | |
Allowed: | Quantum vector | ||
Default: | No change | ||
doppler | in | Doppler type | |
Allowed: | String | ||
Default: | No change | ||
velocities | in | Vector of velocitiestypes | |
Allowed: | Quantum vector | ||
Default: | No change |
When you construct a Coordsys tool, if you include a Spectral Coordinate, it will be linear in frequency. This function allows you to replace the Spectral Coordinate by a finite table of values. Coordinate conversions between pixel and world are then done by interpolation.
You may specify either a vector of frequencies or velocities. If you specify frequencies, you can optionally specify a (new) reference code (see function setreferencecode for more details) and rest frequency (else the existing ones will be used).
If you specify velocities, you can optionally specify a (new) reference code and rest frequency (else the existing ones will be used). You must also give the doppler type (see function summary for more details). The velocities are then converted to frequency for creation of the Spectral Coordinate (which is fundamentally described by frequency).
You may specify the rest frequency as a Quantum or a double (native units of Spectral Coordinate used).
- cs := coordsys(spectral=T); - - f1 := [1,1.01,1.03,1.4] - fq := dq.quantity(f1, 'GHz') - cs.setspectral(frequencies=fq) - v := cs.frequencytovelocity(f1, 'GHz', 'radio', 'km/s') - print 'v=', v [88731.3175 86620.7061 82399.4832 4306.86125] - vq := dq.quantity(v, 'km/s') - cs.setspectral(velocities=vq, doppler='radio') - f2 := cs.velocitytofrequency(v, 'GHz', 'radio', 'km/s') - - print 'f1 = ', f1 [1 1.01 1.03 1.4] - print 'f2 = ', f2 [1 1.01 1.03 1.4]We make a linear Spectral Coordinate. Then overwrite it with a list of frequenices. Convert those values to velocity, then overwrite the coordinate starting with a list of velocities. Then convert the velocities to frequency and show we get the original result.