Changeset 35599
- Timestamp:
- May 27, 2013, 2:31:32 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130509/Ohana/src/addstar
- Files:
-
- 4 edited
-
src/SEDops.c (modified) (2 diffs)
-
src/airmass.c (modified) (2 diffs)
-
src/mkcmf.c (modified) (3 diffs)
-
test/relphot.dvo (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/SEDops.c
r16040 r35599 86 86 int SEDfitInit (SEDtable *table) { 87 87 88 Xgraph = K iiOpen ("kapa", "sedstar");88 Xgraph = KapaOpen ("kapa", "sedstar"); 89 89 KapaInitGraph (&graphdata); 90 90 SetLimitsRaw (table[0].wavecode, NULL, table[0].Nfilter, &graphdata); … … 114 114 free (fitmags); 115 115 free (fiterrs); 116 K iiClose (Xgraph);116 KapaClose (Xgraph); 117 117 return (TRUE); 118 118 } -
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/airmass.c
r21508 r35599 6 6 AirmassQuality = quality; 7 7 } 8 9 static int Nbad_airmass = 0; 8 10 9 11 float airmass (float secz_image, double ra, double dec, double st, double latitude) { … … 23 25 cosz = sin (rdec) * sin (rlat) + cos (rdec) * cos (RAD_DEG*hour) * cos (rlat); 24 26 secz = 1.000 / cosz; 27 28 if (!isfinite(secz)) { 29 Nbad_airmass ++; 30 } 31 if (Nbad_airmass > 1) { 32 fprintf (stderr, "*** WARNING *** NaN airmass for detection\n"); 33 fprintf (stderr, "*** ra, dec : %f, %f | st : %f | lat : %f | cosz : %f\n", ra, dec, st, latitude, cosz); 34 } 35 if (Nbad_airmass > 10) { 36 fprintf (stderr, "*** ERROR *** more than 10 NaN airmass values for detections, giving up\n"); 37 fprintf (stderr, " (use -quick-airmass to use image airmass)\n"); 38 exit (2); 39 } 40 25 41 return (secz); 26 42 } -
branches/eam_branches/ipp-20130509/Ohana/src/addstar/src/mkcmf.c
r35108 r35599 184 184 } 185 185 186 // init the random seed 187 { 188 struct timeval now; 189 gettimeofday (&now, NULL); 190 long A = now.tv_sec + now.tv_usec * 1000000; 191 srand48(A); 192 } 193 186 194 /* bore site center guess */ 187 195 strcpy (coords.ctype, "DEC--TAN"); … … 379 387 380 388 int i; 381 long A, B;382 389 double val, x, dx, dx1, dx2, dx3, df; 383 390 double mean, sigma; … … 386 393 if (Ngaussint == Nbin) return; 387 394 388 A = time(NULL);389 // XXX this is expensive if called a lot (1 sec min)390 // for (B = 0; A == time(NULL); B++);391 B = A + 10000;392 srand48(B);395 // A = time(NULL); 396 // // XXX this is expensive if called a lot (1 sec min) 397 // // for (B = 0; A == time(NULL); B++); 398 // B = A + 10000; 399 // srand48(B); 393 400 394 401 Ngaussint = Nbin; -
branches/eam_branches/ipp-20130509/Ohana/src/addstar/test/relphot.dvo
r27582 r35599 38 38 mkinput $offset:$i 39 39 exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 40 exec addstar -D CATDIR catdir.test -D CAMERA simtest test.cmf -D CATFORMAT $2 40 exec addstar -D CATDIR catdir.test -D CAMERA simtest test.cmf -D CATFORMAT $2 -quick-airmass 41 41 end 42 42 43 echo relphot -D CATDIR catdir.test r -region {$RA-1.0} {$RA+1.0} {$DEC-1.0} {$DEC+1.0} -update -nloop 10.0 43 44 exec relphot -D CATDIR catdir.test r -region {$RA-1.0} {$RA+1.0} {$DEC-1.0} {$DEC+1.0} -update -nloop 10.0 >& /dev/null 44 45 … … 52 53 end 53 54 54 exec rm test.cmf test.in.txt55 exec rm -r catdir.test55 #exec rm test.cmf test.in.txt 56 #exec rm -r catdir.test 56 57 57 58 tapDONE
Note:
See TracChangeset
for help on using the changeset viewer.
