Enumerations | |
enum | { LEFFTEST = 0, LEFFFIX = 1 } |
Functions | |
double | getzshift (double foclen_feed, double foclen_conj) |
Compute altitude shift in generalized mode from parameters of optics. More... | |
void | progress (int stage) |
Sample progress indicator for console. More... | |
int | zgrid_set (double **zgrid, double z0, double zmax, double dz, double dzmin) |
Generate the grid of values given its generation parameters. More... | |
void | make_fft (double *lambda, double *edist, int nedist) |
Compute the FT of SED in units of [1/cm]. More... | |
double | sfunc (double) |
Compute the imaginary part of the Fourier transform of the light SED. More... | |
double | sdum (double f) |
Test-case of S-function: analytical for "quasi-gaussian" SED. More... | |
double | flama (double x) |
Compute the under-integral expression for the weight integration. More... | |
double | weight (double z, double d, double eps1, double eps2, double eps3, double eps4) |
Compute the weight of a given z in a scintillation index. More... | |
void | getspechar (double *lambda, double *edist, int nedist, double *leff, double *lblue, double *lred) |
Compute some characteristic points on the spectrum. More... | |
Variables | |
const double | MAX_DIAM = 1000 |
const int | MAXNZ = 10000 |
const double | WSCALE = 1E11 |
const int | WVALEN = 15 |
const double | Z0 = 0 |
const double | ZMAX = 30 |
const double | DZ = 0.2 |
const double | DZMIN = 0.04 |
const double | EPSD = 2E-2 |
const double | EPSLEFF = 0.003 |
const double | EPSDZ = 1.5 |
const int | LTEXT = 80 |
const char | FDELIM [] = " \t\n\r" |
const double | DER0 = 0.0 |
const double | DERNAT = 1.0E31 |
const double | MKM2CM = 1E-4 |
double | diameter |
double | epsilon1 |
double | epsilon2 |
double | epsilon3 |
double | epsilon4 |
double | lambda0 |
double * | edist_ft |
double * | edist_freq |
double * | re_edist_ft |
double * | im_edist_ft |
double * | re_edist_ftspln |
double * | im_edist_ftspln |
int | edist_ftnn |
double | altitude |
< these three functions are taken from Numerical Recipes
|
Flag for calcleff() to fix the computed spectral characteristics after comparison |
|
Compute the under-integral expression for the weight integration.
In polychromatic treatment, the weight is integrated from: ![]()
where the function S(f) is a squared integral of SED of incident light with sine-modulation over wavelengths:
![]()
which is, in fact, the squared imaginary part of the Fourier Transform of
If SED is a delta-function centered at
![]()
Here A(f) is a normalized aperture OTF for the given geometry of two annular apertures. For simplicity, the geometry parameters diameter, epsilon1..4 are transferred via the global parameters; function S() is also the global (private) function sfunc(). |
|
Compute some characteristic points on the spectrum.
|
|
Compute altitude shift in generalized mode from parameters of optics.
|
|
Compute the FT of SED in units of [1/cm].
Before FFT, the SED is normalized by division of each value by the integral of SED. Then, the grid of SED is expanded four times with padding the obtained "tail" with zero values; SED values are divided by their argument wavelengths. Thus, the result of the FFT algorithm (four1() utility from NR is used) has a better sampling in the frequency domain which makes the spline interpolation of the spectrum more robust. Since the grid of SED starts at non-zero wavelength but immediately near the wavelength of the blue-end of the sensitivity curve of MASS, the FT is made on this origin-shifted spectrum. So, the correction for this shift is needed afterwards (see below). The units of the wavelengths are converted into [cm], the shift of the SED to its origin and the sampling of the wavelength grid are also expressed in [cm]. This ensures the correct normalization of the resulting FT and a proper correction of the real and imaginary parts of the FT for the made shift of SED to its origin. The latter correction is made in sfunc() analytically. |
|
Sample progress indicator for console.
|
|
Test-case of S-function: analytical for "quasi-gaussian" SED.
In case of the SED being the "quasi-gaussian" function, the S-function is a purely analytical expression: ![]()
for the SED which is a normalized The substitution of sdum() instead of sfunc() in flama() may help to test the influence of "non-gaussianity" of the spectrum on the resulting shape of the weight function. The effect, in general, does not exceed a few percents (below 10 in any case) for the A0V star and the MASS response function. |
|
Compute the imaginary part of the Fourier transform of the light SED.
The results of the spline approximation of the real and imaginary parts of FT of Spline coefficients re/im_edist_ftspln[], computed FT grid re/im_edist_ft[] and the frequency grid edist_freq[] are the global (private) arrays with the length edist_ftnn.
|
|
Compute the weight of a given z in a scintillation index.
Function returns the weight for an altitude z in the stellar scintillation. The FT of the incident light SED divided by lambda is assumed to be ready and accessible by the function sfunc(). The diameter of the largest entrance aperture is d and the radii of annular apertures are obtained by its multiplication by eps1..4. The first (say, larger) aperture has the outer diameter d*eps1 and the inner d*eps2. The second (smaller) aperture has the outer diameter d*eps3 and the inner d*eps4. If only two of four epsilons differ from each other (non-zero ring width) then the weighting function value for the normal scintillation index is returned for a given aperture (for the larger one - if eps1>eps2>0, eps3=eps4; for the smaller one - if vise versa). If three or four epsilons are different (eps1>eps2 and eps3>eps4) then the weighting finction value for the differential scintillation index is returned for a pair of apertures with sizes (d*eps1,d*eps2) -- (d*eps3,d*eps4). The polychromatic expression for the weight is used here, which uses the FT of the light SED to compute the so called S-function sfunc(). This function stays for the part of the under-integral expression of the weight which is computed by flama(). And the latter is already the function which is integrated by the qromo() integrator with the relative convergence criterion. It integrates the weight for the range of spatial frequencies from X1=1e-4 to X2=18. The weight for the zero altitude is artificially set to zero. |
|
Generate the grid of values given its generation parameters.
The function counts the steps that will be computed, allocates the double-type array (to which the first parameter must point) and fills in it. The array must be freed after usage (free_dvector()). |
|
Optimal altitude modifier for z-grid creation in proportional mode |
|
Optimal minimal altitude step for z-grid creation in proportional mode |
|
Relative tolerance in aperture sizes to accept the weight file |
|
Relative tolerance in the altitude grid spacing: maximal acceptable ratio of dz and dzmin in file and in the comparison structure, >1 |
|
Tolerance level in effective wavelength and SED's 50% points [mkm]. This value corresponds to change of these wavelengths which causes the change of weights not more than 1--2%. |
|
Length of lines in a header part of the weight file |
|
Maximal number of altitude steps |
|
Maximal size of aperture [cm] (arbitrary but plausible) |
|
Writing weights to the file : the Scale factor to divide the values by |
|
Longest plausible weight value record in a file (normal format: 10.4E) |
|
Usual value for low boundary of altitude range |
|
Maximal feasible value for upper boundary of altitude range |