Gateau User Manual
Atmospheric simulation of astronomical signals
utilities.h File Reference

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.

Macros

#define NPWV   1000
 
#define PWV_START   0.1
 
#define PWV_END   5.5
 
#define DPWV   0.0054
 

Functions

__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)
 

Detailed Description

Utilities for linear interpolation for CUDA.

Function Documentation

◆ interpValue()

__host__ __device__ void interpValue ( float  x,
float  y,
ArrSpec arrx,
ArrSpec arry,
float *  vals,
int  offset,
float &  out 
)

Linearly interpolate bivariate function.

Parameters
xPoint in x to interpolate on.
yPoint in y to interpolate on.
x0Start of x-coordinates.
y0Start of y-coordinates.
size_xSize of array containing x-coordinates.
size_ySize of array containing y-coordinates.
dxStepsize of x.
dyStepsize of y.
valsFunction values on grid spanning x and y.
size_valsSize 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_inPSD of incoming signal to be cascaded.
etaEfficiency term associated with cascade.
T_parasiticTemperature of parasitic source.
nuFrequency in Hz.
Returns
Cascade output PSD.