aboutsummaryrefslogtreecommitdiff
path: root/scripts/idlplot_spex.pl
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-03-05 12:53:09 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-03-05 12:53:09 -0500
commit832b4b34ff8ce84a13751883c0822c16c152fe48 (patch)
treeedb4d7050c37ade55bc543de80e76e58c4486908 /scripts/idlplot_spex.pl
parent8f848043369b49e861942ce132181fed2c53c2d3 (diff)
downloadcalfuse-832b4b34ff8ce84a13751883c0822c16c152fe48.tar.gz
Massive rework
Diffstat (limited to 'scripts/idlplot_spex.pl')
-rwxr-xr-xscripts/idlplot_spex.pl48
1 files changed, 48 insertions, 0 deletions
diff --git a/scripts/idlplot_spex.pl b/scripts/idlplot_spex.pl
new file mode 100755
index 0000000..701d2f7
--- /dev/null
+++ b/scripts/idlplot_spex.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/env perl
+use FileHandle;
+
+# ***************************************************
+# add_tle.pl
+#
+# This Perl module will read in the latest five orbital elements
+# from the file five.tle (which was created by get_tle.pl) and
+# add any new orbital elements to the file FUSE.TLE. The file
+# FUSE.TLE is in descending order (i.e. the most recent elements
+# are first). In order to prepend the new TLE onto the old list
+# I found it was easiest to store everything in a temporary file
+# TEMP.TLE and rewrite FUSE.TLE.
+#
+# Author: Ed Murphy
+#
+# History: Written July 27, 1999
+# 11/21/06 wvd Add process ID ($$) to name of
+# batch file.
+#
+# ***************************************************
+
+# Define the file names. old_maintle_filename is not actually opened,
+# but is used in a system call at the end of the program.
+
+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 "cf_plot_extract3,'" . $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