Utilities for linear interpolation for CUDA.
More...
#include <stdexcept>
#include "cuda.h"
#include "math.h"
#include "structs.h"
#include <gsl/gsl_fit.h>
Go to the source code of this file.
|
|
#define | NPWV 1000 |
| |
|
#define | PWV_START 0.1 |
| |
|
#define | PWV_END 5.5 |
| |
|
#define | DPWV 0.0054 |
| |
|
| __host__ __device__ void | interpValue (float x, float y, ArrSpec *arrx, ArrSpec *arry, float *vals, int offset, float &out) |
| |
| __host__ __device__ float | rad_trans (float psd_in, float eta, float psd_parasitic) |
| |
|
__host__ void | resp_calibration (int start, int stop, ArrSpec *f_atm, ArrSpec *pwv_atm, ArrSpec *f_src, float Tp_atm, int nf_ch, float *eta_cascade, float *psd_cascade, float *psd_cmb, int num_stage, float *psd_atm, float *eta_atm, float *filterbank, float *eta_kj_sum, float *Psky, float *Tsky) |
| |
|
__host__ void | fit_calibration (float *Psky, float *Tsky, int nf_ch, float *c0, float *c1) |
| |
Utilities for linear interpolation for CUDA.
◆ interpValue()
| __host__ __device__ void interpValue |
( |
float |
x, |
|
|
float |
y, |
|
|
ArrSpec * |
arrx, |
|
|
ArrSpec * |
arry, |
|
|
float * |
vals, |
|
|
int |
offset, |
|
|
float & |
out |
|
) |
| |
Linearly interpolate bivariate function.
- Parameters
-
| x | Point in x to interpolate on. |
| y | Point in y to interpolate on. |
| x0 | Start of x-coordinates. |
| y0 | Start of y-coordinates. |
| size_x | Size of array containing x-coordinates. |
| size_y | Size of array containing y-coordinates. |
| dx | Stepsize of x. |
| dy | Stepsize of y. |
| vals | Function values on grid spanning x and y. |
| size_vals | Size of array containing values. |
- Returns
- val_interp Interpolated value of function on x0 and y0.
◆ rad_trans()
| __host__ __device__ float rad_trans |
( |
float |
psd_in, |
|
|
float |
eta, |
|
|
float |
psd_parasitic |
|
) |
| |
Cascade a PSD through a reflector system, and couple to a specific parasitic PSD.
- Parameters
-
| P_nu_in | PSD of incoming signal to be cascaded. |
| eta | Efficiency term associated with cascade. |
| T_parasitic | Temperature of parasitic source. |
| nu | Frequency in Hz. |
- Returns
- Cascade output PSD.