Changeset 19278
- Timestamp:
- Aug 28, 2008, 5:35:20 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r19265 r19278 285 285 286 286 exit 0; 287 288 289 # resolve_project()290 # get project specific information291 # This is a placeholder final implementation will use configuration file and database to292 # map from "project" to image database, dvo database, telescope, camera, etc293 #294 # For now just get the database and the class_id that will be used for image lookup295 296 sub resolve_project {297 my $project_name = shift;298 my $img_type = shift;299 my $class_id = shift;300 die "project is not defined" if !$project_name;301 302 # for megacam and simtest since images are at the fpa level, leave out the303 # class_id at the lookup stage304 #305 # TODO: get this information from a database or a configuration file306 307 my $ret_dbname;308 my $ret_class_id;309 my $ret_inst;310 my $ret_magic;311 my $ret_camera;312 313 if ($project_name eq "megacam-mops") {314 $ret_dbname = "mops";315 $ret_class_id = "null";316 $ret_camera = "MEGACAM";317 $ret_magic = 0;318 } elsif ($project_name eq "simtest") {319 $ret_dbname = "ps_simtest";320 $ret_class_id = "null";321 $ret_camera = "SIMTEST";322 $ret_magic = 0;323 } elsif ($project_name eq "gpc1") {324 $ret_dbname = "gpc1";325 $ret_class_id = $class_id;326 $ret_camera = "GPC1";327 $ret_magic = 0; # switch this to 1 when we're ready328 } else {329 die "unknown project $project_name";330 }331 332 if (($img_type ne "raw") and ($img_type ne "chip")) {333 # don't need class_id334 $ret_class_id = "";335 }336 337 return ($ret_dbname, $ret_class_id, $ret_camera, $ret_magic);338 }
Note:
See TracChangeset
for help on using the changeset viewer.
