85#define SC_MIN(a, b) ((a) > (b) ? (b) : (a))
87#define SC_MAX(a, b) ((a) < (b) ? (b) : (a))
102#define SC_THERMIRLIM 2.31
107#define SC_DEFLAMCOL "LAMBDA"
109#define SC_DEFFLUXCOL "FLUX"
111#define SC_DEFDFLUXCOL "DFLUX"
113#define SC_DEFMASKCOL "MASK"
118#define SC_SINCRAD_PRECOMP 6.0
120#define SC_SINCNBIN 10000
122#define SC_SINCDAMP 3.25
129 SC_ERROR_FOPEN = CPL_ERROR_EOL + 11,
130 SC_ERROR_UFS = CPL_ERROR_EOL + 12,
131 SC_ERROR_IFE = CPL_ERROR_EOL + 13,
132 SC_ERROR_NDA = CPL_ERROR_EOL + 20,
133 SC_ERROR_INSUFF_DATA = CPL_ERROR_EOL + 21,
134 SC_ERROR_IDG = CPL_ERROR_EOL + 22,
135 SC_ERROR_IDR = CPL_ERROR_EOL + 23,
136 SC_ERROR_IOD = CPL_ERROR_EOL + 24,
137 SC_ERROR_IIP = CPL_ERROR_EOL + 30,
138 SC_ERROR_IOV = CPL_ERROR_EOL + 31,
139 SC_ERROR_IOS = CPL_ERROR_EOL + 32,
140 SC_ERROR_SUBROUTINE = CPL_ERROR_EOL + 40,
142 SC_ERROR_ACCES = CPL_ERROR_EOL + 50,
143 SC_ERROR_LOOP = CPL_ERROR_EOL + 51,
144 SC_ERROR_NAMETOOLONG = CPL_ERROR_EOL + 52,
145 SC_ERROR_NOENT = CPL_ERROR_EOL + 53,
146 SC_ERROR_NOTDIR = CPL_ERROR_EOL + 54,
147 SC_ERROR_ROFS = CPL_ERROR_EOL + 55,
148 SC_ERROR_FAULT = CPL_ERROR_EOL + 56,
149 SC_ERROR_INVAL = CPL_ERROR_EOL + 57,
150 SC_ERROR_IO = CPL_ERROR_EOL + 58,
151 SC_ERROR_NOMEM = CPL_ERROR_EOL + 59,
152 SC_ERROR_TXTBSY = CPL_ERROR_EOL + 60,
153 SC_ERROR_EXIST = CPL_ERROR_EOL + 61,
154 SC_ERROR_NOSPC = CPL_ERROR_EOL + 62,
155 SC_ERROR_PERM = CPL_ERROR_EOL + 63,
157 SC_ERROR_BADUSERINPUT = CPL_ERROR_EOL + 70,
158 SC_ERROR_LINK = CPL_ERROR_EOL + 71,
159 SC_ERROR_CD = CPL_ERROR_EOL + 72,
160 SC_ERROR_GETCWD = CPL_ERROR_EOL + 73,
162 SC_ERROR_RFM = CPL_ERROR_EOL + 81,
163 SC_ERROR_UNDEF = CPL_ERROR_EOL + 80
168#define SC_ERROR_FOF SC_ERROR_FOPEN
169#define SC_ERROR_ISM SC_ERROR_NOMEM
170#define SC_ERROR_EIS SC_ERROR_SUBROUTINE
171#define SC_ERROR_ISD SC_ERROR_INSUFF_DATA
175#define SC_ERROR_FOPEN_TXT "File opening failed"
176#define SC_ERROR_UFS_TXT "Unexpected file structure"
177#define SC_ERROR_IFE_TXT "Invalid file name extension"
178#define SC_ERROR_BDR_TXT "Bad directory"
179#define SC_ERROR_NDA_TXT "No data"
180#define SC_ERROR_ISD_TXT "Insufficient data points"
181#define SC_ERROR_IDG_TXT "Inconsistent data grids"
182#define SC_ERROR_IDR_TXT "Invalid data range"
183#define SC_ERROR_IOD_TXT "Invalid order of data points"
184#define SC_ERROR_IIP_TXT "Invalid input parameter(s)"
185#define SC_ERROR_IOV_TXT "Invalid object value(s)"
186#define SC_ERROR_IOS_TXT "Invalid object structure"
187#define SC_ERROR_SUBROUTINE_TXT "Error in subroutine"
189#define SC_ERROR_ACCES_TXT "Permission denied"
190#define SC_ERROR_LOOP_TXT "Too many symbolic links"
191#define SC_ERROR_NAMETOOLONG_TXT "Pathname too long"
192#define SC_ERROR_NOENT_TXT "File/dir does not exist"
193#define SC_ERROR_NOTDIR_TXT "Component used as directory in pathname " \
195#define SC_ERROR_ROFS_TXT "Write permission requested for file/dir " \
196 "on read-only file system"
197#define SC_ERROR_FAULT_TXT "Pathname points outside accessible " \
199#define SC_ERROR_INVAL_TXT "Mode was incorrectly specified"
200#define SC_ERROR_IO_TXT "I/O error occurred"
201#define SC_ERROR_NOMEM_TXT "Insufficient memory"
202#define SC_ERROR_TXTBSY_TXT "Write access requested to executable " \
203 "which is being executed"
204#define SC_ERROR_EXIST_TXT "File/dir already exists"
205#define SC_ERROR_NOSPC_TXT "No space left on device"
206#define SC_ERROR_PERM_TXT "File system does not support creation of " \
208#define SC_ERROR_LINK_TXT "Could not create symbolic link"
209#define SC_ERROR_UNDEF_TXT "Undefined error"
210#define SC_ERROR_CD_TXT "Could not change directory"
211#define SC_ERROR_GETCWD_TXT "Could not get current working directory"
213#define SC_ERROR_FOF_TXT SC_ERROR_FOPEN_TXT
214#define SC_ERROR_ISM_TXT SC_ERROR_NOMEM_TXT
215#define SC_ERROR_EIS_TXT SC_ERROR_SUBROUTINE_TXT
246 int *hh,
int *mm,
double *ss,
247 const double *fracyear);
248cpl_error_code
sc_basic_rebin(cpl_table *outspec,
const char *outlam,
249 const char *outflux,
const cpl_table *inspec,
250 const char *inlam,
const char *influx);
252 const cpl_array *kernel);
254 const cpl_array *flux,
256 const cpl_array *kernel);
261 const cpl_array *pres,
262 const cpl_array *rhum,
266cpl_error_code
sc_basic_planck(cpl_array *bb,
const cpl_array *wavelength,
275cpl_error_code sc_basic_absfile(
char *absfilename,
const char *filename);
276cpl_boolean sc_basic_parameterlists_same(cpl_parameterlist *list1,
277 cpl_parameterlist *list2);
278cpl_error_code sc_basic_status2txt(
char *msg,
const int status);
280 cpl_array *arr,
const cpl_boolean clip);
283 const char *colname);
285 const cpl_array *arr);
286int sc_basic_sortarr_double(
const void *p1,
const void *p2);
289 const cpl_table *intab);
291 const cpl_table *intab);
299 const long n_out,
const double *x_ref,
300 const double *y_ref,
const long n_ref,
301 const int extrapolate);
303 const int n_data,
const double *par);
307 const cpl_vector *vector);
309 const cpl_image *image);
cpl_error_code sc_basic_rebin(cpl_table *outspec, const char *outlam, const char *outflux, const cpl_table *inspec, const char *inlam, const char *influx)
double sc_basic_mjd2fracyear(double mjd)
cpl_error_code sc_basic_linecount(long *n_lines, FILE *fp)
int sc_basic_gaussfunc(double *fgauss, const double *xgauss, const int n_data, const double *par)
cpl_error_code sc_basic_access(const char *pathname, const int mode)
cpl_error_code sc_basic_col2arr(cpl_array *arr, const cpl_table *tab, const char *colname)
cpl_boolean sc_basic_isnumber(char *str)
cpl_error_code sc_basic_clipmean(double *mean, double *rms, cpl_array *arr, const cpl_boolean clip)
cpl_error_code sc_basic_copytable_content(cpl_table *outtab, const cpl_table *intab)
cpl_error_code sc_basic_greg2jd(long *jd, const int year, const int month, const int day)
cpl_error_code sc_basic_filtermedian(cpl_table *spec, const char *colname, const int npix)
cpl_error_code sc_basic_copytable_full(cpl_table *outtab, const cpl_table *intab)
cpl_error_code sc_basic_interpollin(const double *x_out, double *y_out, const long n_out, const double *x_ref, const double *y_ref, const long n_ref, const int extrapolate)
cpl_error_code sc_basic_convolve(cpl_table *spec, const char *colname, const cpl_array *kernel)
char * sc_basic_strtrim(char *str)
cpl_error_code sc_basic_getmaskval_image(double maskval[2], const cpl_image *image)
cpl_error_code sc_basic_arr2col(cpl_table *tab, const char *colname, const cpl_array *arr)
double sc_basic_fracyear2date(int *year, int *month, int *day, int *hh, int *mm, double *ss, const double *fracyear)
void sc_basic_abspath(char *out, const char *dir, const char *cwd)
void sc_basic_dirslash(char *dir)
void sc_basic_rhum2ppmv(double *ppmv, const double *tem, const double *p, const double *hum)
void sc_basic_initstring(char *str, const long n)
cpl_error_code sc_basic_getfilename(char *dir, char *filename, char *suffix, const char *path)
cpl_error_code sc_basic_convolvewindow(cpl_array *convflux, const cpl_array *flux, const int range[2], const cpl_array *kernel)
cpl_error_code sc_basic_rhum2ppmv_old(const cpl_array *temp, const cpl_array *pres, const cpl_array *rhum, cpl_array *ppmv)
void sc_basic_strtrim_inplace(char *str)
cpl_error_code sc_basic_readline(FILE *stream, scpar par[], int *npar)
cpl_error_code sc_basic_getmaskval_vector(double maskval[2], const cpl_vector *vector)
cpl_error_code sc_basic_calcsinc(cpl_vector *sinc)
cpl_error_code sc_basic_planck(cpl_array *bb, const cpl_array *wavelength, const double temp)
cpl_error_code sc_basic_jd2greg(int *year, int *month, int *day, const long jd)
cpl_error_code sc_basic_sortarr(cpl_array *arr, cpl_type type)
void sc_basic_terminatestring(char *str)
cpl_boolean sc_basic_isinteger(char *str)
enum _sc_error_code_ sc_error_code