- Timestamp:
- Mar 28, 2012, 8:10:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/Ohana/src/opihi/dvo/skyregion.c
r33543 r33615 1 1 # include "dvoshell.h" 2 3 #ifdef NO_MOVED_TO_DVO4 static double RAs = 0.0;5 static double RAe = 0.0;6 static double DECs = 0.0;7 static double DECe = 0.0;8 #endif9 2 10 3 // define the sky region for which extractions are limited 11 4 int skyregion (int argc, char **argv) { 12 5 6 int N; 7 8 // dvo_client should have 2 standard arguments: -hostID and -hostdir 9 int SaveRegion = FALSE; 10 if ((N = get_argument (argc, argv, "-save"))) { 11 remove_argument (N, &argc, argv); 12 SaveRegion = TRUE; 13 } 14 13 15 if (argc == 1) { 14 double R As, RAe, DECs, DECe;15 get_skyregion(&R As, &RAe, &DECs, &DECe);16 double Rmin, Rmax, Dmin, Dmax; 17 get_skyregion(&Rmin, &Rmax, &Dmin, &Dmax); 16 18 17 gprint (GP_ERR, "current skyregion: %f - %f : %f - %f\n", RAs, RAe, DECs, DECe); 18 gprint (GP_ERR, "USAGE: skyregion (min RA) (max RA) (min DEC) (max DEC)\n"); 19 return (FALSE); 19 if (SaveRegion) { 20 set_variable ("Rmin", Rmin); 21 set_variable ("Rmax", Rmax); 22 set_variable ("Dmin", Dmin); 23 set_variable ("Dmax", Dmax); 24 return TRUE; 25 } else { 26 gprint (GP_ERR, "current skyregion: %f - %f : %f - %f\n", Rmin, Rmax, Dmin, Dmax); 27 gprint (GP_ERR, "USAGE: skyregion (min RA) (max RA) (min DEC) (max DEC)\n"); 28 return FALSE; 29 } 20 30 } 21 31 … … 29 39 return (TRUE); 30 40 } 31 #ifdef NOT_MOVED_TO_LIBDVO32 int get_skyregion (double *Rs, double *Re, double *Ds, double *De) {33 34 *Rs = RAs;35 *Re = RAe;36 *Ds = DECs;37 *De = DECe;38 39 return TRUE;40 }41 42 int set_skyregion (double Rs, double Re, double Ds, double De) {43 44 RAs = Rs;45 RAe = Re;46 DECs = Ds;47 DECe = De;48 49 return TRUE;50 }51 #endif52 41 53 42 /* find region which overlaps c at given depth (-1 : populated ) */
Note:
See TracChangeset
for help on using the changeset viewer.
