Index: trunk/psastro/src/psastroLoadRefstars.c
===================================================================
--- trunk/psastro/src/psastroLoadRefstars.c	(revision 39926)
+++ trunk/psastro/src/psastroLoadRefstars.c	(revision 42840)
@@ -139,4 +139,19 @@
     psStringAppend (&getstarCommand, " -region %f %f %f %f -o %s", RAmin, DECmin, RAmax, DECmax, tempFile);
     psTrace ("psastro", 3, "%s\n", getstarCommand);
+
+    // add the MJD for the exposure EPOCH
+    bool ProperMotionApply = psMetadataLookupF32 (&status, recipe, "DVO.GETSTAR.PM.APPLY");
+    if (ProperMotionApply) {
+      pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, source); // we've already done this before
+      myAssert (input, "oops");
+
+      psTime *time = psMetadataLookupPtr(NULL, input->fpa->concepts, "FPA.TIME");
+      if (time->sec == 0 && time->nsec == 0) {
+	psError (PM_ERR_CONFIG, false, "Exposure EPOCH proper motion correction requested, but date/time of exposure not found");
+	return false;
+      }
+      psF64 EpochMJD = psTimeToMJD(time);
+      psStringAppend (&getstarCommand, " -epoch-mjd %lf", EpochMJD);
+    }
 
     psLogMsg("psastro", PS_LOG_INFO, "getstar command: %s", getstarCommand);
