72 else if ( (ya == yb) && (xa <= xb) ){
97 for(i =0 ; i<grid->
idx ; i++ ) {
131 tab=cpl_table_new(nrows);
132 cpl_table_new_column(tab,
"X",CPL_TYPE_DOUBLE);
133 cpl_table_new_column(tab,
"Y",CPL_TYPE_DOUBLE);
134 cpl_table_new_column(tab,
"INT",CPL_TYPE_DOUBLE);
135 cpl_table_new_column(tab,
"ERR",CPL_TYPE_DOUBLE);
137 cpl_table_fill_column_window(tab,
"X",0,nrows,-1);
138 cpl_table_fill_column_window(tab,
"Y",0,nrows,-1);
139 cpl_table_fill_column_window(tab,
"INT",0,nrows,-1);
140 cpl_table_fill_column_window(tab,
"ERR",0,nrows,-1);
142 px=cpl_table_get_data_double(tab,
"X");
143 py=cpl_table_get_data_double(tab,
"Y");
144 pi=cpl_table_get_data_double(tab,
"INT");
145 pe=cpl_table_get_data_double(tab,
"ERR");
147 for (i = 0; i < nrows; i++) {
148 px[i] = grid->
list[i]->
x;
149 py[i] = grid->
list[i]->
y;
150 pi[i] = grid->
list[i]->
v;
177 if(cpl_error_get_code() != CPL_ERROR_NONE){
196 if ( (*grid)->list ){
197 for (i=0; i< (*grid)->idx; i++) {
void xsh_grid_add(xsh_grid *grid, int x, int y, double data, double errs, int qual)
add a point to a grid
xsh_grid * xsh_grid_create(int size)
Create a grid.
void xsh_grid_dump(xsh_grid *grid)
Dump main info about a grid.
void xsh_grid_sort(xsh_grid *grid)
sort grid points
int xsh_grid_get_index(xsh_grid *grid)
get the number of elements in the grid
xsh_grid_point * xsh_grid_point_get(xsh_grid *grid, int i)
get x points from the grid
void xsh_grid_free(xsh_grid **grid)
Free a grid.
static int xsh_grid_point_compare(const void *one, const void *two)
cpl_table * xsh_grid2table(xsh_grid *grid)
Dump main info about a grid.
#define XSH_ASSURE_NOT_ILLEGAL(cond)
#define XSH_ASSURE_NOT_NULL(pointer)
#define xsh_msg(...)
Print a message on info level.
#define XSH_FREE(POINTER)
#define XSH_MALLOC(POINTER, TYPE, SIZE)
#define XSH_CALLOC(POINTER, TYPE, SIZE)