Changeset 23540
- Timestamp:
- Mar 25, 2009, 6:55:57 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/register_imfile.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/register_imfile.pl
r23501 r23540 112 112 113 113 # we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type 114 if (uc(&value_for_flag ($cmdflags, " -telescope")) == 0) { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }115 if (uc(&value_for_flag ($cmdflags, " -inst")) == 0) { &my_die ("inst not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }116 if (uc(&value_for_flag ($cmdflags, " -filelevel")) == 0) { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }117 if (uc(&value_for_flag ($cmdflags, " -class_id")) == 0) { &my_die ("class_id not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }118 if (uc(&value_for_flag ($cmdflags, " -exp_type")) == 0) { &my_die ("exp_type not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }114 if (uc(&value_for_flag ($cmdflags, "NULL", "-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); } 115 if (uc(&value_for_flag ($cmdflags, "NULL", "-inst")) eq "NULL") { &my_die ("inst not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); } 116 if (uc(&value_for_flag ($cmdflags, "NULL", "-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); } 117 if (uc(&value_for_flag ($cmdflags, "NULL", "-class_id")) eq "NULL") { &my_die ("class_id not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); } 118 if (uc(&value_for_flag ($cmdflags, "NULL", "-exp_type")) eq "NULL") { &my_die ("exp_type not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); } 119 119 120 120 my $command = "$regtool -addprocessedimfile"; … … 128 128 129 129 # determine solar-system parameters 130 my $longitude = &value_for_flag($cmdflags, "-longitude");131 my $latitude = &value_for_flag($cmdflags, "-latitude");132 my $elevation = &value_for_flag($cmdflags, "-elevation");133 my $ra = &value_for_flag($cmdflags, "-ra");134 my $dec = &value_for_flag($cmdflags, "-decl");135 my $dateobs = &value_for_flag($cmdflags, "-dateobs");130 my $longitude = &value_for_flag($cmdflags, 0.0, "-longitude"); 131 my $latitude = &value_for_flag($cmdflags, 0.0, "-latitude"); 132 my $elevation = &value_for_flag($cmdflags, 0.0, "-elevation"); 133 my $ra = &value_for_flag($cmdflags, 0.0, "-ra"); 134 my $dec = &value_for_flag($cmdflags, 0.0, "-decl"); 135 my $dateobs = &value_for_flag($cmdflags, 0.0, "-dateobs"); 136 136 137 137 # if the needed data is available, pass it to sunmoon: … … 193 193 { 194 194 my $cmdflags = shift; 195 my $default = shift; 195 196 my $flag = shift; 196 197 197 my $value = 0.0;198 my $value = $default; 198 199 if ($cmdflags =~ m|$flag|) { 199 200 ($value) = $cmdflags =~ m|$flag\s+(\S+)|;
Note:
See TracChangeset
for help on using the changeset viewer.
