Go to the documentation of this file.
8 static float unitc = 119.625e8;
12 #define PARWN (PARW2-PARW1)+1
20 static int firstCall = 1;
23 static float F0vis[
PARWN];
27 int32_t ip, ipb, iw, ib;
29 l1str *
l1rec = l2rec->l1rec;
35 if ((wave = (
float *) calloc(
l1file->nbands, sizeof (
float))) ==
NULL) {
36 printf(
"-E- %s line %d : error allocating memory for ipar:get_ipar.\n",
40 for (iw = 0; iw <
l1file->nbands; iw++) {
41 wave[iw] =
l1file->fwave[iw];
48 F0vis[ib] *=
l1rec->fsol;
53 if ((ta = (
float *) calloc(nwave,
sizeof (
float))) ==
NULL) {
54 printf(
"-E- %s line %d : error allocating memory for ipar:get_ipar.\n",
61 for (ip = 0; ip <
l1rec->npix; ip++) {
65 if (!
l1rec->mask[ip]) {
67 for (iw = 0; iw < nwave; iw++) {
69 ipb = ip *
l1file->nbands + iw;
72 ta[iw] =
l1rec->tg_sol[ipb] *
l1rec->t_sol[ipb];
77 Ed0p = F0vis[ib] *
l1rec->csolz[ip] *
linterp(wave, ta, nwave, (
float) iw);
78 ipar[ip] += ((
float) iw) * Ed0p / unitc;
81 if (!isfinite(ipar[ip])) {
int32 l1file(int32 sdfid, int32 *nsamp, int32 *nscans, int16 *dtynum)
float linterp(float xin[], float yin[], int32_t nin, float xout)
void get_ipar(l2str *l2rec, float ipar[])
int windex(float wave, float twave[], int ntwave)
void get_f0_thuillier_ext(int32_t wl, int32_t width, float *f0)