IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42269


Ignore:
Timestamp:
Aug 26, 2022, 9:55:12 AM (4 years ago)
Author:
eugene
Message:

add option to supply the desired epoch of the selected reference stars

Location:
tags/ipp-ops-20220705-ippref/Ohana/src/getstar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ops-20220705-ippref/Ohana/src/getstar/include/getstar.h

    r27435 r42269  
    3535PhotCode *photcode;
    3636
     37float EpochMJD;
     38time_t EpochUnix;
     39
    3740int  args                    PROTO((int argc, char **argv));
    3841int  ConfigInit              PROTO((int *argc, char **argv));
  • tags/ipp-ops-20220705-ippref/Ohana/src/getstar/src/args.c

    r34459 r42269  
    3737    VERBOSE = TRUE;
    3838    remove_argument (N, &argc, argv);
     39  }
     40
     41  EpochUnix = 0;
     42  EpochMJD = NAN;
     43  if ((N = get_argument (argc, argv, "-epoch-mjd"))) {
     44    remove_argument (N, &argc, argv);
     45    EpochMJD = atof (argv[N]);
     46    remove_argument (N, &argc, argv);
     47    EpochUnix = ohana_mjd_to_sec (EpochMJD);
    3948  }
    4049
  • tags/ipp-ops-20220705-ippref/Ohana/src/getstar/src/write_getstar_ps1_dev_0.c

    r40291 r42269  
    4545    output[i].R        = average[i].R;
    4646    output[i].D        = average[i].D;
     47    if (isfinite(EpochMJD) && isfinite(average[i].uR) && isfinite(average[i].uD)) {
     48      // RA(epoch) = RA(mean) + uR*(t - Tmean)/cos(dec)
     49      // XXX how does this behave near dec = 90?
     50      // double dT = (EpochUnix - average[i].Tmean) / (86400*365.25);
     51      // XXX refcat 20220324.v0 does not have Tmean correctly set to 2016.0 = MJD 57388.0
     52      // NOTE average[i].Tmean is in UNIX, but here I am using the MJD of the Gaia DR3 reference epoch
     53      double dT = (EpochMJD - 57388.0) / 365.25;
     54      double dR = average[i].uR * dT / cos(RAD_DEG*average[i].D) / 3600.0;
     55      double dD = average[i].uD * dT / 3600.0;
     56      output[i].R += dR;
     57      output[i].D += dD;
     58    }
    4759
    4860    output[i].code     = average[i].flags;
Note: See TracChangeset for help on using the changeset viewer.