00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef UVES_EXTRACT_ITERATE_H
00044 #define UVES_EXTRACT_ITERATE_H
00045
00046 #include <uves_utils_polynomial.h>
00047
00048 #include <stdbool.h>
00049
00050 typedef struct {
00051 double length;
00052 double offset;
00053 } slit_geometry;
00054
00055
00056 typedef struct
00057 {
00058
00059
00061 int order;
00063 int x, y;
00065 double ycenter;
00067 int ylow, yhigh;
00068
00069
00070
00071
00072
00074 int xmin, xmax;
00077 int ordermax;
00080 const cpl_binary *bpm;
00083 bool loop_y;
00085 bool end;
00086
00087
00088
00089
00091 int nx, ny;
00092
00094 int minorder, maxorder;
00095
00096 const polynomial *order_locations;
00097 slit_geometry sg;
00098
00099 } uves_iterate_position;
00100
00101
00102 uves_iterate_position *
00103 uves_iterate_new(int nx, int ny,
00104 const polynomial *order_locations,
00105 int minorder, int maxorder,
00106 slit_geometry sg);
00107
00108 void
00109 uves_iterate_delete(uves_iterate_position **p);
00110
00111 void
00112 uves_iterate_set_first(uves_iterate_position *p,
00113 int xmin, int xmax,
00114 int ordermin, int ordermax,
00115 const cpl_binary *bpm,
00116 bool loop_y);
00117
00118 inline void
00119 uves_iterate_increment(uves_iterate_position *p);
00120
00121 inline bool
00122 uves_iterate_finished(const uves_iterate_position *p);
00123
00124 void
00125 uves_iterate_dump(const uves_iterate_position *p, FILE *stream);
00126
00127 #endif