WCSLIB: spx.h Source File

WCSLIB 5.19.1

spx.h
Go to the documentation of this file.
1 /*============================================================================
2
3 WCSLIB 5.19 - 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.19.1.1 2018/07/26 15:41:40 mcalabre Exp mcalabre $
26 *=============================================================================
27 *
28 * WCSLIB 5.19 - 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 * Air-to-vacuum wavelength conversion:
102 * ------------------------------------
103 * The air-to-vacuum wavelength conversion in early drafts of WCS Paper III
104 * cites Cox (ed., 2000, Allen’s Astrophysical Quantities, AIP Press,
105 * Springer-Verlag, New York), which itself derives from Edlén (1953, Journal
106 * of the Optical Society of America, 43, 339). This is the IAU standard,
107 * adopted in 1957 and again in 1991. No more recent IAU resolution replaces
108 * this relation, and it is the one used by WCSLIB.
109 *
110 * However, the Cox relation was replaced in later drafts of Paper III, and as
111 * eventually published, by the IUGG relation (1999, International Union of
112 * Geodesy and Geophysics, comptes rendus of the 22nd General Assembly,
113 * Birmingham UK, p111). There is a nearly constant ratio between the two,
114 * with IUGG/Cox = 1.000015 over most of the range between 200nm and 10,000nm.
115 *
116 * The IUGG relation itself is derived from the work of Ciddor (1996, Applied
117 * Optics, 35, 1566), which is used directly by the Sloan Digital Sky Survey.
118 * It agrees closely with Cox; longwards of 2500nm, the ratio Ciddor/Cox is
119 * fixed at 1.000000021, decreasing only slightly, to 1.000000018, at 1000nm.
120 *
121 * The Cox, IUGG, and Ciddor relations all accurately provide the wavelength
122 * dependence of the air-to-vacuum wavelength conversion. However, for full
123 * accuracy, the atmospheric temperature, pressure, and partial pressure of
124 * water vapour must be taken into account. These will determine a small,
125 * wavelength-independent scale factor and offset, which is not considered by
126 * WCS Paper III.
127 *
128 * WCS Paper III is also silent on the question of the range of validity of the
129 * air-to-vacuum wavelength conversion. Cox's relation would appear to be
130 * valid in the range 200nm to 10,000nm. Both the Cox and the Ciddor relations
131 * have singularities below 200nm, with Cox's at 156nm and 83nm. WCSLIB checks
132 * neither the range of validity, nor for these singularities.
133 *
134 * Argument checking:
135 * ------------------
136 * The input spectral values are only checked for values that would result
137 * in floating point exceptions. In particular, negative frequencies and
138 * wavelengths are allowed, as are velocities greater than the speed of
139 * light. The same is true for the spectral parameters - rest frequency and
140 * wavelength.
141 *
142 * Accuracy:
143 * ---------
144 * No warranty is given for the accuracy of these routines (refer to the
145 * copyright notice); intending users must satisfy for themselves their
146 * adequacy for the intended purpose. However, closure effectively to within
147 * double precision rounding error was demonstrated by test routine tspec.c
148 * which accompanies this software.
149 *
150 *
151 * specx() - Spectral cross conversions (scalar)
152 * ---------------------------------------------
153 * Given one spectral variable specx() computes all the others, plus the
154 * required derivatives of each with respect to the others.
155 *
156 * Given:
157 * type const char*
158 * The type of spectral variable given by spec, FREQ,
159 * AFRQ, ENER, WAVN, VRAD, WAVE, VOPT, ZOPT, AWAV, VELO,
160 * or BETA (case sensitive).
161 *
162 * spec double The spectral variable given, in SI units.
163 *
164 * restfrq,
165 * restwav double Rest frequency [Hz] or rest wavelength in vacuo [m],
166 * only one of which need be given. The other should be
167 * set to zero. If both are zero, only a subset of the
168 * spectral variables can be computed, the remainder are
169 * set to zero. Specifically, given one of FREQ, AFRQ,
170 * ENER, WAVN, WAVE, or AWAV the others can be computed
171 * without knowledge of the rest frequency. Likewise,
172 * VRAD, VOPT, ZOPT, VELO, and BETA.
173 *
174 * Given and returned:
175 * specs struct spxprm*
176 * Data structure containing all spectral variables and
177 * their derivatives, in SI units.
178 *
179 * Function return value:
180 * int Status return value:
181 * 0: Success.
182 * 1: Null spxprm pointer passed.
183 * 2: Invalid spectral parameters.
184 * 3: Invalid spectral variable.
185 *
186 * For returns > 1, a detailed error message is set in
187 * spxprm::err if enabled, see wcserr_enable().
188 *
189 * freqafrq(), afrqfreq(), freqener(), enerfreq(), freqwavn(), wavnfreq(),
190 * freqwave(), wavefreq(), freqawav(), awavfreq(), waveawav(), awavwave(),
191 * velobeta(), and betavelo() implement vector conversions between wave-like
192 * or velocity-like spectral types (i.e. conversions that do not need the rest
193 * frequency or wavelength). They all have the same API.
194 *
195 *
196 * spxperr() - Print error messages from a spxprm struct
197 * -----------------------------------------------------
198 * spxperr() prints the error message(s) (if any) stored in a spxprm struct.
199 * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v.
200 *
201 * Given:
202 * spx const struct spxprm*
203 * Spectral variables and their derivatives.
204 *
205 * prefix const char *
206 * If non-NULL, each output line will be prefixed with
207 * this string.
208 *
209 * Function return value:
210 * int Status return value:
211 * 0: Success.
212 * 1: Null spxprm pointer passed.
213 *
214 *
215 * freqafrq() - Convert frequency to angular frequency (vector)
216 * ------------------------------------------------------------
217 * freqafrq() converts frequency to angular frequency.
218 *
219 * Given:
220 * param double Ignored.
221 *
222 * nspec int Vector length.
223 *
224 * instep,
225 * outstep int Vector strides.
226 *
227 * inspec const double[]
228 * Input spectral variables, in SI units.
229 *
230 * Returned:
231 * outspec double[] Output spectral variables, in SI units.
232 *
233 * stat int[] Status return value for each vector element:
234 * 0: Success.
235 * 1: Invalid value of inspec.
236 *
237 * Function return value:
238 * int Status return value:
239 * 0: Success.
240 * 2: Invalid spectral parameters.
241 * 4: One or more of the inspec coordinates were
242 * invalid, as indicated by the stat vector.
243 *
244 *
245 * freqvelo(), velofreq(), freqvrad(), and vradfreq() implement vector
246 * conversions between frequency and velocity spectral types. They all have
247 * the same API.
248 *
249 *
250 * freqvelo() - Convert frequency to relativistic velocity (vector)
251 * ----------------------------------------------------------------
252 * freqvelo() converts frequency to relativistic velocity.
253 *
254 * Given:
255 * param double Rest frequency [Hz].
256 *
257 * nspec int Vector length.
258 *
259 * instep,
260 * outstep int Vector strides.
261 *
262 * inspec const double[]
263 * Input spectral variables, in SI units.
264 *
265 * Returned:
266 * outspec double[] Output spectral variables, in SI units.
267 *
268 * stat int[] Status return value for each vector element:
269 * 0: Success.
270 * 1: Invalid value of inspec.
271 *
272 * Function return value:
273 * int Status return value:
274 * 0: Success.
275 * 2: Invalid spectral parameters.
276 * 4: One or more of the inspec coordinates were
277 * invalid, as indicated by the stat vector.
278 *
279 *
280 * wavevelo(), velowave(), awavvelo(), veloawav(), wavevopt(), voptwave(),
281 * wavezopt(), and zoptwave() implement vector conversions between wavelength
282 * and velocity spectral types. They all have the same API.
283 *
284 *
285 * wavevelo() - Conversions between wavelength and velocity types (vector)
286 * -----------------------------------------------------------------------
287 * wavevelo() converts vacuum wavelength to relativistic velocity.
288 *
289 * Given:
290 * param double Rest wavelength in vacuo [m].
291 *
292 * nspec int Vector length.
293 *
294 * instep,
295 * outstep int Vector strides.
296 *
297 * inspec const double[]
298 * Input spectral variables, in SI units.
299 *
300 * Returned:
301 * outspec double[] Output spectral variables, in SI units.
302 *
303 * stat int[] Status return value for each vector element:
304 * 0: Success.
305 * 1: Invalid value of inspec.
306 *
307 * Function return value:
308 * int Status return value:
309 * 0: Success.
310 * 2: Invalid spectral parameters.
311 * 4: One or more of the inspec coordinates were
312 * invalid, as indicated by the stat vector.
313 *
314 *
315 * spxprm struct - Spectral variables and their derivatives
316 * --------------------------------------------------------
317 * The spxprm struct contains the value of all spectral variables and their
318 * derivatives. It is used solely by specx() which constructs it from
319 * information provided via its function arguments.
320 *
321 * This struct should be considered read-only, no members need ever be set nor
322 * should ever be modified by the user.
323 *
324 * double restfrq
325 * (Returned) Rest frequency [Hz].
326 *
327 * double restwav
328 * (Returned) Rest wavelength [m].
329 *
330 * int wavetype
331 * (Returned) True if wave types have been computed, and ...
332 *
333 * int velotype
334 * (Returned) ... true if velocity types have been computed; types are
335 * defined below.
336 *
337 * If one or other of spxprm::restfrq and spxprm::restwav is given
338 * (non-zero) then all spectral variables may be computed. If both are
339 * given, restfrq is used. If restfrq and restwav are both zero, only wave
340 * characteristic xor velocity type spectral variables may be computed
341 * depending on the variable given. These flags indicate what is
342 * available.
343 *
344 * double freq
345 * (Returned) Frequency [Hz] (wavetype).
346 *
347 * double afrq
348 * (Returned) Angular frequency [rad/s] (wavetype).
349 *
350 * double ener
351 * (Returned) Photon energy [J] (wavetype).
352 *
353 * double wavn
354 * (Returned) Wave number [/m] (wavetype).
355 *
356 * double vrad
357 * (Returned) Radio velocity [m/s] (velotype).
358 *
359 * double wave
360 * (Returned) Vacuum wavelength [m] (wavetype).
361 *
362 * double vopt
363 * (Returned) Optical velocity [m/s] (velotype).
364 *
365 * double zopt
366 * (Returned) Redshift [dimensionless] (velotype).
367 *
368 * double awav
369 * (Returned) Air wavelength [m] (wavetype).
370 *
371 * double velo
372 * (Returned) Relativistic velocity [m/s] (velotype).
373 *
374 * double beta
375 * (Returned) Relativistic beta [dimensionless] (velotype).
376 *
377 * double dfreqafrq
378 * (Returned) Derivative of frequency with respect to angular frequency
379 * [/rad] (constant, = 1 / 2*pi), and ...
380 * double dafrqfreq
381 * (Returned) ... vice versa [rad] (constant, = 2*pi, always available).
382 *
383 * double dfreqener
384 * (Returned) Derivative of frequency with respect to photon energy
385 * [/J/s] (constant, = 1/h), and ...
386 * double denerfreq
387 * (Returned) ... vice versa [Js] (constant, = h, Planck's constant,
388 * always available).
389 *
390 * double dfreqwavn
391 * (Returned) Derivative of frequency with respect to wave number [m/s]
392 * (constant, = c, the speed of light in vacuo), and ...
393 * double dwavnfreq
394 * (Returned) ... vice versa [s/m] (constant, = 1/c, always available).
395 *
396 * double dfreqvrad
397 * (Returned) Derivative of frequency with respect to radio velocity [/m],
398 * and ...
399 * double dvradfreq
400 * (Returned) ... vice versa [m] (wavetype && velotype).
401 *
402 * double dfreqwave
403 * (Returned) Derivative of frequency with respect to vacuum wavelength
404 * [/m/s], and ...
405 * double dwavefreq
406 * (Returned) ... vice versa [m s] (wavetype).
407 *
408 * double dfreqawav
409 * (Returned) Derivative of frequency with respect to air wavelength,
410 * [/m/s], and ...
411 * double dawavfreq
412 * (Returned) ... vice versa [m s] (wavetype).
413 *
414 * double dfreqvelo
415 * (Returned) Derivative of frequency with respect to relativistic
416 * velocity [/m], and ...
417 * double dvelofreq
418 * (Returned) ... vice versa [m] (wavetype && velotype).
419 *
420 * double dwavevopt
421 * (Returned) Derivative of vacuum wavelength with respect to optical
422 * velocity [s], and ...
423 * double dvoptwave
424 * (Returned) ... vice versa [/s] (wavetype && velotype).
425 *
426 * double dwavezopt
427 * (Returned) Derivative of vacuum wavelength with respect to redshift [m],
428 * and ...
429 * double dzoptwave
430 * (Returned) ... vice versa [/m] (wavetype && velotype).
431 *
432 * double dwaveawav
433 * (Returned) Derivative of vacuum wavelength with respect to air
434 * wavelength [dimensionless], and ...
435 * double dawavwave
436 * (Returned) ... vice versa [dimensionless] (wavetype).
437 *
438 * double dwavevelo
439 * (Returned) Derivative of vacuum wavelength with respect to relativistic
440 * velocity [s], and ...
441 * double dvelowave
442 * (Returned) ... vice versa [/s] (wavetype && velotype).
443 *
444 * double dawavvelo
445 * (Returned) Derivative of air wavelength with respect to relativistic
446 * velocity [s], and ...
447 * double dveloawav
448 * (Returned) ... vice versa [/s] (wavetype && velotype).
449 *
450 * double dvelobeta
451 * (Returned) Derivative of relativistic velocity with respect to
452 * relativistic beta [m/s] (constant, = c, the speed of light in vacuo),
453 * and ...
454 * double dbetavelo
455 * (Returned) ... vice versa [s/m] (constant, = 1/c, always available).
456 *
457 * struct wcserr *err
458 * (Returned) If enabled, when an error status is returned, this struct
459 * contains detailed information about the error, see wcserr_enable().
460 *
461 * void *padding
462 * (An unused variable inserted for alignment purposes only.)
463 *
464 * Global variable: const char *spx_errmsg[] - Status return messages
465 * ------------------------------------------------------------------
466 * Error messages to match the status value returned from each function.
467 *
468 *===========================================================================*/
469
470 #ifndef WCSLIB_SPEC
471 #define WCSLIB_SPEC
472
473 #ifdef __cplusplus
474 extern "C" {
475 #endif
476
477 extern const char *spx_errmsg[];
478
479 enum spx_errmsg {
480 SPXERR_SUCCESS = 0, /* Success. */
481 SPXERR_NULL_POINTER = 1, /* Null spxprm pointer passed. */
482 SPXERR_BAD_SPEC_PARAMS = 2, /* Invalid spectral parameters. */
483 SPXERR_BAD_SPEC_VAR = 3, /* Invalid spectral variable. */
484 SPXERR_BAD_INSPEC_COORD = 4 /* One or more of the inspec coordinates were
485 invalid. */
486 };
487
488 struct spxprm {
489 double restfrq, restwav; /* Rest frequency [Hz] and wavelength [m]. */
490
491 int wavetype, velotype; /* True if wave/velocity types have been */
492 /* computed; types are defined below. */
493
494 /* Spectral variables computed by specx(). */
495 /*------------------------------------------------------------------------*/
496 double freq, /* wavetype: Frequency [Hz]. */
497 afrq, /* wavetype: Angular frequency [rad/s]. */
498 ener, /* wavetype: Photon energy [J]. */
499 wavn, /* wavetype: Wave number [/m]. */
500 vrad, /* velotype: Radio velocity [m/s]. */
501 wave, /* wavetype: Vacuum wavelength [m]. */
502 vopt, /* velotype: Optical velocity [m/s]. */
503 zopt, /* velotype: Redshift. */
504 awav, /* wavetype: Air wavelength [m]. */
505 velo, /* velotype: Relativistic velocity [m/s]. */
506 beta; /* velotype: Relativistic beta. */
507
508 /* Derivatives of spectral variables computed by specx(). */
509 /*------------------------------------------------------------------------*/
510 double dfreqafrq, dafrqfreq, /* Constant, always available. */
511 dfreqener, denerfreq, /* Constant, always available. */
512 dfreqwavn, dwavnfreq, /* Constant, always available. */
513 dfreqvrad, dvradfreq, /* wavetype && velotype. */
514 dfreqwave, dwavefreq, /* wavetype. */
515 dfreqawav, dawavfreq, /* wavetype. */
516 dfreqvelo, dvelofreq, /* wavetype && velotype. */
517 dwavevopt, dvoptwave, /* wavetype && velotype. */
518 dwavezopt, dzoptwave, /* wavetype && velotype. */
519 dwaveawav, dawavwave, /* wavetype. */
520 dwavevelo, dvelowave, /* wavetype && velotype. */
521 dawavvelo, dveloawav, /* wavetype && velotype. */
522 dvelobeta, dbetavelo; /* Constant, always available. */
523
524 /* Error handling */
525 /*------------------------------------------------------------------------*/
526 struct wcserr *err;
527
528 /* Private */
529 /*------------------------------------------------------------------------*/
530 void *padding; /* (Dummy inserted for alignment purposes.) */
531 };
532
533 /* Size of the spxprm struct in int units, used by the Fortran wrappers. */
534 #define SPXLEN (sizeof(struct spxprm)/sizeof(int))
535
536
537 int specx(const char *type, double spec, double restfrq, double restwav,
538 struct spxprm *specs);
539
540 int spxperr(const struct spxprm *spx, const char *prefix);
541
542 /* For use in declaring function prototypes, e.g. in spcprm. */
543 #define SPX_ARGS double param, int nspec, int instep, int outstep, \
544 const double inspec[], double outspec[], int stat[]
545
546 int freqafrq(SPX_ARGS);
547 int afrqfreq(SPX_ARGS);
548
549 int freqener(SPX_ARGS);
550 int enerfreq(SPX_ARGS);
551
552 int freqwavn(SPX_ARGS);
553 int wavnfreq(SPX_ARGS);
554
555 int freqwave(SPX_ARGS);
556 int wavefreq(SPX_ARGS);
557
558 int freqawav(SPX_ARGS);
559 int awavfreq(SPX_ARGS);
560
561 int waveawav(SPX_ARGS);
562 int awavwave(SPX_ARGS);
563
564 int velobeta(SPX_ARGS);
565 int betavelo(SPX_ARGS);
566
567
568 int freqvelo(SPX_ARGS);
569 int velofreq(SPX_ARGS);
570
571 int freqvrad(SPX_ARGS);
572 int vradfreq(SPX_ARGS);
573
574
575 int wavevelo(SPX_ARGS);
576 int velowave(SPX_ARGS);
577
578 int awavvelo(SPX_ARGS);
579 int veloawav(SPX_ARGS);
580
581 int wavevopt(SPX_ARGS);
582 int voptwave(SPX_ARGS);
583
584 int wavezopt(SPX_ARGS);
585 int zoptwave(SPX_ARGS);
586
587
588 #ifdef __cplusplus
589 }
590 #endif
591
592 #endif /* WCSLIB_SPEC */
wavnfreq
int wavnfreq(SPX_ARGS)
Convert wave number to frequency (vector).
spxprm::dawavwave
double dawavwave
Definition: spx.h:510
spxprm::dwaveawav
double dwaveawav
Definition: spx.h:510
spxprm::dvelowave
double dvelowave
Definition: spx.h:510
waveawav
int waveawav(SPX_ARGS)
Convert vacuum wavelength to air wavelength (vector).
spxprm::dvelobeta
double dvelobeta
Definition: spx.h:510
spxprm::wave
double wave
Definition: spx.h:496
freqawav
int freqawav(SPX_ARGS)
Convert frequency to air wavelength (vector).
wcserr
Error message handling.
Definition: wcserr.h:225
spxprm::dzoptwave
double dzoptwave
Definition: spx.h:510
SPX_ARGS
#define SPX_ARGS
For use in declaring spectral conversion function prototypes.
Definition: spx.h:543
spxprm::velo
double velo
Definition: spx.h:496
wavevopt
int wavevopt(SPX_ARGS)
Convert vacuum wavelength to optical velocity (vector).
spxprm::beta
double beta
Definition: spx.h:496
spxprm::dwavnfreq
double dwavnfreq
Definition: spx.h:510
enerfreq
int enerfreq(SPX_ARGS)
Convert photon energy to frequency (vector).
spxprm::dfreqener
double dfreqener
Definition: spx.h:510
voptwave
int voptwave(SPX_ARGS)
Convert optical velocity to vacuum wavelength (vector).
spxprm::dfreqvelo
double dfreqvelo
Definition: spx.h:510
SPXERR_NULL_POINTER
Definition: spx.h:481
awavvelo
int awavvelo(SPX_ARGS)
Convert air wavelength to relativistic velocity (vector).
afrqfreq
int afrqfreq(SPX_ARGS)
Convert angular frequency to frequency (vector).
spxprm::dvelofreq
double dvelofreq
Definition: spx.h:510
spxprm::dafrqfreq
double dafrqfreq
Definition: spx.h:510
spxprm::dwavevopt
double dwavevopt
Definition: spx.h:510
spxprm::dvoptwave
double dvoptwave
Definition: spx.h:510
freqener
int freqener(SPX_ARGS)
Convert frequency to photon energy (vector).
spxprm::dbetavelo
double dbetavelo
Definition: spx.h:510
SPXERR_SUCCESS
Definition: spx.h:480
veloawav
int veloawav(SPX_ARGS)
Convert relativistic velocity to air wavelength (vector).
spxprm::dveloawav
double dveloawav
Definition: spx.h:510
wavefreq
int wavefreq(SPX_ARGS)
Convert vacuum wavelength to frequency (vector).
velobeta
int velobeta(SPX_ARGS)
Convert relativistic velocity to relativistic beta (vector).
spxprm::dfreqwave
double dfreqwave
Definition: spx.h:510
spxprm::dvradfreq
double dvradfreq
Definition: spx.h:510
specx
int specx(const char *type, double spec, double restfrq, double restwav, struct spxprm *specs)
Spectral cross conversions (scalar).
spxprm::wavetype
int wavetype
Definition: spx.h:491
spxprm::dwavevelo
double dwavevelo
Definition: spx.h:510
spxprm::err
struct wcserr * err
Definition: spx.h:526
vradfreq
int vradfreq(SPX_ARGS)
Convert radio velocity to frequency (vector).
spxprm::awav
double awav
Definition: spx.h:496
spxperr
int spxperr(const struct spxprm *spx, const char *prefix)
Print error messages from a spxprm struct.
spxprm::dfreqvrad
double dfreqvrad
Definition: spx.h:510
spxprm::ener
double ener
Definition: spx.h:496
spxprm::wavn
double wavn
Definition: spx.h:496
spxprm::dawavfreq
double dawavfreq
Definition: spx.h:510
betavelo
int betavelo(SPX_ARGS)
Convert relativistic beta to relativistic velocity (vector).
spxprm::dwavefreq
double dwavefreq
Definition: spx.h:510
spxprm::dawavvelo
double dawavvelo
Definition: spx.h:510
spxprm::vrad
double vrad
Definition: spx.h:496
spx_errmsg
spx_errmsg
Definition: spx.h:479
spxprm::denerfreq
double denerfreq
Definition: spx.h:510
SPXERR_BAD_SPEC_VAR
Definition: spx.h:483
zoptwave
int zoptwave(SPX_ARGS)
Convert redshift to vacuum wavelength (vector).
spxprm::afrq
double afrq
Definition: spx.h:496
spxprm
Spectral variables and their derivatives.
Definition: spx.h:488
awavwave
int awavwave(SPX_ARGS)
Convert air wavelength to vacuum wavelength (vector).
velowave
int velowave(SPX_ARGS)
Convert relativistic velocity to vacuum wavelength (vector).
freqvrad
int freqvrad(SPX_ARGS)
Convert frequency to radio velocity (vector).
spxprm::zopt
double zopt
Definition: spx.h:496
spxprm::padding
void * padding
Definition: spx.h:530
spxprm::velotype
int velotype
Definition: spx.h:491
freqvelo
int freqvelo(SPX_ARGS)
Convert frequency to relativistic velocity (vector).
spxprm::vopt
double vopt
Definition: spx.h:496
freqwavn
int freqwavn(SPX_ARGS)
Convert frequency to wave number (vector).
spxprm::restwav
double restwav
Definition: spx.h:489
wavevelo
int wavevelo(SPX_ARGS)
Conversions between wavelength and velocity types (vector).
spxprm::dfreqawav
double dfreqawav
Definition: spx.h:510
spxprm::restfrq
double restfrq
Definition: spx.h:489
freqafrq
int freqafrq(SPX_ARGS)
Convert frequency to angular frequency (vector).
spxprm::dwavezopt
double dwavezopt
Definition: spx.h:510
SPXERR_BAD_SPEC_PARAMS
Definition: spx.h:482
velofreq
int velofreq(SPX_ARGS)
Convert relativistic velocity to frequency (vector).
awavfreq
int awavfreq(SPX_ARGS)
Convert air wavelength to frequency (vector).
spxprm::dfreqwavn
double dfreqwavn
Definition: spx.h:510
spxprm::dfreqafrq
double dfreqafrq
Definition: spx.h:510
freqwave
int freqwave(SPX_ARGS)
Convert frequency to vacuum wavelength (vector).
spxprm::freq
double freq
Definition: spx.h:496
wavezopt
int wavezopt(SPX_ARGS)
Convert vacuum wavelength to redshift (vector).
SPXERR_BAD_INSPEC_COORD
Definition: spx.h:484