diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-03-05 12:53:09 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-03-05 12:53:09 -0500 |
commit | 832b4b34ff8ce84a13751883c0822c16c152fe48 (patch) | |
tree | edb4d7050c37ade55bc543de80e76e58c4486908 /scripts/idl_obsplot.pl | |
parent | 8f848043369b49e861942ce132181fed2c53c2d3 (diff) | |
download | calfuse-832b4b34ff8ce84a13751883c0822c16c152fe48.tar.gz |
Massive rework
Diffstat (limited to 'scripts/idl_obsplot.pl')
-rwxr-xr-x | scripts/idl_obsplot.pl | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/idl_obsplot.pl b/scripts/idl_obsplot.pl new file mode 100755 index 0000000..1954936 --- /dev/null +++ b/scripts/idl_obsplot.pl @@ -0,0 +1,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 |