IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 14, 2005, 12:46:02 PM (21 years ago)
Author:
eugene
Message:

adding mosaic astrometry support and smp-fits files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/mosastro/src/output.c

    r3401 r3416  
    44
    55  int i, N;
    6   char *p;
    7   char outname[256];
     6  char *p, outname[256];
     7  FILE *f;
     8  Header *header;
    89 
    910  for (i = 0; i < Nchip; i++) {
     
    2627  }
    2728
    28   {
     29  field_combine ();
    2930
    30     Header *header;
    31     FILE *f;
    32    
    33     field_combine ();
    34 
    35     f = fopen (phu, "w");
    36     if (f == (FILE *) NULL) {
    37       fprintf (stderr, "ERROR: can't create output file %s\n", phu);
    38       exit (1);
    39     }
    40 
    41     header = mkmosaic (1, 1, 0, &field.project);
    42     fwrite (header[0].buffer, 1, header[0].size, f);
    43     fclose (f);
     31  f = fopen (phu, "w");
     32  if (f == (FILE *) NULL) {
     33    fprintf (stderr, "ERROR: can't create output file %s\n", phu);
     34    exit (1);
    4435  }
    4536
    46   {
    47 
    48     FILE *f;
    49     double R, D;
    50 
    51     fprintf (stderr, "starting test.dat\n");
    52     f = fopen ("test.dat", "w");
    53     if (f == (FILE *) NULL) {
    54       fprintf (stderr, "ERROR: can't create output file \n");
    55       exit (1);
    56     }
    57 
    58     RegisterMosaic (&field.project);
    59     for (i = 0; i < chip[0].Nmatch; i++) {
    60       XY_to_RD (&R, &D, chip[0].raw[i].X, chip[0].raw[i].Y, &chip[0].map);
    61       fprintf (f, "%4d  %10.6f %10.6f  %8.2f %8.2f\n",
    62                i, R, D, chip[0].raw[i].X, chip[0].raw[i].Y);
    63     }
    64     fclose (f);
    65   }
    66  
     37  header = mkmosaic (1, 1, 0, &field.project);
     38  fwrite (header[0].buffer, 1, header[0].size, f);
     39  fclose (f);
    6740}
Note: See TracChangeset for help on using the changeset viewer.