blob: 1954936a33c6b18a77d056fcd6882f28015d0694 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/usr/bin/env perl
use FileHandle;
# ******************************************************
# idlplot_corr.pl
#
# This Perl module will run the idl script "cf_obsplot.pro"
#
# Author: Van Dixon
#
# History: Written July 3, 2001
#
# 10/20/05 wvd Add call to .run cf_obsplot.pro
# 11/21/06 wvd Add process ID ($$) to name of
# batch file.
# 08/08/08 wvd Add airglow argument for 900+
# files.
#
# ******************************************************
if (@ARGV == 0) {
print "You must enter the rootname of the observation.\n";
print "Exiting.\n";
} else {
$batch_filename = $ARGV[0] . $$."_idl.bat";
# Open the output batch file.
open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
print BAT_OUTFILE ".run cf_obsplot.pro\n";
if (@ARGV == 2) {
print BAT_OUTFILE "cf_obsplot,'" . $ARGV[0] . "', airglow=1\n";
} else {
print BAT_OUTFILE "cf_obsplot,'" . $ARGV[0] . "'\n";
}
print BAT_OUTFILE "exit\n";
close (BAT_OUTFILE);
system("idl $batch_filename > /dev/null");
system("rm $batch_filename");
}
### end of Perl script
|