IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 1, 2012, 3:24:39 PM (14 years ago)
Author:
eugene
Message:

support for parallel dvo in mextract, avextract, avmerge, gstar, gcat; remove some if-def-ed out code already moved to libdvo; list -vectors and -buffers options (store names of vectors and buffers in lists); list -copy give error if missing source; catlist, hosts & remote functions to support parallel dvos; skyregion -save option; new skycoverage modes (-min-ubercal; -min-dmag-sys; -min-mcal; -max-mcal); gstar output formatting cleanups; add more average info to gstar output; functions for spectral similarity analysis; coords returns nans for projections off the sphere; fix cumulative function; add name:type option to opihi/read function (eg read a:float 2 b:time 3 c:int 4); line -frac option; vtype function to get vector types; threshold function; write -fits option; code for unfinished mtype function (matching vtype)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/dvo/skyregion.c

    r31635 r33662  
    11# include "dvoshell.h"
    2 
    3 #ifdef NO_MOVED_TO_DVO
    4 static double RAs = 0.0;
    5 static double RAe = 0.0;
    6 static double DECs = 0.0;
    7 static double DECe = 0.0;
    8 #endif
    92
    103// define the sky region for which extractions are limited
    114int skyregion (int argc, char **argv) {
    125 
     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
    1315  if (argc == 1) {
    14     double RAs, RAe, DECs, DECe;
    15     get_skyregion(&RAs, &RAe, &DECs, &DECe);
     16    double Rmin, Rmax, Dmin, Dmax;
     17    get_skyregion(&Rmin, &Rmax, &Dmin, &Dmax);
    1618
    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    }
    2030  }
    2131
     
    2939  return (TRUE);
    3040}
    31 #ifdef NOT_MOVED_TO_LIBDVO
    32 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 #endif
    5241
    5342/* find region which overlaps c at given depth (-1 : populated ) */
     
    10796  ALLOCATE (new[0].regions,  SkyRegion *, 1);
    10897  ALLOCATE (new[0].filename,  char *, 1);
     98  new[0].Nregions = 0;
     99  new[0].ownElements = FALSE; // this list is only holding a view to the elements
    109100
    110101  // output list
Note: See TracChangeset for help on using the changeset viewer.