Changeset 27379 for branches/eam_branches/largefiles.20100314/Ohana
- Timestamp:
- Mar 21, 2010, 6:04:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/largefiles.20100314/Ohana/src/addstar/src/mkcmf.c
r20936 r27379 56 56 } 57 57 58 // add support for all cmf types 59 static char *type = "PS1_V1"; 60 if ((N = get_argument (argc, argv, "-type"))) { 61 remove_argument (N, &argc, argv); 62 type = strcreate (argv[N]); 63 remove_argument (N, &argc, argv); 64 } 65 58 66 if (argc != 3) { 59 fprintf (stderr, "USAGE mkcmf (input) (output) [-date date] [-time time] [-radec ra dec] \n");67 fprintf (stderr, "USAGE mkcmf (input) (output) [-date date] [-time time] [-radec ra dec] [-cmftype type]\n"); 60 68 exit (2); 61 69 } … … 86 94 87 95 // XXX add gaussian-distributed noise based on counts 96 // this needs to make different output 'stars' entries depending on the desired type 88 97 ALLOCATE (stars, PS1_DEV_1, Nstars); 89 98 gauss_init (2048); … … 162 171 163 172 ftable.header = &theader; 164 gfits_table_set_PS1_DEV_1 (&ftable, stars, Nstars); 173 174 // set up desired CMF type: 175 found = FALSE; 176 if (!strcmp(type, "PS1_DEV_0")) { 177 gfits_table_set_PS1_DEV_1 (&ftable, stars, Nstars); 178 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_DEV_0"); 179 found = TRUE; 180 } 181 if (!strcmp(type, "PS1_DEV_1")) { 182 gfits_table_set_PS1_DEV_1 (&ftable, stars, Nstars); 183 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_DEV_1"); 184 found = TRUE; 185 } 186 if (!strcmp(type, "PS1_V1")) { 187 gfits_table_set_PS1_V1 (&ftable, stars, Nstars); 188 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_V1"); 189 found = TRUE; 190 } 191 if (!strcmp(type, "PS1_V2")) { 192 gfits_table_set_PS1_V2 (&ftable, stars, Nstars); 193 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_V2"); 194 found = TRUE; 195 } 196 if (!found) { 197 fprintf (stderr, "ERROR: unknown CMF type %s\n", type); 198 exit (1); 199 } 200 201 gfits_modify (&theader, "EXTHEAD", "%s", 1, "Chip.hdr"); 165 202 gfits_modify (&theader, "EXTNAME", "%s", 1, "Chip.psf"); 166 gfits_modify (&theader, "EXTTYPE", "%s", 1, "PS1_DEV_1");167 gfits_modify (&theader, "EXTHEAD", "%s", 1, "Chip.hdr");168 203 169 204 fits = fopen (argv[2], "w");
Note:
See TracChangeset
for help on using the changeset viewer.
