WCSLIB  5.18
spx.h
Go to the documentation of this file.
1 /*============================================================================
2 
3  WCSLIB 5.18 - an implementation of the FITS WCS standard.
4  Copyright (C) 1995-2018, Mark Calabretta
5 
6  This file is part of WCSLIB.
7 
8  WCSLIB is free software: you can redistribute it and/or modify it under the
9  terms of the GNU Lesser General Public License as published by the Free
10  Software Foundation, either version 3 of the License, or (at your option)
11  any later version.
12 
13  WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
16  more details.
17 
18  You should have received a copy of the GNU Lesser General Public License
19  along with WCSLIB. If not, see http://www.gnu.org/licenses.
20 
21  Direct correspondence concerning WCSLIB to mark@calabretta.id.au
22 
23  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
24  http://www.atnf.csiro.au/people/Mark.Calabretta
25  $Id: spx.h,v 5.18 2018/01/10 08:32:14 mcalabre Exp $
26 *=============================================================================
27 *
28 * WCSLIB 5.18 - C routines that implement the FITS World Coordinate System
29 * (WCS) standard. Refer to the README file provided with WCSLIB for an
30 * overview of the library.
31 *
32 *
33 * Summary of the spx routines
34 * ---------------------------
35 * Routines in this suite implement the spectral coordinate systems recognized
36 * by the FITS World Coordinate System (WCS) standard, as described in
37 *
38 = "Representations of world coordinates in FITS",
39 = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)
40 =
41 = "Representations of spectral coordinates in FITS",
42 = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L.
43 = 2006, A&A, 446, 747 (WCS Paper III)
44 *
45 * specx() is a scalar routine that, given one spectral variable (e.g.
46 * frequency), computes all the others (e.g. wavelength, velocity, etc.) plus
47 * the required derivatives of each with respect to the others. The results
48 * are returned in the spxprm struct.
49 *
50 * spxperr() prints the error message(s) (if any) stored in a spxprm struct.
51 *
52 * The remaining routines are all vector conversions from one spectral
53 * variable to another. The API of these functions only differ in whether the
54 * rest frequency or wavelength need be supplied.
55 *
56 * Non-linear:
57 * - freqwave() frequency -> vacuum wavelength
58 * - wavefreq() vacuum wavelength -> frequency
59 *
60 * - freqawav() frequency -> air wavelength
61 * - awavfreq() air wavelength -> frequency
62 *
63 * - freqvelo() frequency -> relativistic velocity
64 * - velofreq() relativistic velocity -> frequency
65 *
66 * - waveawav() vacuum wavelength -> air wavelength
67 * - awavwave() air wavelength -> vacuum wavelength
68 *
69 * - wavevelo() vacuum wavelength -> relativistic velocity
70 * - velowave() relativistic velocity -> vacuum wavelength
71 *
72 * - awavvelo() air wavelength -> relativistic velocity
73 * - veloawav() relativistic velocity -> air wavelength
74 *
75 * Linear:
76 * - freqafrq() frequency -> angular frequency
77 * - afrqfreq() angular frequency -> frequency
78 *
79 * - freqener() frequency -> energy
80 * - enerfreq() energy -> frequency
81 *
82 * - freqwavn() frequency -> wave number
83 * - wavnfreq() wave number -> frequency
84 *
85 * - freqvrad() frequency -> radio velocity
86 * - vradfreq() radio velocity -> frequency
87 *
88 * - wavevopt() vacuum wavelength -> optical velocity
89 * - voptwave() optical velocity -> vacuum wavelength
90 *
91 * - wavezopt() vacuum wavelength -> redshift
92 * - zoptwave() redshift -> vacuum wavelength
93 *
94 * - velobeta() relativistic velocity -> beta (= v/c)
95 * - betavelo() beta (= v/c) -> relativistic velocity
96 *
97 * These are the workhorse routines, to be used for fast transformations.
98 * Conversions may be done "in place" by calling the routine with the output
99 * vector set to the input.
100 *
101 * Argument checking:
102 * ------------------
103 * The input spectral values are only checked for values that would result
104 * in floating point exceptions. In particular, negative frequencies and
105 * wavelengths are allowed, as are velocities greater than the speed of
106 * light. The same is true for the spectral parameters - rest frequency and
107 * wavelength.
108 *
109 * Accuracy:
110 * ---------
111 * No warranty is given for the accuracy of these routines (refer to the
112 * copyright notice); intending users must satisfy for themselves their
113 * adequacy for the intended purpose. However, closure effectively to within
114 * double precision rounding error was demonstrated by test routine tspec.c
115 * which accompanies this software.
116 *
117 *
118 * specx() - Spectral cross conversions (scalar)
119 * ---------------------------------------------
120 * Given one spectral variable specx() computes all the others, plus the
121 * required derivatives of each with respect to the others.
122 *
123 * Given:
124 * type const char*
125 * The type of spectral variable given by spec, FREQ,
126 * AFRQ, ENER, WAVN, VRAD, WAVE, VOPT, ZOPT, AWAV, VELO,
127 * or BETA (case sensitive).
128 *
129 * spec double The spectral variable given, in SI units.
130 *
131 * restfrq,
132 * restwav double Rest frequency [Hz] or rest wavelength in vacuo [m],
133 * only one of which need be given. The other should be
134 * set to zero. If both are zero, only a subset of the
135 * spectral variables can be computed, the remainder are
136 * set to zero. Specifically, given one of FREQ, AFRQ,
137 * ENER, WAVN, WAVE, or AWAV the others can be computed
138 * without knowledge of the rest frequency. Likewise,
139 * VRAD, VOPT, ZOPT, VELO, and BETA.
140 *
141 * Given and returned:
142 * specs struct spxprm*
143 * Data structure containing all spectral variables and
144 * their derivatives, in SI units.
145 *
146 * Function return value:
147 * int Status return value:
148 * 0: Success.
149 * 1: Null spxprm pointer passed.
150 * 2: Invalid spectral parameters.
151 * 3: Invalid spectral variable.
152 *
153 * For returns > 1, a detailed error message is set in
154 * spxprm::err if enabled, see wcserr_enable().
155 *
156 * freqafrq(), afrqfreq(), freqener(), enerfreq(), freqwavn(), wavnfreq(),
157 * freqwave(), wavefreq(), freqawav(), awavfreq(), waveawav(), awavwave(),
158 * velobeta(), and betavelo() implement vector conversions between wave-like
159 * or velocity-like spectral types (i.e. conversions that do not need the rest
160 * frequency or wavelength). They all have the same API.
161 *
162 *
163 * spxperr() - Print error messages from a spxprm struct
164 * -----------------------------------------------------
165 * spxperr() prints the error message(s) (if any) stored in a spxprm struct.
166 * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v.
167 *
168 * Given:
169 * spx const struct spxprm*
170 * Spectral variables and their derivatives.
171 *
172 * prefix const char *
173 * If non-NULL, each output line will be prefixed with
174 * this string.
175 *
176 * Function return value:
177 * int Status return value:
178 * 0: Success.
179 * 1: Null spxprm pointer passed.
180 *
181 *
182 * freqafrq() - Convert frequency to angular frequency (vector)
183 * ------------------------------------------------------------
184 * freqafrq() converts frequency to angular frequency.
185 *
186 * Given:
187 * param double Ignored.
188 *
189 * nspec int Vector length.
190 *
191 * instep,
192 * outstep int Vector strides.
193 *
194 * inspec const double[]
195 * Input spectral variables, in SI units.
196 *
197 * Returned:
198 * outspec double[] Output spectral variables, in SI units.
199 *
200 * stat int[] Status return value for each vector element:
201 * 0: Success.
202 * 1: Invalid value of inspec.
203 *
204 * Function return value:
205 * int Status return value:
206 * 0: Success.
207 * 2: Invalid spectral parameters.
208 * 4: One or more of the inspec coordinates were
209 * invalid, as indicated by the stat vector.
210 *
211 *
212 * freqvelo(), velofreq(), freqvrad(), and vradfreq() implement vector
213 * conversions between frequency and velocity spectral types. They all have
214 * the same API.
215 *
216 *
217 * freqvelo() - Convert frequency to relativistic velocity (vector)
218 * ----------------------------------------------------------------
219 * freqvelo() converts frequency to relativistic velocity.
220 *
221 * Given:
222 * param double Rest frequency [Hz].
223 *
224 * nspec int Vector length.
225 *
226 * instep,
227 * outstep int Vector strides.
228 *
229 * inspec const double[]
230 * Input spectral variables, in SI units.
231 *
232 * Returned:
233 * outspec double[] Output spectral variables, in SI units.
234 *
235 * stat int[] Status return value for each vector element:
236 * 0: Success.
237 * 1: Invalid value of inspec.
238 *
239 * Function return value:
240 * int Status return value:
241 * 0: Success.
242 * 2: Invalid spectral parameters.
243 * 4: One or more of the inspec coordinates were
244 * invalid, as indicated by the stat vector.
245 *
246 *
247 * wavevelo(), velowave(), awavvelo(), veloawav(), wavevopt(), voptwave(),
248 * wavezopt(), and zoptwave() implement vector conversions between wavelength
249 * and velocity spectral types. They all have the same API.
250 *
251 *
252 * wavevelo() - Conversions between wavelength and velocity types (vector)
253 * -----------------------------------------------------------------------
254 * wavevelo() converts vacuum wavelength to relativistic velocity.
255 *
256 * Given:
257 * param double Rest wavelength in vacuo [m].
258 *
259 * nspec int Vector length.
260 *
261 * instep,
262 * outstep int Vector strides.
263 *
264 * inspec const double[]
265 * Input spectral variables, in SI units.
266 *
267 * Returned:
268 * outspec double[] Output spectral variables, in SI units.
269 *
270 * stat int[] Status return value for each vector element:
271 * 0: Success.
272 * 1: Invalid value of inspec.
273 *
274 * Function return value:
275 * int Status return value:
276 * 0: Success.
277 * 2: Invalid spectral parameters.
278 * 4: One or more of the inspec coordinates were
279 * invalid, as indicated by the stat vector.
280 *
281 *
282 * spxprm struct - Spectral variables and their derivatives
283 * --------------------------------------------------------
284 * The spxprm struct contains the value of all spectral variables and their
285 * derivatives. It is used solely by specx() which constructs it from
286 * information provided via its function arguments.
287 *
288 * This struct should be considered read-only, no members need ever be set nor
289 * should ever be modified by the user.
290 *
291 * double restfrq
292 * (Returned) Rest frequency [Hz].
293 *
294 * double restwav
295 * (Returned) Rest wavelength [m].
296 *
297 * int wavetype
298 * (Returned) True if wave types have been computed, and ...
299 *
300 * int velotype
301 * (Returned) ... true if velocity types have been computed; types are
302 * defined below.
303 *
304 * If one or other of spxprm::restfrq and spxprm::restwav is given
305 * (non-zero) then all spectral variables may be computed. If both are
306 * given, restfrq is used. If restfrq and restwav are both zero, only wave
307 * characteristic xor velocity type spectral variables may be computed
308 * depending on the variable given. These flags indicate what is
309 * available.
310 *
311 * double freq
312 * (Returned) Frequency [Hz] (wavetype).
313 *
314 * double afrq
315 * (Returned) Angular frequency [rad/s] (wavetype).
316 *
317 * double ener
318 * (Returned) Photon energy [J] (wavetype).
319 *
320 * double wavn
321 * (Returned) Wave number [/m] (wavetype).
322 *
323 * double vrad
324 * (Returned) Radio velocity [m/s] (velotype).
325 *
326 * double wave
327 * (Returned) Vacuum wavelength [m] (wavetype).
328 *
329 * double vopt
330 * (Returned) Optical velocity [m/s] (velotype).
331 *
332 * double zopt
333 * (Returned) Redshift [dimensionless] (velotype).
334 *
335 * double awav
336 * (Returned) Air wavelength [m] (wavetype).
337 *
338 * double velo
339 * (Returned) Relativistic velocity [m/s] (velotype).
340 *
341 * double beta
342 * (Returned) Relativistic beta [dimensionless] (velotype).
343 *
344 * double dfreqafrq
345 * (Returned) Derivative of frequency with respect to angular frequency
346 * [/rad] (constant, = 1 / 2*pi), and ...
347 * double dafrqfreq
348 * (Returned) ... vice versa [rad] (constant, = 2*pi, always available).
349 *
350 * double dfreqener
351 * (Returned) Derivative of frequency with respect to photon energy
352 * [/J/s] (constant, = 1/h), and ...
353 * double denerfreq
354 * (Returned) ... vice versa [Js] (constant, = h, Planck's constant,
355 * always available).
356 *
357 * double dfreqwavn
358 * (Returned) Derivative of frequency with respect to wave number [m/s]
359 * (constant, = c, the speed of light in vacuo), and ...
360 * double dwavnfreq
361 * (Returned) ... vice versa [s/m] (constant, = 1/c, always available).
362 *
363 * double dfreqvrad
364 * (Returned) Derivative of frequency with respect to radio velocity [/m],
365 * and ...
366 * double dvradfreq
367 * (Returned) ... vice versa [m] (wavetype && velotype).
368 *
369 * double dfreqwave
370 * (Returned) Derivative of frequency with respect to vacuum wavelength
371 * [/m/s], and ...
372 * double dwavefreq
373 * (Returned) ... vice versa [m s] (wavetype).
374 *
375 * double dfreqawav
376 * (Returned) Derivative of frequency with respect to air wavelength,
377 * [/m/s], and ...
378 * double dawavfreq
379 * (Returned) ... vice versa [m s] (wavetype).
380 *
381 * double dfreqvelo
382 * (Returned) Derivative of frequency with respect to relativistic
383 * velocity [/m], and ...
384 * double dvelofreq
385 * (Returned) ... vice versa [m] (wavetype && velotype).
386 *
387 * double dwavevopt
388 * (Returned) Derivative of vacuum wavelength with respect to optical
389 * velocity [s], and ...
390 * double dvoptwave
391 * (Returned) ... vice versa [/s] (wavetype && velotype).
392 *
393 * double dwavezopt
394 * (Returned) Derivative of vacuum wavelength with respect to redshift [m],
395 * and ...
396 * double dzoptwave
397 * (Returned) ... vice versa [/m] (wavetype && velotype).
398 *
399 * double dwaveawav
400 * (Returned) Derivative of vacuum wavelength with respect to air
401 * wavelength [dimensionless], and ...
402 * double dawavwave
403 * (Returned) ... vice versa [dimensionless] (wavetype).
404 *
405 * double dwavevelo
406 * (Returned) Derivative of vacuum wavelength with respect to relativistic
407 * velocity [s], and ...
408 * double dvelowave
409 * (Returned) ... vice versa [/s] (wavetype && velotype).
410 *
411 * double dawavvelo
412 * (Returned) Derivative of air wavelength with respect to relativistic
413 * velocity [s], and ...
414 * double dveloawav
415 * (Returned) ... vice versa [/s] (wavetype && velotype).
416 *
417 * double dvelobeta
418 * (Returned) Derivative of relativistic velocity with respect to
419 * relativistic beta [m/s] (constant, = c, the speed of light in vacuo),
420 * and ...
421 * double dbetavelo
422 * (Returned) ... vice versa [s/m] (constant, = 1/c, always available).
423 *
424 * struct wcserr *err
425 * (Returned) If enabled, when an error status is returned, this struct
426 * contains detailed information about the error, see wcserr_enable().
427 *
428 * void *padding
429 * (An unused variable inserted for alignment purposes only.)
430 *
431 * Global variable: const char *spx_errmsg[] - Status return messages
432 * ------------------------------------------------------------------
433 * Error messages to match the status value returned from each function.
434 *
435 *===========================================================================*/
436 
437 #ifndef WCSLIB_SPEC
438 #define WCSLIB_SPEC
439 
440 #ifdef __cplusplus
441 extern "C" {
442 #endif
443 
444 extern const char *spx_errmsg[];
445 
447  SPXERR_SUCCESS = 0, /* Success. */
448  SPXERR_NULL_POINTER = 1, /* Null spxprm pointer passed. */
449  SPXERR_BAD_SPEC_PARAMS = 2, /* Invalid spectral parameters. */
450  SPXERR_BAD_SPEC_VAR = 3, /* Invalid spectral variable. */
451  SPXERR_BAD_INSPEC_COORD = 4 /* One or more of the inspec coordinates were
452  invalid. */
453 };
454 
455 struct spxprm {
456  double restfrq, restwav; /* Rest frequency [Hz] and wavelength [m]. */
457 
458  int wavetype, velotype; /* True if wave/velocity types have been */
459  /* computed; types are defined below. */
460 
461  /* Spectral variables computed by specx(). */
462  /*------------------------------------------------------------------------*/
463  double freq, /* wavetype: Frequency [Hz]. */
464  afrq, /* wavetype: Angular frequency [rad/s]. */
465  ener, /* wavetype: Photon energy [J]. */
466  wavn, /* wavetype: Wave number [/m]. */
467  vrad, /* velotype: Radio velocity [m/s]. */
468  wave, /* wavetype: Vacuum wavelength [m]. */
469  vopt, /* velotype: Optical velocity [m/s]. */
470  zopt, /* velotype: Redshift. */
471  awav, /* wavetype: Air wavelength [m]. */
472  velo, /* velotype: Relativistic velocity [m/s]. */
473  beta; /* velotype: Relativistic beta. */
474 
475  /* Derivatives of spectral variables computed by specx(). */
476  /*------------------------------------------------------------------------*/
477  double dfreqafrq, dafrqfreq, /* Constant, always available. */
478  dfreqener, denerfreq, /* Constant, always available. */
479  dfreqwavn, dwavnfreq, /* Constant, always available. */
480  dfreqvrad, dvradfreq, /* wavetype && velotype. */
481  dfreqwave, dwavefreq, /* wavetype. */
482  dfreqawav, dawavfreq, /* wavetype. */
483  dfreqvelo, dvelofreq, /* wavetype && velotype. */
484  dwavevopt, dvoptwave, /* wavetype && velotype. */
485  dwavezopt, dzoptwave, /* wavetype && velotype. */
486  dwaveawav, dawavwave, /* wavetype. */
487  dwavevelo, dvelowave, /* wavetype && velotype. */
488  dawavvelo, dveloawav, /* wavetype && velotype. */
489  dvelobeta, dbetavelo; /* Constant, always available. */
490 
491  /* Error handling */
492  /*------------------------------------------------------------------------*/
493  struct wcserr *err;
494 
495  /* Private */
496  /*------------------------------------------------------------------------*/
497  void *padding; /* (Dummy inserted for alignment purposes.) */
498 };
499 
500 /* Size of the spxprm struct in int units, used by the Fortran wrappers. */
501 #define SPXLEN (sizeof(struct spxprm)/sizeof(int))
502 
503 
504 int specx(const char *type, double spec, double restfrq, double restwav,
505  struct spxprm *specs);
506 
507 int spxperr(const struct spxprm *spx, const char *prefix);
508 
509 /* For use in declaring function prototypes, e.g. in spcprm. */
510 #define SPX_ARGS double param, int nspec, int instep, int outstep, \
511  const double inspec[], double outspec[], int stat[]
512 
513 int freqafrq(SPX_ARGS);
514 int afrqfreq(SPX_ARGS);
515 
516 int freqener(SPX_ARGS);
517 int enerfreq(SPX_ARGS);
518 
519 int freqwavn(SPX_ARGS);
520 int wavnfreq(SPX_ARGS);
521 
522 int freqwave(SPX_ARGS);
523 int wavefreq(SPX_ARGS);
524 
525 int freqawav(SPX_ARGS);
526 int awavfreq(SPX_ARGS);
527 
528 int waveawav(SPX_ARGS);
529 int awavwave(SPX_ARGS);
530 
531 int velobeta(SPX_ARGS);
532 int betavelo(SPX_ARGS);
533 
534 
535 int freqvelo(SPX_ARGS);
536 int velofreq(SPX_ARGS);
537 
538 int freqvrad(SPX_ARGS);
539 int vradfreq(SPX_ARGS);
540 
541 
542 int wavevelo(SPX_ARGS);
543 int velowave(SPX_ARGS);
544 
545 int awavvelo(SPX_ARGS);
546 int veloawav(SPX_ARGS);
547 
548 int wavevopt(SPX_ARGS);
549 int voptwave(SPX_ARGS);
550 
551 int wavezopt(SPX_ARGS);
552 int zoptwave(SPX_ARGS);
553 
554 
555 #ifdef __cplusplus
556 }
557 #endif
558 
559 #endif /* WCSLIB_SPEC */
int wavnfreq(SPX_ARGS)
Convert wave number to frequency (vector).
double dawavwave
Definition: spx.h:477
double dwaveawav
Definition: spx.h:477
double dvelowave
Definition: spx.h:477
int waveawav(SPX_ARGS)
Convert vacuum wavelength to air wavelength (vector).
double dvelobeta
Definition: spx.h:477
double wave
Definition: spx.h:463
int freqawav(SPX_ARGS)
Convert frequency to air wavelength (vector).
Error message handling.
Definition: wcserr.h:225
double dzoptwave
Definition: spx.h:477
#define SPX_ARGS
For use in declaring spectral conversion function prototypes.
Definition: spx.h:510
double velo
Definition: spx.h:463
int wavevopt(SPX_ARGS)
Convert vacuum wavelength to optical velocity (vector).
double beta
Definition: spx.h:463
double dwavnfreq
Definition: spx.h:477
int enerfreq(SPX_ARGS)
Convert photon energy to frequency (vector).
double dfreqener
Definition: spx.h:477
int voptwave(SPX_ARGS)
Convert optical velocity to vacuum wavelength (vector).
double dfreqvelo
Definition: spx.h:477
Definition: spx.h:448
int awavvelo(SPX_ARGS)
Convert air wavelength to relativistic velocity (vector).
int afrqfreq(SPX_ARGS)
Convert angular frequency to frequency (vector).
double dvelofreq
Definition: spx.h:477
double dafrqfreq
Definition: spx.h:477
double dwavevopt
Definition: spx.h:477
double dvoptwave
Definition: spx.h:477
int freqener(SPX_ARGS)
Convert frequency to photon energy (vector).
double dbetavelo
Definition: spx.h:477
Definition: spx.h:447
int veloawav(SPX_ARGS)
Convert relativistic velocity to air wavelength (vector).
double dveloawav
Definition: spx.h:477
int wavefreq(SPX_ARGS)
Convert vacuum wavelength to frequency (vector).
int velobeta(SPX_ARGS)
Convert relativistic velocity to relativistic beta (vector).
double dfreqwave
Definition: spx.h:477
double dvradfreq
Definition: spx.h:477
int specx(const char *type, double spec, double restfrq, double restwav, struct spxprm *specs)
Spectral cross conversions (scalar).
int wavetype
Definition: spx.h:458
double dwavevelo
Definition: spx.h:477
struct wcserr * err
Definition: spx.h:493
int vradfreq(SPX_ARGS)
Convert radio velocity to frequency (vector).
double awav
Definition: spx.h:463
int spxperr(const struct spxprm *spx, const char *prefix)
Print error messages from a spxprm struct.
double dfreqvrad
Definition: spx.h:477
double ener
Definition: spx.h:463
double wavn
Definition: spx.h:463
double dawavfreq
Definition: spx.h:477
int betavelo(SPX_ARGS)
Convert relativistic beta to relativistic velocity (vector).
double dwavefreq
Definition: spx.h:477
double dawavvelo
Definition: spx.h:477
double vrad
Definition: spx.h:463
spx_errmsg
Definition: spx.h:446
double denerfreq
Definition: spx.h:477
Definition: spx.h:450
int zoptwave(SPX_ARGS)
Convert redshift to vacuum wavelength (vector).
double afrq
Definition: spx.h:463
Spectral variables and their derivatives.
Definition: spx.h:455
int awavwave(SPX_ARGS)
Convert air wavelength to vacuum wavelength (vector).
int velowave(SPX_ARGS)
Convert relativistic velocity to vacuum wavelength (vector).
int freqvrad(SPX_ARGS)
Convert frequency to radio velocity (vector).
double zopt
Definition: spx.h:463
void * padding
Definition: spx.h:497
int velotype
Definition: spx.h:458
int freqvelo(SPX_ARGS)
Convert frequency to relativistic velocity (vector).
double vopt
Definition: spx.h:463
int freqwavn(SPX_ARGS)
Convert frequency to wave number (vector).
double restwav
Definition: spx.h:456
int wavevelo(SPX_ARGS)
Conversions between wavelength and velocity types (vector).
double dfreqawav
Definition: spx.h:477
double restfrq
Definition: spx.h:456
int freqafrq(SPX_ARGS)
Convert frequency to angular frequency (vector).
double dwavezopt
Definition: spx.h:477
Definition: spx.h:449
int velofreq(SPX_ARGS)
Convert relativistic velocity to frequency (vector).
int awavfreq(SPX_ARGS)
Convert air wavelength to frequency (vector).
double dfreqwavn
Definition: spx.h:477
double dfreqafrq
Definition: spx.h:477
int freqwave(SPX_ARGS)
Convert frequency to vacuum wavelength (vector).
double freq
Definition: spx.h:463
int wavezopt(SPX_ARGS)
Convert vacuum wavelength to redshift (vector).
Definition: spx.h:451