IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42853 for trunk/Ohana


Ignore:
Timestamp:
May 9, 2025, 2:17:21 PM (14 months ago)
Author:
eugene
Message:

add options to extract variability information

Location:
trunk/Ohana/src/libdvo
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/include/dvo.h

    r42793 r42853  
    971971unsigned int PhotStackID (PhotCode *code, Average *average, SecFilt *secfilt);
    972972
     973float Phot90PCT (PhotCode *code, Average *average, SecFilt *secfilt);
     974float Phot80PCT (PhotCode *code, Average *average, SecFilt *secfilt);
     975float Phot20PCT (PhotCode *code, Average *average, SecFilt *secfilt);
     976float Phot10PCT (PhotCode *code, Average *average, SecFilt *secfilt);
     977float Phot90PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt);
     978float Phot80PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt);
     979float Phot20PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt);
     980float Phot10PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt);
     981
    973982float PhotColorForCode (Average *average, SecFilt *secfilt, Measure *measure, PhotCode *code);
    974983int PhotColor (Average *average, SecFilt *secfilt, Measure *measure, int c1, int c2, double *color);
  • trunk/Ohana/src/libdvo/include/dvodb.h

    r42821 r42853  
    6060  MAG_OPTION_MIN,
    6161  MAG_OPTION_MAX,
     62
     63  MAG_OPTION_90PCT, // overloaded on MpsfStk
     64  MAG_OPTION_80PCT, // overloaded on FpsfStk
     65  MAG_OPTION_20PCT, // overloaded on MkronStk
     66  MAG_OPTION_10PCT, // overloaded on FkronStk
     67
     68  MAG_OPTION_90PCTSIG, // overloaded on MpsfWrp
     69  MAG_OPTION_80PCTSIG, // overloaded on FpsfWrp
     70  MAG_OPTION_20PCTSIG, // overloaded on MkronWrp
     71  MAG_OPTION_10PCTSIG, // overloaded on FkronWrp
     72
    6273  MAG_OPTION_NCODE,
    6374  MAG_OPTION_NPHOT, // Nused
  • trunk/Ohana/src/libdvo/src/dbExtractAverages.c

    r42102 r42853  
    366366        case MAG_OPTION_MAX:
    367367          value.Flt = PhotMmax (field->photcode, average, secfilt);
     368          break;
     369        case MAG_OPTION_90PCT:
     370          value.Flt = Phot90PCT (field->photcode, average, secfilt);
     371          break;
     372        case MAG_OPTION_80PCT:
     373          value.Flt = Phot80PCT (field->photcode, average, secfilt);
     374          break;
     375        case MAG_OPTION_20PCT:
     376          value.Flt = Phot20PCT (field->photcode, average, secfilt);
     377          break;
     378        case MAG_OPTION_10PCT:
     379          value.Flt = Phot10PCT (field->photcode, average, secfilt);
     380          break;
     381        case MAG_OPTION_90PCTSIG:
     382          value.Flt = Phot90PCT_SIG (field->photcode, average, secfilt);
     383          break;
     384        case MAG_OPTION_80PCTSIG:
     385          value.Flt = Phot80PCT_SIG (field->photcode, average, secfilt);
     386          break;
     387        case MAG_OPTION_20PCTSIG:
     388          value.Flt = Phot20PCT_SIG (field->photcode, average, secfilt);
     389          break;
     390        case MAG_OPTION_10PCTSIG:
     391          value.Flt = Phot10PCT_SIG (field->photcode, average, secfilt);
    368392          break;
    369393        case MAG_OPTION_NCODE: {
  • trunk/Ohana/src/libdvo/src/dbExtractMeasures.c

    r42821 r42853  
    252252        case MAG_OPTION_MIN:        { value.Flt = PhotMmin (equiv, average, secfilt); break;}
    253253        case MAG_OPTION_MAX:        { value.Flt = PhotMmax (equiv, average, secfilt); break;}
     254
     255        case MAG_OPTION_90PCT:      { value.Flt = Phot90PCT (equiv, average, secfilt); break;}
     256        case MAG_OPTION_80PCT:      { value.Flt = Phot80PCT (equiv, average, secfilt); break;}
     257        case MAG_OPTION_20PCT:      { value.Flt = Phot20PCT (equiv, average, secfilt); break;}
     258        case MAG_OPTION_10PCT:      { value.Flt = Phot10PCT (equiv, average, secfilt); break;}
     259
     260        case MAG_OPTION_90PCTSIG:   { value.Flt = Phot90PCT_SIG (equiv, average, secfilt); break;}
     261        case MAG_OPTION_80PCTSIG:   { value.Flt = Phot80PCT_SIG (equiv, average, secfilt); break;}
     262        case MAG_OPTION_20PCTSIG:   { value.Flt = Phot20PCT_SIG (equiv, average, secfilt); break;}
     263        case MAG_OPTION_10PCTSIG:   { value.Flt = Phot10PCT_SIG (equiv, average, secfilt); break;}
     264
    254265        case MAG_OPTION_NCODE:      { value.Int = PhotNcode (equiv, average, secfilt); break; }
    255266        case MAG_OPTION_NPHOT:      { value.Int = PhotNphot (equiv, average, secfilt, field->magClass, field->magSource); break; }
  • trunk/Ohana/src/libdvo/src/dbFields.c

    r42389 r42853  
    251251  if (!strcasecmp (string, "min"))           return MAG_OPTION_MIN;
    252252  if (!strcasecmp (string, "max"))           return MAG_OPTION_MAX;
     253
     254  if (!strcasecmp (string, "pct90"))         return MAG_OPTION_90PCT;
     255  if (!strcasecmp (string, "pct80"))         return MAG_OPTION_80PCT;
     256  if (!strcasecmp (string, "pct20"))         return MAG_OPTION_20PCT;
     257  if (!strcasecmp (string, "pct10"))         return MAG_OPTION_10PCT;
     258
     259  if (!strcasecmp (string, "pct90sig"))      return MAG_OPTION_90PCTSIG;
     260  if (!strcasecmp (string, "pct80sig"))      return MAG_OPTION_80PCTSIG;
     261  if (!strcasecmp (string, "pct20sig"))      return MAG_OPTION_20PCTSIG;
     262  if (!strcasecmp (string, "pct10sig"))      return MAG_OPTION_10PCTSIG;
     263
    253264  if (!strcasecmp (string, "ncode"))         return MAG_OPTION_NCODE;
    254265  if (!strcasecmp (string, "nphot"))         return MAG_OPTION_NPHOT;
     
    767778  field->name  = strcreate (fieldName);
    768779
     780  // XXX can we just replace the : with _ ?
     781  // XXX not for now: this will break old scripts using mag:ave as the vector name
     782  // for (j = 0; field->name[j]; j++) {
     783  //   if (field->name[j] == ':') field->name[j] = ' ';
     784  // }
     785
    769786  // if either GLON or GLAT is requested, we set up a static tranformation
    770787  // at prepare to calculate the values only once for each row
  • trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c

    r42102 r42853  
    984984  Mmax  = (Ns == -1) ? NAN : secfilt[Ns].Mmax;
    985985  return (Mmax);
     986}
     987
     988float Phot90PCT (PhotCode *code, Average *average, SecFilt *secfilt) {
     989  OHANA_UNUSED_PARAM(average);
     990
     991  int Ns;
     992  float value;
     993
     994  if (code == NULL) return NAN;
     995
     996  Ns = photcodes[0].hashNsec[code[0].code];
     997  value = (Ns == -1) ? NAN : secfilt[Ns].MpsfStk;
     998  return value;
     999}
     1000
     1001float Phot80PCT (PhotCode *code, Average *average, SecFilt *secfilt) {
     1002  OHANA_UNUSED_PARAM(average);
     1003
     1004  int Ns;
     1005  float value;
     1006
     1007  if (code == NULL) return NAN;
     1008
     1009  Ns = photcodes[0].hashNsec[code[0].code];
     1010  value = (Ns == -1) ? NAN : secfilt[Ns].FpsfStk;
     1011  return value;
     1012}
     1013
     1014float Phot20PCT (PhotCode *code, Average *average, SecFilt *secfilt) {
     1015  OHANA_UNUSED_PARAM(average);
     1016
     1017  int Ns;
     1018  float value;
     1019
     1020  if (code == NULL) return NAN;
     1021
     1022  Ns = photcodes[0].hashNsec[code[0].code];
     1023  value = (Ns == -1) ? NAN : secfilt[Ns].MkronStk;
     1024  return value;
     1025}
     1026
     1027float Phot10PCT (PhotCode *code, Average *average, SecFilt *secfilt) {
     1028  OHANA_UNUSED_PARAM(average);
     1029
     1030  int Ns;
     1031  float value;
     1032
     1033  if (code == NULL) return NAN;
     1034
     1035  Ns = photcodes[0].hashNsec[code[0].code];
     1036  value = (Ns == -1) ? NAN : secfilt[Ns].FkronStk;
     1037  return value;
     1038}
     1039
     1040float Phot90PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt) {
     1041  OHANA_UNUSED_PARAM(average);
     1042
     1043  int Ns;
     1044  float value;
     1045
     1046  if (code == NULL) return NAN;
     1047
     1048  Ns = photcodes[0].hashNsec[code[0].code];
     1049  value = (Ns == -1) ? NAN : secfilt[Ns].MpsfWrp;
     1050  return value;
     1051}
     1052
     1053float Phot80PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt) {
     1054  OHANA_UNUSED_PARAM(average);
     1055
     1056  int Ns;
     1057  float value;
     1058
     1059  if (code == NULL) return NAN;
     1060
     1061  Ns = photcodes[0].hashNsec[code[0].code];
     1062  value = (Ns == -1) ? NAN : secfilt[Ns].FpsfWrp;
     1063  return value;
     1064}
     1065
     1066float Phot20PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt) {
     1067  OHANA_UNUSED_PARAM(average);
     1068
     1069  int Ns;
     1070  float value;
     1071
     1072  if (code == NULL) return NAN;
     1073
     1074  Ns = photcodes[0].hashNsec[code[0].code];
     1075  value = (Ns == -1) ? NAN : secfilt[Ns].MkronWrp;
     1076  return value;
     1077}
     1078
     1079float Phot10PCT_SIG (PhotCode *code, Average *average, SecFilt *secfilt) {
     1080  OHANA_UNUSED_PARAM(average);
     1081
     1082  int Ns;
     1083  float value;
     1084
     1085  if (code == NULL) return NAN;
     1086
     1087  Ns = photcodes[0].hashNsec[code[0].code];
     1088  value = (Ns == -1) ? NAN : secfilt[Ns].FkronWrp;
     1089  return value;
    9861090}
    9871091
Note: See TracChangeset for help on using the changeset viewer.