Changeset 24242 for trunk/ppMops/src
- Timestamp:
- May 26, 2009, 1:27:21 PM (17 years ago)
- Location:
- trunk/ppMops
- Files:
-
- 1 added
- 6 edited
-
. (modified) (1 prop)
-
src (modified) (1 prop)
-
src/ppMops.c (modified) (7 diffs)
-
src/ppMops.h (modified) (1 diff)
-
src/ppMopsData.c (modified) (2 diffs)
-
src/ppMopsVersion.c (added)
-
src/ppMopsVersionDefinitions.h.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppMops
-
Property svn:ignore
set to
configure
Makefile.in
config.log
config.status
depcomp
config.guess
config.sub
ltmain.sh
libtool
autom4te.cache
missing
Makefile
aclocal.m4
install-sh
-
Property svn:ignore
set to
-
trunk/ppMops/src
-
Property svn:ignore
set to
Makefile.in
stamp-h1
config.h
config.h.in
ppMopsVersionDefinitions.h
.deps
Makefile
ppMops
-
Property svn:ignore
set to
-
trunk/ppMops/src/ppMops.c
r24241 r24242 1 1 #include <stdio.h> 2 2 #include <pslib.h> 3 4 #include "ppMops.h" 3 5 4 6 int main(int argc, char *argv[]) … … 6 8 if (argc != 4) { 7 9 fprintf(stderr, "Insufficient arguments.\n"); 8 fprintf(stderr, "Usage: %s DETECTIONS ASTROMETRYOUTPUT\n", argv[0]);10 fprintf(stderr, "Usage: %s DETECTIONS ZP OUTPUT\n", argv[0]); 9 11 exit(PS_EXIT_CONFIG_ERROR); 10 12 } … … 21 23 header = psFitsReadHeader(NULL, fits); 22 24 if (!header) { 23 psErrorStackPrint( "Unable to read header");25 psErrorStackPrint(stderr, "Unable to read header"); 24 26 psFitsClose(fits); 25 27 psFree(data); … … 27 29 } 28 30 if (!psFitsMoveExtName(fits, IN_EXTNAME)) { 29 psErrorStackPrint( "Unable to move to extension %s", IN_EXTNAME);31 psErrorStackPrint(stderr, "Unable to move to extension %s", IN_EXTNAME); 30 32 psFitsClose(fits); 31 33 psFree(header); … … 36 38 psFitsClose(fits); 37 39 if (!detections) { 38 psErrorStackPrint( "Unable to read detections");40 psErrorStackPrint(stderr, "Unable to read detections"); 39 41 psFree(data); 40 42 psFree(header); … … 89 91 // Translate the header 90 92 psMetadata *outHeader = psMetadataAlloc(); // Output header 93 ppMopsVersionHeader(outHeader); 91 94 { 92 95 double ra = psMetadataLookupF64(NULL, header, "FPA.RA"); … … 116 119 psMetadataAddF64(outHeader, PS_LIST_TAIL, "FPA_ID", 0, "Exposure identifier", fpaid); 117 120 psMetadataAddS32(outHeader, PS_LIST_TAIL, "OBSCODE", 0, "IAU Observatory code", OBSERVATORY_CODE); 118 psMetadataAddF32(outHeader, PS_LIST_TAIL, "LIMITMAG", 0, "Limiting magnitude", LIMITING_MAG);119 121 psMetadataAddF32(outHeader, PS_LIST_TAIL, "STARPSF", 0, "Stellar PSF (arcsec)", psf); 120 122 121 123 // These are completely fake 124 psMetadataAddF32(outHeader, PS_LIST_TAIL, "LIMITMAG", 0, "Limiting magnitude", 25.0); 122 125 psMetadataAddF32(outHeader, PS_LIST_TAIL, "DE1", 0, "Detection efficiency (FAKE)", 0.0); 123 126 psMetadataAddF32(outHeader, PS_LIST_TAIL, "DE2", 0, "Detection efficiency (FAKE)", 0.0); -
trunk/ppMops/src/ppMops.h
r24241 r24242 19 19 20 20 21 22 /// Return version 23 psString ppMopsVersion(void); 24 25 /// Return source 26 psString ppMopsSource(void); 27 28 /// Return detailed version information 29 psString ppMopsVersionLong(void); 30 31 /// Put version into header 32 bool ppMopsVersionHeader(psMetadata *header); 33 34 /// Print version information 35 void ppMopsVersionPrint(void); 36 37 #endif -
trunk/ppMops/src/ppMopsData.c
r24241 r24242 11 11 { 12 12 psFree(data->detections); 13 psFree(data->astrometry);14 13 psFree(data->output); 15 14 return; … … 22 21 23 22 data->detections = NULL; 24 data-> astrometry = NULL;23 data->zp = NAN; 25 24 data->output = NULL; 26 25 -
trunk/ppMops/src/ppMopsVersionDefinitions.h.in
r24241 r24242 1 #ifndef PP SUB_VERSION_DEFINITIONS_H2 #define PP SUB_VERSION_DEFINITIONS_H1 #ifndef PPMOPS_VERSION_DEFINITIONS_H 2 #define PPMOPS_VERSION_DEFINITIONS_H 3 3 4 #define PP SUB_VERSION @PPSUB_VERSION@ // SVN version5 #define PP SUB_BRANCH @PPSUB_BRANCH@ // SVN branch6 #define PP SUB_SOURCE @PPSUB_SOURCE@ // SVN source4 #define PPMOPS_VERSION @PPMOPS_VERSION@ // SVN version 5 #define PPMOPS_BRANCH @PPMOPS_BRANCH@ // SVN branch 6 #define PPMOPS_SOURCE @PPMOPS_SOURCE@ // SVN source 7 7 8 8 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
