IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 17, 2014, 12:32:26 PM (12 years ago)
Author:
eugene
Message:

merge changes (from past YEAR) into trunk

Location:
branches/eam_branches/ipp-ops-20130712/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-ops-20130712/Ohana

    • Property svn:mergeinfo deleted
  • branches/eam_branches/ipp-ops-20130712/Ohana/src/libdvo/include/dvo.h

    r35755 r37067  
    2828  DVO_FORMAT_PS1_V3,
    2929  DVO_FORMAT_PS1_V4,
     30  DVO_FORMAT_PS1_V5,
    3031} DVOTableFormat;
    3132
     
    7879
    7980/* catalog values to be loaded */
    80 # define LOAD_NONE      0x00
    81 # define LOAD_AVES      0x01
    82 # define LOAD_MEAS      0x02
    83 # define LOAD_MISS      0x04
    84 # define LOAD_SECF      0x08
    85 # define SKIP_AVES      0x10
    86 # define SKIP_MEAS      0x20
    87 # define SKIP_MISS      0x40
    88 # define SKIP_SECF      0x80
    89 
    90 // # define LOAD_MEAS_META 0x100 -- is this used??
     81# define LOAD_NONE      0x000
     82# define LOAD_AVES      0x001
     83# define LOAD_MEAS      0x002
     84# define LOAD_MISS      0x004
     85# define LOAD_SECF      0x008
     86# define SKIP_AVES      0x010
     87# define SKIP_MEAS      0x020
     88# define SKIP_MISS      0x040
     89# define SKIP_SECF      0x080
     90# define LOAD_LENSING   0x100
     91# define LOAD_LENSOBJ   0x200
     92# define SKIP_LENSING   0x400
     93# define SKIP_LENSOBJ   0x800
    9194
    9295/* photometry code types */
     
    171174  ID_STAR_USE_PAR   = 0x00200000, // parallax used (not AVE or PM)
    172175  ID_STAR_NO_ASTROM = 0x00400000, // mean astrometry could not be measured
     176  ID_STAR_BAD_PM    = 0x00800000, // mean astrometry could not be measured
    173177  ID_OBJ_EXT        = 0x01000000, // extended in our data (eg, PS)
    174178  ID_OBJ_EXT_ALT    = 0x02000000, // extended in external data (eg, 2MASS)
     
    285289} HostTable;
    286290
     291// A RegionHost processes data for some region in parallel with other regions
     292typedef struct RegionHostInfo {
     293  double Rmin;        // (Rmin,Rmax),(Dmin,Dmax) arehard RA,DEC boundaries of the
     294  double Rmax;        // region for which each host is responsible.  A given host
     295  double Dmin;        // calibrates the images for which the fiducial point (center)
     296  double Dmax;        // lands in the region, and all objects in the region
     297
     298  double RminCat;      // (RminCat,RmaxCat),(DminCat,DmaxCat) are the region for which
     299  double RmaxCat;      // the catalogs need to be loaded : this is the outer bounds
     300  double DminCat;      // of the region containing all images completely
     301  double DmaxCat;
     302
     303  char *hostname;
     304
     305  int hostID;                 // remove machine ID in SkyTable
     306  int stdio[3];               // fd's for communication with the remote host
     307  int pid;                    // remote process ID
     308  int status;
     309  IOBuffer stdout;
     310  IOBuffer stderr;
     311
     312  off_t Nimage;
     313  off_t NIMAGE;
     314  Image *image;
     315  off_t *imseq;
     316
     317  int *neighbors;             // list of neighbor index values
     318  int Nneighbors;             // number of neighbors
     319  char isNeighbor;            // TRUE if I am a neighbor to the current region host
     320} RegionHostInfo;
     321
     322typedef struct {
     323  double Rmin;
     324  double Rmax;
     325  double Dmin;
     326  double Dmax;
     327
     328  int Nhosts;
     329  RegionHostInfo *hosts;
     330  short *index;
     331} RegionHostTable;
     332
    287333// special-case function:
    288334CMF_PS1_V2 *gfits_table_get_CMF_PS1_V1_Alt (FTable *ftable, off_t *Ndata, char *swapped);
     
    291337// another special case : does not match byte-boundaries
    292338# include "cmf-ps1-dv3.h"
     339# include "cmf-ps1-sv3.h"
     340# include "cmf-ps1-v5.h"
     341# include "cmf-ps1-v5-lensing.h"
    293342
    294343typedef struct {
     
    308357# define BOUNDARY_TREE_NAME_LENGTH 128
    309358
     359// BoundaryTree is a structure to describe the 3pi RINGS skycell boundaries in terms of lines of constant (RA,DEC)
     360// the structure is flexible for a variety of RINGS-like tessellations, but is not appropriate for the LOCAL style tess
    310361typedef struct {
    311362  int FixedGridDEC;           // is the DEC sequence linear?
     
    342393} BoundaryTree;
    343394
    344 // XXX DROP? // a reduced-subset structure for relastro
    345 // XXX DROP? typedef struct {
    346 // XXX DROP?   double         R;
    347 // XXX DROP?   double         D;
    348 // XXX DROP?   unsigned short Nmeasure;
    349 // XXX DROP?   int            measureOffset;
    350 // XXX DROP?   uint32_t       flags;
    351 // XXX DROP?   int            catID;
    352 // XXX DROP? } AverageTinyAstro;
     395typedef enum { TESS_NONE, TESS_LOCAL, TESS_RINGS } TessType;
     396
     397// TessellationTable is a structure to describe the parameters of a set of "tessellations"
     398// (these are not strictly tessellations but projection sets as only the non-local
     399// versions can cover the full sky).  For LOCAL projection cells, the structure describes
     400// the boundaries of a SINGLE projection cell with Nx * Ny skycells and includes some
     401// basic parameters (not used by the fullsky, eg RINGS, tessellations)
     402typedef struct {
     403  double Rmin; // this tessellation is valid only for RA >= Rmin
     404  double Rmax; // this tessellation is valid only for RA <  Rmax
     405  double Dmin; // this tessellation is valid only for DEC >= Dmin
     406  double Dmax; // this tessellation is valid only for DEC <  Dmax
     407
     408  double Xo;
     409  double Yo;
     410  double Ro;
     411  double Do;
     412  double dPix;
     413  int dX;
     414  int dY;
     415
     416  int NX_SUB;
     417  int NY_SUB;
     418
     419  char *basename;
     420  int Nbasename;
     421  int projectIDoff;
     422  int skycellIDoff;
     423
     424  TessType type; //
     425  BoundaryTree *tree;
     426} TessellationTable;
    353427
    354428// a reduced-subset structure for relphot
     
    360434  uint32_t       flags;
    361435  int            catID;
     436  int            objID;
     437  int            nOwn;
    362438} AverageTiny;
    363439
    364440// a reduced-subset structure for relphot & relastro
    365441typedef struct {
    366   float          dR;
    367   float          dD;
     442  double         R;
     443  double         D;
    368444  float          M;
    369445  float          Mcal;
     
    385461  short          dYccd;
    386462  short          dRsys;
     463  char           myDet;
    387464} MeasureTiny;
     465
     466/** STRUCT DEFINITION **/
     467typedef struct {
     468  double           R;                    // RA (decimal degrees )
     469  double           D;                    // DEC (decimal degrees )
     470  float            dR;                   // RA error (arcsec)
     471  float            dD;                   // DEC error (arcsec)
     472  float            uR;                   // RA*cos(D) proper-motion (arcsec/year)
     473  float            uD;                   // DEC proper-motion (arcsec/year)
     474  float            duR;                  // RA*cos(D) p-m error (arcsec/year)
     475  float            duD;                  // DEC p-m error (arcsec/year)
     476  float            P;                    // parallax (arcsec)
     477  float            dP;                   // parallax error (arcsec)
     478  float            ChiSqAve;             // astrometry analysis chisq
     479  float            ChiSqPM;              // astrometry analysis chisq
     480  float            ChiSqPar;             // astrometry analysis chisq
     481  int              Tmean;                // mean epoch (PM,PAR ref) (unix time seconds)
     482  int              Trange;               // mean epoch (PM,PAR ref) (unix time seconds)
     483  float            Xp;                   // unused
     484  unsigned short   Npos;                 // number of detections used for astrometry
     485  unsigned short   Nmeasure;             // number of psf measurements
     486  unsigned short   Nmissing;             // number of missings
     487  unsigned short   Nextend;              // number of extended measurements
     488  uint32_t         measureOffset;        // offset to first psf measurement
     489  uint32_t         missingOffset;        // offset to first missing obs
     490  float            refColor;            // offset to first extended measurement
     491  uint32_t         flags;                // average object flags (star; ghost; etc)
     492  uint32_t         photFlagsUpper;       // upper bit of 2 bit summary of per-measure photflags
     493  uint32_t         photFlagsLower;       // lower bit of 2 bit summary of per-measure photflags
     494  unsigned int     objID;                // unique ID for object in table
     495  unsigned int     catID;                // unique ID for table in which object was first realized
     496  uint64_t         extID;                // external ID for object (eg PSPS objID)
     497} Average_PS1_V4alt;
     498
     499Average_PS1_V4alt *gfits_table_get_Average_PS1_V4alt (FTable *table, off_t *Ndata, char *swapped);
     500Average *Average_PS1_V4alt_ToInternal (Average_PS1_V4alt *in, off_t Nvalues);
     501
     502/** STRUCT DEFINITION **/
     503typedef struct {
     504  float            dR;                   // RA offset (arcsec)
     505  float            dD;                   // DEC offset (arcsec)
     506  float            M;                    // catalog mag (mag)
     507  float            Mcal;                 // image cal mag (mag)
     508  float            Map;                  // aperture mag (mag)
     509  float            Mkron;                // kron magnitude (mag)
     510  float            dMkron;               // kron magnitude error (mag)
     511  float            dM;                   // mag error (mag)
     512  float            dMcal;                // systematic calibration error (mag)
     513  float            dt;                   // exposure time (2.5*log(exptime))
     514  float            FluxPSF;              // flux from psf fit (counts/sec?)
     515  float            dFluxPSF;             // error on psf flux (counts/sec?)
     516  float            FluxKron;             // flux from kron ap (counts/sec?)
     517  float            dFluxKron;            // error on kron flux (counts/sec?)
     518  float            airmass;              // (airmass - 1) (airmass)
     519  float            az;                   // telescope azimuth
     520  float            Xccd;                 // X coord on chip (raw value) (pixels)
     521  float            Yccd;                 // Y coord on chip (raw value) (pixels)
     522  float            Sky;                  // local estimate of sky flux (counts/sec)
     523  float            dSky;                 // local estimate of sky flux (counts/sec)
     524  int              t;                    // time in seconds (UNIX)
     525  unsigned int     averef;               // reference to average entry     
     526  unsigned int     detID;                // detection ID
     527  unsigned int     imageID;              // reference to DVO image ID
     528  unsigned int     objID;                // unique ID for object in table
     529  unsigned int     catID;                // unique ID for table in which object was first realized
     530  uint64_t         extID;                // external ID (eg PSPS detID)
     531  float            psfQF;                // psf coverage/quality factor
     532  float            psfQFperf;            // psf coverage / quality factor (all mask bits)
     533  float            psfChisq;             // psf fit chisq
     534  int              psfNdof;              // psf degrees of freedom
     535  int              psfNpix;              // psf number of pixels
     536  float            crNsigma;             // Nsigma deviation towards CR
     537  float            extNsigma;            // Nsigma deviation towards EXT
     538  short            FWx;                  // object fwhm major axis (1/100 of pixels)
     539  short            FWy;                  // object fwhm minor axis (1/100 of pixels )
     540  short            theta;                // angle wrt ccd X dir ((0xffff/360) deg)
     541  short            Mxx;                  // second moments in pixel coords (1/100 of pixels)
     542  short            Mxy;                  // second moments in pixel coords (1/100 of pixels)
     543  short            Myy;                  // second moments in pixel coords (1/100 of pixels)
     544  unsigned short   t_msec;               // time fraction of second (milliseconds)
     545  unsigned short   photcode;             // photcode
     546  short            dXccd;                // X coord error on chip (1/100 of pixels)
     547  short            dYccd;                // Y coord error on chip (1/100 of pixels)
     548  short            dRsys;                // systematic error from astrom (1/100 of pixels)
     549  short            posangle;             // position angle sky to chip ((0xffff/360) deg)
     550  float            pltscale;             // plate scale (arcsec/pixel)
     551  unsigned int     dbFlags;              // flags supplied by analysis in database
     552  unsigned int     photFlags;            // flags supplied by photometry program
     553} Measure_PS1_V4alt;
     554
     555Measure_PS1_V4alt *gfits_table_get_Measure_PS1_V4alt (FTable *table, off_t *Ndata, char *swapped);
     556Measure *Measure_PS1_V4alt_ToInternal (Average *ave, Measure_PS1_V4alt *in, off_t Nvalues);
     557
     558/* for some reason I have merged the set of tables and the file description,
     559   so I need to have an internal structure to point to the separate files */
    388560
    389561/* a catalog contains this data */
     
    399571  SecFilt *secfilt;
    400572
     573  // lensing data (optional?)
     574  Lensing *lensing;
     575  Lensobj *lensobj;
     576
    401577  int Nsecfilt;  /* number of secfilt entries for each average entry */
    402   off_t Naverage,   Nmeasure,   Nmissing,   Nsecf_mem;  /* current number of each component in memory */
    403   off_t Naves_disk, Nmeas_disk, Nmiss_disk, Nsecf_disk; /* current number of each component on disk */
    404   off_t Naves_off,  Nmeas_off,  Nmiss_off,  Nsecf_off;  /* index of first loaded data value */
     578  off_t Naverage,   Nmeasure,   Nmissing,   Nlensing,      Nlensobj,      Nsecf_mem;  /* current number of each component in memory */
     579  off_t Naves_disk, Nmeas_disk, Nmiss_disk, Nlensing_disk, Nlensobj_disk, Nsecf_disk; /* current number of each component on disk */
     580  off_t Naves_off,  Nmeas_off,  Nmiss_off,  Nlensing_off,  Nlensobj_off,  Nsecf_off;  /* index of first loaded data value */
    405581
    406582  // note that we use these for the full-sky relphot analysis
     
    421597  struct Catalog *missing_catalog;              /* missing catalog data (split) */
    422598  struct Catalog *secfilt_catalog;              /* secfilt catalog data (split) */
     599  struct Catalog *lensing_catalog;              /* lensing catalog data (split) */
     600  struct Catalog *lensobj_catalog;              /* lensobj catalog data (split) */
    423601
    424602  unsigned int objID;
     
    429607  char catmode;                         /* storage mode (raw, mef, split, mysql) */
    430608  char catformat;                       /* storage format (elixir, panstarrs, etc) */
    431   char catflags;                                /* choices to be loaded */
    432   char sorted;                          /* is measure table average-sorted? */
     609  int sorted;                           /* is measure table average-sorted? (NOTE this is an int only because gfits_scan %t requires it) */
    433610 
     611  short catflags; /* choices to be loaded */
     612
    434613  /* pointers for data manipulation */
    435   off_t *found;
    436   off_t *image;
    437   off_t *mosaic;
    438   float *X;
    439   float *Y;
     614  off_t *found_t;
     615  off_t *foundWarp_t;
     616//  off_t *image_t;
     617//  off_t *mosaic_t;
     618//  float *X_t;
     619//  float *Y_t;
     620  int   *nOwn_t; // relastro uses this to count owned detections per object
    440621
    441622} Catalog;
     
    497678char     *GetPhotcodeNamebyCode (int code);
    498679
    499 float PhotInst (Measure *measure);
    500 float PhotCat (Measure *measure);
    501 float PhotAper (Measure *measure);
    502 float PhotKron (Measure *measure);
    503 float PhotSys (Measure *measure, Average *average, SecFilt *secfilt);
    504 float PhotRel (Measure *measure, Average *average, SecFilt *secfilt);
    505 float PhotCal (Measure *thisone, Average *average, SecFilt *secfilt, Measure *measure, PhotCode *code);
    506 float PhotAve (PhotCode *code, Average *average, SecFilt *secfilt);
    507 float PhotRef (PhotCode *code, Average *average, SecFilt *secfilt, Measure *measure);
     680float PhotInst (Measure *measure, dvoMagClassType class);
     681float PhotCat (Measure *measure, dvoMagClassType class);
     682float PhotSys (Measure *measure, Average *average, SecFilt *secfilt, dvoMagClassType class);
     683float PhotRel (Measure *measure, Average *average, SecFilt *secfilt, dvoMagClassType class);
     684float PhotCal (Measure *thisone, Average *average, SecFilt *secfilt, Measure *measure, PhotCode *code, dvoMagClassType class);
     685float PhotErr (Measure *measure, dvoMagClassType class);
     686float PhotCalErr (Measure *measure, dvoMagClassType class);
     687
     688float PhotAve (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source);
     689float PhotRef (PhotCode *code, Average *average, SecFilt *secfilt, Measure *measure, dvoMagClassType class, dvoMagSourceType source);
     690float PhotAveErr (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source);
     691
     692float PhotInstTiny (MeasureTiny *measure, dvoMagClassType class);
     693float PhotCatTiny (MeasureTiny *measure, dvoMagClassType class);
     694float PhotSysTiny (MeasureTiny *measure, AverageTiny *average, SecFilt *secfilt, dvoMagClassType class);
     695float PhotRelTiny (MeasureTiny *measure, AverageTiny *average, SecFilt *secfilt, dvoMagClassType class);
     696float PhotCalTiny (MeasureTiny *thisone, AverageTiny *average, SecFilt *secfilt, MeasureTiny *measure, PhotCode *code, dvoMagClassType class);
     697
     698float PhotAveTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source);
     699float PhotRefTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt, MeasureTiny *measure, dvoMagClassType class, dvoMagSourceType source);
     700
     701float PhotFluxInst (Measure *measure, dvoMagClassType class);
     702float PhotFluxCat (Measure *measure, dvoMagClassType class);
     703float PhotFluxSys (Measure *measure, Average *average, SecFilt *secfilt, dvoMagClassType class);
     704float PhotFluxRel (Measure *measure, Average *average, SecFilt *secfilt, dvoMagClassType class);
     705float PhotFluxCal (Measure *thisone, Average *average, SecFilt *secfilt, Measure *measure, PhotCode *code, dvoMagClassType class);
     706
     707float PhotFluxAve (PhotCode *code, Average *average, SecFilt *secfilt, dvoMagClassType class, dvoMagSourceType source);
     708float PhotFluxRef (PhotCode *code, Average *average, SecFilt *secfilt, Measure *measure, dvoMagClassType class, dvoMagSourceType source);
     709
     710float PhotFluxInstErr (Measure *measure, dvoMagClassType class);
     711float PhotFluxCatErr (Measure *measure, dvoMagClassType class);
     712
    508713float PhotXm (PhotCode *code, Average *average, SecFilt *secfilt);
    509 float PhotdM (PhotCode *code, Average *average, SecFilt *secfilt);
    510 
    511 float PhotAperInst (Measure *measure);
    512 float PhotKronInst (Measure *measure);
    513 float PhotKronAve (PhotCode *code, Average *average, SecFilt *secfilt);
    514 float PhotKronAveErr (PhotCode *code, Average *average, SecFilt *secfilt);
    515 
    516714float PhotZeroPoint (Measure *measure, Average *average, SecFilt *secfilt);
    517 float PhotAveFluxPSF (PhotCode *code, Average *average, SecFilt *secfilt);
    518 float PhotAvedFluxPSF (PhotCode *code, Average *average, SecFilt *secfilt);
    519 float PhotAveFluxKron (PhotCode *code, Average *average, SecFilt *secfilt);
    520 float PhotAvedFluxKron (PhotCode *code, Average *average, SecFilt *secfilt);
    521715
    522716float PhotMstdev (PhotCode *code, Average *average, SecFilt *secfilt);
    523 float PhotM20 (PhotCode *code, Average *average, SecFilt *secfilt);
    524 float PhotM80 (PhotCode *code, Average *average, SecFilt *secfilt);
     717float PhotMmin (PhotCode *code, Average *average, SecFilt *secfilt);
     718float PhotMmax (PhotCode *code, Average *average, SecFilt *secfilt);
    525719float PhotUCdist (PhotCode *code, Average *average, SecFilt *secfilt);
    526720unsigned int PhotStackID (PhotCode *code, Average *average, SecFilt *secfilt);
     
    529723int PhotColor (Average *average, SecFilt *secfilt, Measure *measure, int c1, int c2, double *color);
    530724
    531 float PhotInstTiny (MeasureTiny *measure);
    532 float PhotCatTiny (MeasureTiny *measure);
    533 float PhotAperTiny (MeasureTiny *measure);
    534 float PhotSysTiny (MeasureTiny *measure, AverageTiny *average, SecFilt *secfilt);
    535 float PhotRelTiny (MeasureTiny *measure, AverageTiny *average, SecFilt *secfilt);
    536 float PhotCalTiny (MeasureTiny *thisone, AverageTiny *average, SecFilt *secfilt, MeasureTiny *measure, PhotCode *code);
    537 float PhotAveTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt);
    538 float PhotRefTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt, MeasureTiny *measure);
    539725float PhotXmTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt);
    540726float PhotdMTiny (PhotCode *code, AverageTiny *average, SecFilt *secfilt);
     
    607793/*** conversion functions / I/O conversions ***/
    608794Average *ReadRawAverage (FILE *f, off_t Naverage, char format, SecFilt **primary);
    609 Measure *ReadRawMeasure (FILE *f, off_t Nmeasure, char format);
     795Measure *ReadRawMeasure (FILE *f, Average *average, off_t Nmeasure, char format);
    610796SecFilt *ReadRawSecFilt (FILE *f, off_t Nsecfilt, char format);
    611797int WriteRawAverage (FILE *f, Average *average, off_t Naverage, char format, SecFilt *primary);
    612 int WriteRawMeasure (FILE *f, Measure *measure, off_t Nmeasure, char format);
     798int WriteRawMeasure (FILE *f, Average *average, Measure *measure, off_t Nmeasure, char format);
    613799int WriteRawSecFilt (FILE *f, SecFilt *secfilt, off_t Nsecfilt, char format);
    614800
     
    616802
    617803Average *FtableToAverage (FTable *ftable, off_t *Naverage, char *format, SecFilt **primary);
    618 Measure *FtableToMeasure (FTable *ftable, off_t *Nmeasure, char *format);
     804Measure *FtableToMeasure (FTable *ftable, Average *average, off_t *Nmeasure, char *format);
    619805SecFilt *FtableToSecFilt (FTable *ftable, off_t *Nsecfilt, char *format);
     806Lensing *FtableToLensing (FTable *ftable, off_t *Nlensing, char *format);
     807Lensobj *FtableToLensobj (FTable *ftable, off_t *Nlensobj, char *format);
    620808int      FtableToImage   (FTable *ftable, Header *theader, char *format);
    621809
    622810int AverageToFtable (FTable *ftable, Average *average, off_t Naverage, char format, SecFilt *primary);
    623 int MeasureToFtable (FTable *ftable, Measure *measure, off_t Nmeasure, char format);
     811int MeasureToFtable (FTable *ftable, Average *average, Measure *measure, off_t Nmeasure, char format);
    624812int SecFiltToFtable (FTable *ftable, SecFilt *secfilt, off_t Nsecfilt, char format);
     813int LensingToFtable (FTable *ftable, Lensing *lensing, off_t Nlensing, char format);
     814int LensobjToFtable (FTable *ftable, Lensobj *lensobj, off_t Nlensobj, char format);
    625815int ImageToFtable (FTable *ftable, Header *theader, char format);
    626816int ImageToVtable (VTable *vtable, Header *theader, char format);
     
    637827# include "ps1_v3_defs.h"
    638828# include "ps1_v4_defs.h"
     829# include "ps1_v5_defs.h"
    639830# include "ps1_ref_defs.h"
    640831
     
    696887void sort_coords_index (double *X, double *Y, off_t *S, off_t N);
    697888void sort_coords_indexonly (double *X, double *Y, off_t *S, off_t N);
     889void sort_IDs_indexonly (opihi_int *X, off_t *S, off_t N);
    698890void sort_regions (SkyRegion *region, off_t N);
    699891
     
    716908int free_tiny_values (Catalog *catalog);
    717909
     910BoundaryTree *BoundaryTreeLoad(char *filename);
     911BoundaryTree *BoundaryTreeRead(Header *headerPHU, Header *headerZone, FILE *f);
     912
     913int BoundaryTreeSave(char *filename, BoundaryTree *tree);
     914int BoundaryTreeWrite(FILE *f, BoundaryTree *tree);
     915
    718916int BoundaryTreeCellCoords (BoundaryTree *tree, int *zone, int *band, double ra, double dec);
    719 int BoundaryTreeSave(char *filename, BoundaryTree *tree);
    720 BoundaryTree *BoundaryTreeLoad(char *filename);
    721917int BoundaryTreeProjection (double *x, double *y, double r, double d, BoundaryTree *tree, int zone, int band);
     918
     919TessellationTable *TessellationTableLoad(char *filename, int *Ntess);
     920int TessellationTableSave(char *filename, TessellationTable *tess, int Ntess);
     921int TessellationPrimaryCellIDs (TessellationTable *tess, int Ntess, int *tessID, int *projID, int *skycellID, double ra, double dec);
     922void TessellationTableInit (TessellationTable *tess, int Ntess);
     923
     924float dvoOffsetR (Measure *measure, Average *average);
     925float dvoOffsetD (Measure *measure, Average *average);
     926double dvoMeanR (float dR, Average *average);
     927double dvoMeanD (float dD, Average *average);
    722928
    723929void dvo_average_init (Average *average);
     
    727933void dvo_measureT_init (MeasureTiny *measure);
    728934
     935void dvo_lensing_init (Lensing *lensing);
     936void dvo_lensobj_init (Lensobj *lensobj);
     937
     938void InitRegionHosts (RegionHostInfo *hosts, int Nhosts, int NHOSTS);
     939void FreeRegionHosts (RegionHostInfo *hosts, int Nhosts);
     940void FreeRegionHostTable (RegionHostTable *table);
     941RegionHostTable *RegionHostTableLoad (char *catdir, char *rootname);
     942int RegionHostTableWaitJobs (RegionHostTable *regionHosts, char *file, int lineno);
     943int RegionHostTableWaitJobsGetIO (RegionHostTable *regionHosts, char *file, int lineno, int VERBOSE);
     944int RegionHostFindNeighbors (RegionHostTable *table, int Nhost);
     945
    729946# endif // DVO_H
Note: See TracChangeset for help on using the changeset viewer.