Changeset 36545
- Timestamp:
- Feb 24, 2014, 1:51:48 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140206/Ohana/src
- Files:
-
- 13 edited
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/dvo_convert_PS1_V4.c (modified) (3 diffs)
-
libdvo/src/dvo_tiny_values.c (modified) (2 diffs)
-
relphot/Makefile (modified) (1 diff)
-
relphot/include/relphot.h (modified) (2 diffs)
-
relphot/src/ImageMagIO.c (modified) (1 diff)
-
relphot/src/MeanMagIO.c (modified) (1 diff)
-
relphot/src/StarOps.c (modified) (2 diffs)
-
relphot/src/indexCatalog.c (modified) (3 diffs)
-
relphot/src/launch_region_hosts.c (modified) (3 diffs)
-
relphot/src/relphot_parallel_images.c (modified) (4 diffs)
-
relphot/src/share_image_mags.c (modified) (3 diffs)
-
relphot/src/share_mean_mags.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140206/Ohana/src/libdvo/include/dvo.h
r36533 r36545 416 416 uint32_t flags; 417 417 int catID; 418 int objID; 418 419 int nOwn; 419 420 } AverageTiny; -
branches/eam_branches/ipp-20140206/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c
r36533 r36545 549 549 } 550 550 551 // XXX note that there are 2 bad versions of PS1_V4 : the other one does have have PSF_QF_PERFECT, but has PAD instead 551 552 int gfits_convert_Measure_PS1_V4alt (Measure_PS1_V4alt *data, off_t size, off_t nitems) { 552 553 … … 708 709 # ifdef BYTE_SWAP 709 710 byte = (unsigned char *) data; 710 for (i = 0; i < nitems; i++, byte += 12 9) {711 for (i = 0; i < nitems; i++, byte += 120) { 711 712 /** BYTE SWAP **/ 712 713 SWAP_DBLE (0); // RA … … 754 755 Ncols = ftable[0].header[0].Naxis[0]; 755 756 if (Ncols != 120) { 756 fprintf (stderr, "ERROR: mis-match in table size: width is %d but should be %d bytes\n", Ncols, 1 76);757 fprintf (stderr, "ERROR: mis-match in table size: width is %d but should be %d bytes\n", Ncols, 120); 757 758 return NULL; 758 759 } -
branches/eam_branches/ipp-20140206/Ohana/src/libdvo/src/dvo_tiny_values.c
r35102 r36545 8 8 averageT[0].measureOffset = average[0].measureOffset; 9 9 averageT[0].catID = average[0].catID; 10 averageT[0].objID = average[0].objID; 11 averageT[0].nOwn = -1; 10 12 return; 11 13 } … … 33 35 measureT[0].dYccd = measure[0].dYccd; 34 36 measureT[0].dRsys = measure[0].dRsys; 37 measureT[0].myDet = 0; 35 38 return ; 36 39 } -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/Makefile
r36518 r36545 54 54 $(SRC)/ImageTable.$(ARCH).o \ 55 55 $(SRC)/ImageMagIO.$(ARCH).o \ 56 $(SRC)/syncfile.$(ARCH).o \ 56 57 $(SRC)/share_image_mags.$(ARCH).o \ 57 58 $(SRC)/share_mean_mags.$(ARCH).o \ -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/include/relphot.h
r36535 r36545 477 477 int catID_and_objID_to_seq (int catID, int objID, int *catSeq, off_t *objSeq); 478 478 479 int check_sync_file (char *filename, int nloop); 480 int clear_sync_file (char *filename); 481 int update_sync_file (char *filename, int nloop); 482 char *make_filename (char *dirname, char *hostname, int hostID, char *tailname); 483 479 484 int share_mean_mags (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop); 480 485 int slurp_mean_mags (Catalog *catalog, int Ncatalog, RegionHostTable *regionHosts, int nloop); 481 int check_sync_file (char *hostname, int nloop); 482 int clear_sync_file (char *hostname); 483 int update_sync_file (char *hostname, int nloop); 484 int set_mean_mags (MeanMag *meanmags, Average *average, SecFilt *secfilt, int Nsec); 486 int set_mean_mags (MeanMag *meanmags, AverageTiny *average, SecFilt *secfilt, int Nsec); 485 487 MeanMag *merge_mean_mags (MeanMag *target, int *ntarget, MeanMag *source, int Nsource); 486 488 … … 490 492 int share_image_mags (RegionHostTable *regionHosts, int nloop); 491 493 int slurp_image_mags (RegionHostTable *regionHosts, int nloop); 492 int check_imsync_file (char *hostname, int nloop);493 int update_imsync_file (char *hostname, int nloop);494 int clear_imsync_file (char *hostname);495 494 int set_image_mags (ImageMag *image_mags, Image *image); 496 495 ImageMag *merge_image_mags (ImageMag *target, int *ntarget, ImageMag *source, int Nsource); -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/ImageMagIO.c
r36519 r36545 119 119 gfits_define_bintable_column (&theader, "E", "MCAL_SYSERR", "systematic error", "magnitudes", 1.0, 0.0); 120 120 gfits_define_bintable_column (&theader, "E", "CHISQ", "cal chisq", "unitless", 1.0, 0.0); 121 gfits_define_bintable_column (&theader, " E", "NFIT", "number of fitted stars", "unitless", 1.0, 0.0);122 gfits_define_bintable_column (&theader, " E", "FLAGS", "analysis flags", "unitless", 1.0, 0.0);123 gfits_define_bintable_column (&theader, " E", "UDIST", "distance to ubercal images", "images", 1.0, 0.0);124 gfits_define_bintable_column (&theader, " E", "ID", "image ID", "unitless", 1.0, 0.0);121 gfits_define_bintable_column (&theader, "J", "NFIT", "number of fitted stars", "unitless", 1.0, 0.0); 122 gfits_define_bintable_column (&theader, "J", "FLAGS", "analysis flags", "unitless", 1.0, 0.0); 123 gfits_define_bintable_column (&theader, "J", "UDIST", "distance to ubercal images", "images", 1.0, 0.0); 124 gfits_define_bintable_column (&theader, "J", "ID", "image ID", "unitless", 1.0, 0.0); 125 125 126 126 // generate the output array that carries the data -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/MeanMagIO.c
r36520 r36545 74 74 meanmags[i].catID = catID[i]; 75 75 } 76 fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow);76 fprintf (stderr, "loaded data for %lld objects (* filters)\n", (long long) Nrow); 77 77 78 78 free (M ); -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/StarOps.c
r36535 r36545 917 917 for (j = 0; j < catalog[i].Naverage; j++) { 918 918 int nOwn = 0; 919 int m = catalog[i].average [j].measureOffset;920 for (n = 0; n < catalog[i].average [j].Nmeasure; n++) {919 int m = catalog[i].averageT[j].measureOffset; 920 for (n = 0; n < catalog[i].averageT[j].Nmeasure; n++) { 921 921 if (!catalog[i].measureT[m+n].myDet) continue; 922 922 nOwn ++; … … 925 925 } 926 926 } 927 return TRUE; 928 } 929 930 int dumpObjects (char *filename, Catalog *catalog, int Ncatalog) { 931 932 int i, n; 933 off_t j; 934 935 FILE *ftest = fopen (filename, "w"); 936 937 for (i = 0; i < Ncatalog; i++) { 938 for (j = 0; j < catalog[i].Naverage; j++) { 939 int m = catalog[i].averageT[j].measureOffset; 940 for (n = 0; n < catalog[i].averageT[j].Nmeasure; n++) { 941 fprintf (ftest, "%08x %08x %10.6f %10.6f %3d %1d\n", catalog[i].averageT[j].catID, catalog[i].averageT[j].objID, catalog[i].averageT[j].R, catalog[i].averageT[j].D, catalog[i].averageT[j].Nmeasure, catalog[i].measureT[m+n].myDet); 942 } 943 } 944 } 945 fclose (ftest); 927 946 return TRUE; 928 947 } -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/indexCatalog.c
r36520 r36545 1 1 # include "relphot.h" 2 2 3 static int catIDmax = 0; 3 4 static int *catIDseq = NULL; 5 static int *objIDmax = NULL; 4 6 static int **objIDseq = NULL; 5 7 6 8 int indexCatalogs (Catalog *catalog, int Ncatalog) { 7 9 8 // find the max value of catID9 int catIDmax = 0;10 11 10 int i; 12 11 off_t j; 13 12 13 // find the max value of catID 14 14 for (i = 0; i < Ncatalog; i++) { 15 15 catIDmax = MAX (catalog[i].catID, catIDmax); … … 26 26 } 27 27 28 ALLOCATE (objIDmax, int, Ncatalog); 28 29 ALLOCATE (objIDseq, int *, Ncatalog); 29 30 for (i = 0; i < Ncatalog; i++) { 30 int objIDmax= 0;31 objIDmax[i] = 0; 31 32 for (j = 0; j < catalog[i].Naverage; j++) { 32 objIDmax = MAX (catalog[i].average[j].objID, objIDmax);33 objIDmax[i] = MAX (catalog[i].averageT[j].objID, objIDmax[i]); 33 34 } 34 35 35 ALLOCATE (objIDseq[i], int, objIDmax + 1);36 for (j = 0; j < objIDmax + 1; j++) {36 ALLOCATE (objIDseq[i], int, objIDmax[i] + 1); 37 for (j = 0; j < objIDmax[i] + 1; j++) { 37 38 objIDseq[i][j] = -1; 38 39 } 39 40 40 41 for (j = 0; j < catalog[i].Naverage; j++) { 41 int objID = catalog[i].average [j].objID;42 int objID = catalog[i].averageT[j].objID; 42 43 objIDseq[i][objID] = j; 43 44 } … … 48 49 int catID_and_objID_to_seq (int catID, int objID, int *catSeq, off_t *objSeq) { 49 50 51 if (catID > catIDmax) return FALSE; 52 50 53 int cat = catIDseq[catID]; 51 54 if (cat < 1) return FALSE; 55 56 if (objID > objIDmax[cat]) return FALSE; 52 57 53 58 int obj = objIDseq[cat][objID]; -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/launch_region_hosts.c
r36530 r36545 19 19 20 20 int i; 21 22 // clear the I/O files 23 for (i = 0; i < regionHosts->Nhosts; i++) { 24 char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync"); 25 truncate (syncfile, 0); 26 free (syncfile); 27 28 char *fitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.fits"); 29 truncate (fitsfile, 0); 30 free (fitsfile); 31 32 char *imsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync"); 33 truncate (imsyncfile, 0); 34 free (imsyncfile); 35 36 char *imfitsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.fits"); 37 truncate (imfitsfile, 0); 38 free (imfitsfile); 39 40 char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "loop.sync"); 41 truncate (loopsyncfile, 0); 42 free (loopsyncfile); 43 } 21 44 22 45 for (i = 0; i < regionHosts->Nhosts; i++) { … … 48 71 fprintf (stderr, "command: %s\n", command); 49 72 73 if (PARALLEL_MANUAL) continue; 74 50 75 // launch the job on the remote machine (no handshake) 51 76 int errorInfo = 0; … … 58 83 } 59 84 60 // XXX probably need an alternate function here... 61 RegionHostTableWaitJobs (regionHosts, __FILE__, __LINE__); 85 if (PARALLEL_MANUAL) { 86 fprintf (stderr, "run the relphot_client commands above. when these are done, hit return\n"); 87 getchar(); 88 } else { 89 RegionHostTableWaitJobs (regionHosts, __FILE__, __LINE__); 90 } 62 91 63 92 return TRUE; -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/relphot_parallel_images.c
r36519 r36545 9 9 * update the unowned objects for owned detections 10 10 */ 11 12 int dumpObjects (char *filename, Catalog *catalog, int Ncatalog); 11 13 12 14 int relphot_parallel_images () { … … 27 29 exit (2); 28 30 } 31 32 // XXX need to deal with mosaic vs image... 33 // initMosaics (image, Nimage...) 34 35 initImages (image, NULL, Nimage); 29 36 30 37 // load the flat correction table (if defined) … … 56 63 findMosaics (catalog, Ncatalog, TRUE); /* also sets Grid values */ 57 64 MARKTIME("-- set up mosaic indexes: %f sec\n", dtime); 65 66 // dumpObjects ("test.obj.dat", catalog, Ncatalog); 58 67 59 68 markObjects (catalog, Ncatalog); … … 104 113 } 105 114 115 // this is a checkpoint to make sure all hosts have finished the loop above 116 int myHost = regionHosts->index[REGION_HOST_ID]; 117 char *loopsyncfile = make_filename (CATDIR, regionHosts->hosts[myHost].hostname, REGION_HOST_ID, "loop.sync"); 118 update_sync_file (loopsyncfile, 0); 119 free (loopsyncfile); 120 121 for (i = 0; i < regionHosts->Nhosts; i++) { 122 if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue; 123 char *loopsync = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "loop.sync"); 124 check_sync_file (loopsync, 0); 125 free (loopsync); 126 } 127 106 128 /* set Mcal & Mmos for bad images */ 107 129 setMcal (catalog, TRUE, flatcorr); -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_image_mags.c
r36520 r36545 29 29 char *hostname = regionHosts->hosts[myHost].hostname; 30 30 31 char filename[1024];32 snprintf (filename, 1024, "%s/%s.imagemags.fits", CATDIR, hostname);33 ImageMagSave (filename, image_mags, Nimage_mags);31 char *imagfile = make_filename (CATDIR, hostname, REGION_HOST_ID, "imagemags.fits"); 32 ImageMagSave (imagfile, image_mags, Nimage_mags); 33 free (imagfile); 34 34 35 update_imsync_file (hostname, nloop); 35 char *syncfile = make_filename (CATDIR, hostname, REGION_HOST_ID, "imagemags.sync"); 36 update_sync_file (syncfile, nloop); 37 free (syncfile); 36 38 37 39 return TRUE; … … 47 49 ALLOCATE (image_mags, ImageMag, 1); 48 50 51 fprintf (stderr, "grabbing image mags from other hosts...\n"); 52 49 53 for (i = 0; i < regionHosts->Nhosts; i++) { 50 54 if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue; 51 55 // XXX add neighbor check? : if (not_neighbor(host[i])) continue; 52 56 53 check_imsync_file (regionHosts->hosts[i].hostname, nloop); 57 char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.sync"); 58 check_sync_file (syncfile, nloop); 59 free (syncfile); 54 60 55 char filename[1024];56 snprintf (filename, 1024, "%s/%s.imagemags.fits", CATDIR, regionHosts->hosts[i].hostname);57 58 61 off_t Nsubset; 59 ImageMag *image_mags_subset = ImageMagLoad (regionHosts->hosts[i].hostname, &Nsubset); 62 char *imagfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "imagemags.fits"); 63 ImageMag *image_mags_subset = ImageMagLoad (imagfile, &Nsubset); 64 free (imagfile); 60 65 61 66 image_mags = merge_image_mags (image_mags, &Nimage_mags, image_mags_subset, Nsubset); … … 76 81 images[seq].ubercalDist = image_mags[i].ubercalDist; 77 82 } 78 return TRUE;79 }80 83 81 # define MSG_LENGTH 11 82 83 int check_imsync_file (char *hostname, int nloop) { 84 85 char message[MSG_LENGTH]; 86 char filename[1024]; 87 sprintf (filename, "%s/%s.image.sync", CATDIR, hostname); 88 89 FILE *f = NULL; 90 91 while (TRUE) { 92 93 f = fopen (filename, "r"); 94 if (!f) { 95 usleep (2000000); 96 continue; 97 } 98 99 int Nread = fread (message, MSG_LENGTH, 1, f); 100 if (Nread < MSG_LENGTH) { 101 fclose (f); 102 usleep (2000000); 103 continue; 104 } 105 fclose (f); 106 107 // message is of the form: NLOOP: %03d 108 int loop; 109 sscanf (message, "%*s %d", &loop); 110 if (loop != nloop) { 111 usleep (2000000); 112 continue; 113 } 114 return TRUE; 115 } 116 return FALSE; 117 } 118 119 int update_imsync_file (char *hostname, int nloop) { 120 121 char message[MSG_LENGTH]; 122 char filename[1024]; 123 sprintf (filename, "%s/%s.image.sync", CATDIR, hostname); 124 125 FILE *f = fopen (filename, "w"); 126 snprintf (message, 11, "NLOOP: %03d\n", nloop); 127 128 int Nwrite = fwrite (message, MSG_LENGTH, 1, f); 129 if (Nwrite != MSG_LENGTH) { 130 fprintf (stderr, "failure to write sync message\n"); 131 exit (3); 132 } 133 134 fclose (f); 135 return TRUE; 136 } 137 138 int clear_imsync_file (char *hostname) { 139 140 char filename[1024]; 141 sprintf (filename, "%s/%s.image.sync", CATDIR, hostname); 142 143 // delete file contents 144 truncate (filename, 0); 84 fprintf (stderr, "DONE grabbing image mags from other hosts"); 145 85 146 86 return TRUE; -
branches/eam_branches/ipp-20140206/Ohana/src/relphot/src/share_mean_mags.c
r36520 r36545 1 1 # include "relphot.h" 2 3 2 // we are sharing mean mags for all objects which (a) I own and (b) which have unowned detections 4 3 … … 23 22 24 23 // do I own this object? (in region range?) 25 if (catalog[i].average [j].R < UserPatch.Rmin) continue;26 if (catalog[i].average [j].R >= UserPatch.Rmax) continue;27 if (catalog[i].average [j].D < UserPatch.Dmin) continue;28 if (catalog[i].average [j].D >= UserPatch.Dmax) continue;24 if (catalog[i].averageT[j].R < UserPatch.Rmin) continue; 25 if (catalog[i].averageT[j].R >= UserPatch.Rmax) continue; 26 if (catalog[i].averageT[j].D < UserPatch.Dmin) continue; 27 if (catalog[i].averageT[j].D >= UserPatch.Dmax) continue; 29 28 30 29 // does this object have missing detections (does someone else need it?) 31 30 // XXX : sky objects without missing detections 32 31 // XXX watch out for detections which are not associated with an image (REF) 33 if (catalog[i].averageT[j].nOwn != catalog[i].averageT[j].Nmeasure) continue;32 if (catalog[i].averageT[j].nOwn == catalog[i].averageT[j].Nmeasure) continue; 34 33 35 34 for (Ns = 0; Ns < Nphotcodes; Ns++) { 36 35 int thisCode = photcodes[Ns][0].code; 37 36 int Nsec = GetPhotcodeNsec(thisCode); 38 set_mean_mags (&meanmags[Nmeanmags], &catalog[i].average [j], &catalog[i].secfilt[Nsecfilt*j + Nsec], Nsec);37 set_mean_mags (&meanmags[Nmeanmags], &catalog[i].averageT[j], &catalog[i].secfilt[Nsecfilt*j + Nsec], Nsec); 39 38 Nmeanmags ++; 40 39 CHECK_REALLOCATE (meanmags, MeanMag, NMEANMAGS, Nmeanmags, D_NMEANMAGS); … … 47 46 char *hostname = regionHosts->hosts[myHost].hostname; 48 47 49 char filename[1024];50 snprintf (filename, 1024, "%s/%s.meanmags.fits", CATDIR, hostname);51 MeanMagSave (filename, meanmags, Nmeanmags);48 char *magsfile = make_filename (CATDIR, hostname, REGION_HOST_ID, "meanmags.fits"); 49 MeanMagSave (magsfile, meanmags, Nmeanmags); 50 free (magsfile); 52 51 53 update_sync_file (hostname, nloop); 52 char *syncfile = make_filename (CATDIR, hostname, REGION_HOST_ID, "meanmags.sync"); 53 update_sync_file (syncfile, nloop); 54 free (syncfile); 54 55 55 56 return TRUE; … … 64 65 ALLOCATE (meanmags, MeanMag, 1); 65 66 67 fprintf (stderr, "grabbing mean object mags from other hosts...\n"); 68 66 69 int Nsecfilt = GetPhotcodeNsecfilt(); 67 70 … … 70 73 if (regionHosts->hosts[i].hostID == REGION_HOST_ID) continue; 71 74 72 check_sync_file (regionHosts->hosts[i].hostname, nloop); 75 char *syncfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.sync"); 76 check_sync_file (syncfile, nloop); 77 free (syncfile); 73 78 74 char filename[1024];75 snprintf (filename, 1024, "%s/%s.meanmags.fits", CATDIR, regionHosts->hosts[i].hostname);76 77 79 off_t Nsubset = 0; 78 MeanMag *meanmagsSubset = MeanMagLoad (regionHosts->hosts[i].hostname, &Nsubset); 80 char *magsfile = make_filename (CATDIR, regionHosts->hosts[i].hostname, regionHosts->hosts[i].hostID, "meanmags.fits"); 81 MeanMag *meanmagsSubset = MeanMagLoad (magsfile, &Nsubset); 82 free (magsfile); 79 83 80 84 // merge_mean_mags reallocs meanmags and frees the input meanmagsSubset … … 101 105 catalog[catSeq].secfilt[objSeq*Nsecfilt + Nsec].M = meanmags[i].M; 102 106 } 103 return TRUE;104 }105 107 106 # define MSG_LENGTH 11 107 108 int check_sync_file (char *hostname, int nloop) { 109 110 char message[MSG_LENGTH]; 111 char filename[1024]; 112 sprintf (filename, "%s/%s.meanmags.sync", CATDIR, hostname); 113 114 // XXX I need a rule to generate the filename for each host 115 FILE *f = NULL; 116 117 while (TRUE) { 118 119 f = fopen (filename, "r"); 120 if (!f) { 121 usleep (2000000); 122 continue; 123 } 124 125 // XXX MSG_LENGTH : 0 EOL byte? 126 int Nread = fread (message, MSG_LENGTH, 1, f); 127 if (Nread < MSG_LENGTH) { 128 fclose (f); 129 usleep (2000000); 130 continue; 131 } 132 fclose (f); 133 134 // message is of the form: NLOOP: %03d 135 int loop; 136 sscanf (message, "%*s %d", &loop); 137 if (loop != nloop) { 138 usleep (2000000); 139 continue; 140 } 141 return TRUE; 142 } 143 return FALSE; 144 } 145 146 int clear_sync_file (char *hostname) { 147 148 char filename[1024]; 149 sprintf (filename, "%s/%s.meanmags.sync", CATDIR, hostname); 150 151 // delete file contents 152 truncate (filename, 0); 108 fprintf (stderr, "DONE grabbing mean object mags from other hosts...\n"); 153 109 154 110 return TRUE; 155 111 } 156 112 157 int update_sync_file (char *hostname, int nloop) { 158 159 char message[MSG_LENGTH]; 160 char filename[1024]; 161 sprintf (filename, "%s/%s.meanmags.sync", CATDIR, hostname); 162 163 FILE *f = fopen (filename, "w"); 164 snprintf (message, 11, "NLOOP: %03d\n", nloop); 165 166 int Nwrite = fwrite (message, MSG_LENGTH, 1, f); 167 if (Nwrite != MSG_LENGTH) { 168 fprintf (stderr, "failure to write sync message\n"); 169 exit (3); 170 } 171 172 fclose (f); 173 return TRUE; 174 } 175 176 int set_mean_mags (MeanMag *meanmags, Average *average, SecFilt *secfilt, int Nsec) { 113 int set_mean_mags (MeanMag *meanmags, AverageTiny *average, SecFilt *secfilt, int Nsec) { 177 114 178 115 meanmags->M = secfilt->M;
Note:
See TracChangeset
for help on using the changeset viewer.
