IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2015, 12:29:24 PM (12 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-pv3-20140717-merge/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pv3-20140717-merge/Ohana

  • branches/eam_branches/ipp-pv3-20140717-merge/Ohana/src/libohana/include/ohana.h

    r37033 r37822  
    192192
    193193# ifndef isfinite
    194 # define isfinite(A) (!isnan(A))
     194# define isfinite(A) (!isnan(A) && !isinf(A))
    195195# endif
    196196
     
    242242// sorting is now defined as a macro call
    243243# include <ohana_sort.h>
     244
     245// vector statistics options
     246typedef enum {
     247  VSTATS_NONE,
     248  VSTATS_MEAN,
     249  VSTATS_MEDIAN,
     250  VSTATS_WT_MEAN,
     251  VSTATS_INNER_MEAN,
     252  VSTATS_INNER_WTMEAN,
     253  VSTATS_CHI_INNER_MEAN,
     254  VSTATS_CHI_INNER_WTMEAN
     255} VStatsMode;
     256
     257typedef struct {
     258  double median;
     259  double mean;
     260  double sigma;
     261  double error;
     262  double chisq;
     263  double min;
     264  double max;
     265  double Upper80;
     266  double Lower20;
     267  double total;
     268  int    Nmeas;
     269  VStatsMode statmode;
     270} VStatsType;
    244271
    245272/* socket / pipe communication buffer */
     
    314341char   *ohana_version          PROTO((void));
    315342
     343int     dgaussjordan_pivot     PROTO((double **A, double **B, int N, int M, double minPivot));
    316344int     dgaussjordan           PROTO((double **A, double **B, int N, int M));
    317345int     fgaussjordan           PROTO((float **A, float **B, int n, int m));
     
    388416int rconnect (char *command, char *hostname, char *shell, int *stdio, int *errorInfo, int doHandshake);
    389417
     418int vstats_setmode (VStatsType *stats, char *mode);
     419int vstats_getstats (double *value, double *dvalue, double *weight, int N, VStatsType *stats);
     420int vstats_getstats_f (float *value, float *dvalue, float *weight, int N, VStatsType *stats);
     421
    390422/*
    391423#   define F_SETFL         4   
     
    404436*/
    405437
    406 # endif
     438
     439/** gsl-based functions for legendre and related polynomials **/
     440
     441double ohana_gsl_sf_log_1plusx (double x, double *err);
     442double ohana_gsl_sf_lnpoch(const double a, const double x, double *err);
     443double ohana_gsl_lnpoch_pos (const double a, const double x, double *err);
     444double ohana_gsl_pochrel_smallx(const double a, const double x, double *err);
     445
     446double legendre_Pl (int l, double x, double *err);
     447double legendre_Plm (int l, int m, double x, double *err);
     448double legendre_Plm_sphere(int l, int m, double x, double *err);
     449
     450typedef struct {
     451  double *Fr;
     452  double *Fi;
     453  int    *l;
     454  int    *m;
     455  int lmax;
     456  int Nterms;
     457} SHterms;
     458
     459SHterms *SHtermsInit (int lmax);
     460void SHtermsFree (SHterms *terms);
     461void SHtermsForRD (SHterms *terms, double R, double D);
     462void SHtermsForLM (SHterms *terms, double R, double D, int l, int m);
     463
     464typedef struct {
     465  double *dR_B;
     466  double *dR_E;
     467  double *dD_B;
     468  double *dD_E;
     469  int    *l;
     470  int    *m;
     471  int lmax;
     472  int Nterms;
     473} VSHterms;
     474
     475VSHterms *VSHtermsInit (int lmax);
     476void VSHtermsFree (VSHterms *terms);
     477void VSHtermsForRD (VSHterms *terms, double R, double D);
     478void VSHtermsForLM (VSHterms *terms, double R, double D, int l, int m);
     479
     480# endif
Note: See TracChangeset for help on using the changeset viewer.