From c00chm at cs.umu.se Thu Apr 15 07:07:36 2004
From: c00chm at cs.umu.se (Christian Haggstrom)
Date: Mon Oct 23 17:53:00 2006
Subject: [OpenMadrigal-developers] script to convert postscript plots to png and jpeg
In-Reply-To: <405234C5.2050100@haystack.mit.edu>
References: <405234C5.2050100@haystack.mit.edu>
Message-ID: <20040415110736.GA18129@peppar.cs.umu.se>
Hi Madrigal people,
The plots and images found among the experiments is often in Postscript
format, but it's easier to display them as PNG or JPG in a web browser.
Therefore I have made a python script to convert them on-the-fly using
ghostscript.
Maybe other are interested in that too, so I decided to send it onto this list.
It's not written in the same style as the other python cgi scripts,
but I can rewrite it cleaner you want it included in the CVS.
You can see what it looks like here:
http://www.eiscat.se/madrigal/cgi-bin/madExperiment.cgi?exp=2003%2feis%2f18dec03&displayLevel=0&expTitle=tau8_60
if you come from a trusted IP, you'll see links to the postscript source file
as well.
Attached you will find a patch that can be applied onto $MADROOT.
Suggestions and comments is of course welcome.
--
Christian H?ggstr?m | web maintainer at www.eiscat.com
-------------- next part --------------
Index: MANIFEST
===================================================================
RCS file: /opt/local/MillstoneCVS/OpenMadrigal/madroot/MANIFEST,v
retrieving revision 1.114
diff -u -r1.114 MANIFEST
--- MANIFEST 15 Mar 2004 19:56:25 -0000 1.114
+++ MANIFEST 15 Apr 2004 10:46:46 -0000
@@ -524,6 +524,7 @@
source/madpy/scripts/cgi/getInstrumentsService.py
source/madpy/scripts/cgi/getParametersService.py
source/madpy/scripts/cgi/madCalculatorService.py
+source/madpy/scripts/cgi/getMadplot.py
source/madpy/scripts/bin/rebuildInstParmTab.py
source/madpy/scripts/bin/rebuildInstKindatTab.py
source/madpy/scripts/bin/checkMetadata.py
Index: source/madtcl/cgi/madExperiment.cgi
===================================================================
RCS file: /opt/local/MillstoneCVS/OpenMadrigal/madroot/source/madtcl/cgi/madExperiment.cgi,v
retrieving revision 1.26
diff -u -r1.26 madExperiment.cgi
--- source/madtcl/cgi/madExperiment.cgi 5 Jun 2003 19:24:28 -0000 1.26
+++ source/madtcl/cgi/madExperiment.cgi 15 Apr 2004 10:46:46 -0000
@@ -342,55 +342,23 @@
}
# List graphics files
- set gifList {}; set jpegList {}; set psList {}; set numberColumns 0
- catch { [set gifList [lsort [glob $expPath/*.gif]]] }
- catch { [set jpegList [lsort [glob $expPath/*.jpeg]]] }
- catch { [lappend jpegList [lsort [glob $expPath/*.jpg]]] }
- catch { [set psList [lsort [glob $expPath/*.ps.gz]]] }
- catch { [lappend psList [lsort [glob $expPath/*.ps]]] }
- if { [ llength $gifList ] } { incr numberColumns }
- if { [ llength $jpegList ] } { incr numberColumns }
- if { [ llength $psList ] && $remoteAddress == "internal" } { incr numberColumns }
- if { $numberColumns > 0 } {
+
+ if { $remoteAddress == "internal" } {
+ set listSources 1
+ } else {
+ set listSources 0
+ }
+ catch { exec ./getMadplot.py h $expPath $listSources } cmdOutput
+ if { "$cmdOutput" != "" } {
cgi_table border align=center {
cgi_table_row {
- th colspan=$numberColumns align=center "IMAGES"
- }
- cgi_table_row {
- if { [ llength $gifList ] } { th align=center "GIF files" }
- if { [ llength $jpegList ] } { th align=center "JPEG files" }
- if { [ llength $psList ] && $remoteAddress == "internal" } { th align=center "PostScript files" }
- }
- if { [ llength $gifList ] } {
- cgi_table_data {
- cgi_bullet_list {
- foreach fileEntry $gifList {
- put [cgi_url [ file tail $fileEntry ] $linkPath/[ file tail $fileEntry ] ]
- cgi_br
- }
- }
- }
- }
- if { [ llength $jpegList ] } {
- cgi_table_data {
- cgi_bullet_list {
- foreach fileEntry $jpegList {
- put [cgi_url [ file tail $fileEntry ] $linkPath/[ file tail $fileEntry ] ]
- cgi_br
- }
- }
- }
- }
- if { [ llength $psList ] && $remoteAddress == "internal" } {
- cgi_table_data {
- cgi_bullet_list {
- foreach fileEntry $psList {
- put [cgi_url [ file tail $fileEntry ] $linkPath/[ file tail $fileEntry ] ]
- cgi_br
- }
- }
- }
+ th "IMAGES"
}
+ foreach s [ split $cmdOutput "\n" ] {
+ cgi_table_row {
+ td "$s"
+ }
+ }
}
}
@@ -398,6 +366,8 @@
# List original datasets
set dataList {}
catch { [set dataList [glob $expPath/*sigma.gz]] }
+ catch { [lappend dataList [glob $expPath/*.tar.gz]] }
+ catch { [lappend dataList [glob $expPath/*.tgz]] }
if { [ llength $dataList ] } {
cgi_p [cgi_bold "Original fitted data files"]
cgi_bullet_list {
--- /dev/null Thu Apr 15 12:45:06 2004
+++ source/madpy/scripts/cgi/getMadplot.py Thu Apr 15 12:36:52 2004
@@ -1,0 +1,272 @@
+#!PYTHONEXE
+# list and convert the plots available from madrigal
+#
+# This file should be put in the cgi-bin directory, and the script that
+# displays experiment information should run, for example:
+# ./getMadplot.py h 2003/eis/16dec03
+# HTML links are generated for all images found belonging to that experiment.
+# The links points back to this script, which converts from postscript the
+# the requested fileformat on-the-fly.
+#
+# External programs required: gs, gzip
+
+import sys, os, time
+
+# Import the Madrigal classes
+# check if pythonlibpath env variable exists
+# written 'PYTHON' + 'LIBPATH' to stop automatic replacement during setup
+temp = os.environ.get('PYTHON' + 'LIBPATH')
+if temp: sys.path.append(temp)
+sys.path.append('MADROOT/lib/python')
+
+import madrigal.metadata
+# realpath expands all symbolic links in MADROOT/experiments
+exp_path = os.path.realpath(madrigal.metadata.MadrigalDB().getExperimentDir())
+
+import madrigal.ui.web
+madrigalweb = madrigal.ui.web.MadrigalWeb()
+
+# These seems to be neccesary on www.eiscat.com... ugly
+os.environ['GS_FONTPATH'] = os.environ.get('GS_FONTPATH', '.')+':/usr/openwin/lib/X11/fonts/Type1/outline'
+os.environ['GS_LIB'] = os.environ.get('GS_LIB', '.')+':/usr/openwin/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type3:/usr/local/share/ghostscript/8.00/lib/fonts'
+
+# Here is the table of all known filetypes. It should be easy to add more.
+# Each filetype have a 5-tuple;
+# extension
+# command to convert from postscript data on stdin
+# likewise for compressed postscript. Leave as None to use gzip in combination with above command.
+# Short desctiprion. None here omits it when the filetypes are listed.
+# whether the original file is used. Only IP:s listed in trustedIPs.txt may download these.
+# Set this to False for lossy conversions.
+
+gs_base = "gs -dNOPAUSE -q -sDEVICE=%s -sOutputFile=- -_"
+formats = (
+ # (ext, ps-command, ps.gz-command, desc, orig)
+ (".ps.gz", 'gzip -c', 'cat', 'Gzipped PostScript', True),
+ (".eps.gz", 'gzip -c', 'cat', None, True),
+ (".ps", 'cat', 'gunzip -c', 'PostScript', True),
+ (".eps", 'cat', 'gunzip -c', None, True),
+ (".png", gs_base%'png256 -g580x820',None,'PNG image', False),
+ (".jpg", gs_base%'jpeg -g580x820',None,'JPEG image', False),
+ (".pdf", gs_base%'pdfwrite -sPAPERSIZE=a4',None,'Adobe PDF', False),
+ (".gif", None, None, 'GIF image', False),
+)
+
+script_name = os.path.basename(sys.argv[0])
+
+class error(Exception):
+ "Base class for errors generated in this file"
+ pass
+
+def exist_file(base, ext):
+ path = base+ext
+ if os.path.exists(path):
+ return path
+def exist_ps(base, ext = ''):
+ for ext0 in ('.ps', '.eps'):
+ path = exist_file(base+ext0,ext)
+ if path: return path
+
+def cgi_file():
+ "Get the requested file from the CGI environment"
+ file = os.environ.get('QUERY_STRING') or os.environ['PATH_INFO']
+ if file[0] == '/': file = file[1:]
+ return file
+
+def validate_path(path):
+ "Check the path for evil things like /../ and return a tuple (full_path, last_path)"
+ file = os.path.realpath(os.path.join(exp_path,path))
+ if not file.startswith(exp_path):
+ raise error, "Illegal path"
+ return file, file[len(exp_path)+1:]
+
+english_weekdays = "Mon Tue Wed Thu Fri Sat Sun".split()
+english_months = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split()
+
+def rfc1123(date):
+ "Convert a date to RFC1123 standard, to be used in HTTP headers"
+ date = time.gmtime(date)
+ return "%s, %02d %s %04d %02d:%02d:%02d GMT" % (english_weekdays[date[6]], date[2], english_months[date[1] - 1], date[0], date[3], date[4], date[5])
+
+def process(file):
+ file, _ = validate_path(file)
+ req_file = os.path.basename(file)
+ for ext, cmd, cmd_gz, desc, source in formats:
+ if file.endswith(ext):
+ break
+ else:
+ raise error, "Extension not supported"
+ if not isTrusted and source:
+ raise error, "You are not allowed to download source files"
+ if os.path.exists(file):
+ cmd = "cat"
+ src = file
+ else:
+ file = file[:-len(ext)]
+ src = exist_ps(file)
+ if not src:
+ if not cmd:
+ raise error, "File not found"
+ src = exist_ps(file, '.gz')
+ if src:
+ cmd = cmd_gz or 'gunzip -c | '+cmd
+ if not src:
+ raise error, "Source file not found"
+
+ import mimetypes
+ mimetype, encoding = mimetypes.guess_type(req_file, strict=0)
+
+ print "Content-Type:",mimetype
+ if encoding:
+ print "Content-Encoding:", encoding
+ print "Last-Modified:", rfc1123(os.path.getmtime(src))
+ print
+ cmd = cmd.split(' | ')
+ cmd[0] += ' < '+src
+ cmd = ' | '.join(cmd)
+ return cmd
+
+def list_formats():
+ for ext, cmd, cmd_gz, desc, _ in formats:
+ print ext
+
+def list_files(base):
+ path, base = validate_path(base)
+ dict = {}
+ for ext, _, _, desc, source in formats:
+ if not os.path.exists(path+ext): continue
+ if not source:
+ if desc:
+ dict[ext] = None
+ continue
+ for ext, cmd, _, desc, source in formats:
+ if cmd and desc and (isTrusted or not source):
+ dict[ext] = None
+ if not dict:
+ raise error, "File not found"
+ return dict.keys()
+
+def list_directory(dir):
+ realdir, dir = validate_path(dir)
+ if not os.path.isdir(realdir): raise error, "Not a directory"
+ files = {}
+ for file in os.listdir(realdir):
+ for ext, _, _, desc, source in formats:
+ if file.endswith(ext): break
+ else: continue
+ base = file[:-len(ext)]
+ dict = files.setdefault(base, {})
+ if not source:
+ if desc:
+ dict[ext] = None
+ continue
+ for ext, cmd, _, desc, source in formats:
+ if cmd and desc and (isTrusted or not source):
+ dict[ext] = None
+ for base in files.keys():
+ files[base] = files[base].keys()
+ return files
+
+class Style:
+ def run_cmd(self, cmd):
+ sys.stdout.flush()
+ os.execl('/bin/sh', 'sh', '-c', cmd)
+
+ def process_query(self, file):
+ try:
+ _, file = validate_path(file)
+ except error, mess:
+ self.die(mess)
+ try:
+ cmd = process(file)
+ except error, mess0:
+ try:
+ files = list_directory(file)
+ except error, mess1:
+ try:
+ files = list_files(file)
+ except error, mess2:
+ self.die('\n'.join(map(str, (mess0, mess1, mess2))))
+ else:
+ self.output_alternatives(file, files)
+ else:
+ self.output_directory(file, files)
+ else:
+ self.run_cmd(cmd)
+
+ def output_directory(self, dir, files):
+ for base, exts in files.items():
+ self.output_alternatives(dir+'/'+base, exts)
+
+ def output_alternatives(self, base, exts):
+ print os.path.basename(base),
+ for ext in exts:
+ print '%s'%(script_name, base, ext, ext),
+ print
+
+ def die(self, mess):
+ print mess
+ sys.exit()
+
+class CGIStyle(Style):
+ def output_directory(self, dir, files):
+ print "Content-type: text/html\n"
+ for base, exts in files.items():
+ Style.output_alternatives(self, dir+'/'+base, exts)
+ print '
'
+ def output_alternatives(self, base, exts):
+ print "Content-type: text/html\n"
+ Style.output_alternatives(self, base, exts)
+ def die(self, mess):
+ print "Content-type: text/plain\n"
+ Style.die(self, mess)
+
+class HtmlStyle(Style):
+ def process_query(self, file):
+ try:
+ _, file = validate_path(file)
+ except error, mess:
+ self.die(mess)
+ try:
+ files = list_directory(file)
+ except error, mess1:
+ try:
+ files = list_files(file)
+ except error, mess2:
+ self.die('\n'.join(map(str, (mess1, mess2))))
+ else:
+ self.output_alternatives(file, files)
+ else:
+ self.output_directory(file, files)
+ def run_cmd(self, cmd):
+ print "ERROR - Tried to run",cmd
+
+class TestStyle(CGIStyle):
+ def __init__(self, file):
+ self.outputfile = os.path.basename(file)
+ def run_cmd(self, cmd):
+ cmd += " | cat > /tmp/"+self.outputfile
+ cmd += " ; file /tmp/"+self.outputfile
+ print cmd
+ sys.stdout.flush()
+ os.execl('/bin/sh', 'sh', '-c', cmd)
+
+if __name__ == '__main__':
+ if len(sys.argv) > 1:
+ if sys.argv[1] == 'l': # list all available extensions.
+ isTrusted = True
+ list_formats()
+ sys.exit()
+ elif sys.argv[1] == 't': # test; show the commands on stdout.
+ isTrusted = True
+ TestStyle(sys.argv[2]).process_query(sys.argv[2])
+ sys.exit()
+ elif sys.argv[1] == 'h': # html. Generate links to the available formats.
+ isTrusted = madrigalweb.isTrusted()
+ HtmlStyle().process_query(sys.argv[2])
+ sys.exit()
+ if os.environ.get('GATEWAY_INTERFACE'):
+ isTrusted = madrigalweb.isTrusted()
+ CGIStyle().process_query(cgi_file())
+ else:
+ print "Use option t to test it from command line"
From jmh at haystack.mit.edu Thu Apr 15 09:18:36 2004
From: jmh at haystack.mit.edu (John Holt)
Date: Mon Oct 23 17:53:01 2006
Subject: [OpenMadrigal-developers] Re: [MidasW-developers] New information in IFAM, CMST and Madrigal
Message-ID: <200404151318.i3FDIaJ22576@chaos.haystack.mit.edu>
Putting record type information in header records seems reasonable. It
does thrust the header record into a much more prominent role than
previously, but that may be a good thing. Are you thinking of using
just one header record, as we do now, or multiple header records, as
some other radars have done? For example there could be a header record
before each experiment if the file contains more than one experiment,
or before each cycle. However one does it, there will be many CCYCLE
lines - on the order of 200-300 in a 24-hour experiment.
The flexiblity will be important when we begin to deal with the sorts
of things the AMISR will be able to do. I think it would be a good idea
for us to have a small meeting of Madrigal people in Santa Fe to
discuss some of these issues. For example, each radar now has an
assigned set of operation codes which it can define as it wishes.
Presumably a set will also have to be assigned to AMISR. Millstone has
defined many such codes, but very few have been defined for the other
radars. It would be good if we could expand the list of standard
parameter codes to cover some of the Millstone codes as well as the
needs of the AMISR.
John
> From: William Rideout
> To: midasw-developers@haystack.mit.edu
> Subject: [MidasW-developers] New information in IFAM, CMST and Madrigal
> Date: Wed, 14 Apr 2004 14:03:16 -0400
>
>
> As mentioned in a previous email, we are planning to add two fields to the
IFAM
> and CMST structures, 1) record_type, and 2) exp_cycle number. This email
> discusses the meaning of these fields, and suggests ways to persist this
> information in Madrigal files.
>
> record_type - an integer describing what type of of cycle this integration
> period belongs to. One use of this information is to aid in plotting the
data.
> For now, we propose to define the following values:
>
> 0 OTHER
> 1 FIXED_POS
> 2 AZ_SCAN
> 3 EL_SCAN
>
> exp_cycle - an integer describing what overall experiment cycle this
integration
> period belongs to. An overall experiment cycle always begins with the first
> cycle defined in the experiment file, and increments each time that first
cycle
> reoccurs, even if the last cycle did not precede it (that is, a reset
occured).
>
> I think this information needs to persist in the created Madrigal file, so
that,
> for example, plotting can be easily done with Madrigal files alone. John and
I
> have already discussed saving the exp_cycle as Cedar parameter 95. However, I
> think we need a Millstone standard for storing information about groups of
> records. For example, in the case where a Madrigal file contains multiple
> experiments (calibration / extra_wide_coverage / calibration), we might want
to
> include experiment names and record ranges for each.
>
> I propose we add lines to the header record. The header line would be of the
> following form, where startRec starts at 0:
>
> CCYCLE
>
> So, a Madrigal header record might have the following lines:
>
> CCYCLE 0 100 OTHER
> CCYCLE 101 200 EL_SCAN
> CCYCLE 201 203 FIXED_POS
> CCYCLE 204 500 EL_SCAN
> CCYCLE 501 703 FIXED_POS
> CCYCLE 704 1000 AZ_SCAN
>
> The only alternative is define new parameters that must take integer values
> every time we want to persist alternative grouping schemes, so all values must
> be mapped into a set list. I think the header approach is more flexible and
> easier for parsing, but please let me know what you think.
>
> Bill
>
> --
> Bill Rideout
> MIT Haystack Observatory
> Email: brideout@haystack.mit.edu
> Phone: 781 981-5624
> _______________________________________________
> MidasW-developers mailing list
> MidasW-developers@haystack.mit.edu
> http://www.haystack.mit.edu/midas_w/mailman/listinfo/midasw-developers
>
>
> !DSPAM:407d7d26149371938221855!
>
>
From brideout at haystack.mit.edu Thu Apr 15 11:45:24 2004
From: brideout at haystack.mit.edu (William Rideout)
Date: Mon Oct 23 17:53:01 2006
Subject: [OpenMadrigal-developers] Re: [MidasW-developers] New information
in IFAM, CMST and Madrigal
In-Reply-To: <200404151318.i3FDIaJ22576@chaos.haystack.mit.edu>
References: <200404151318.i3FDIaJ22576@chaos.haystack.mit.edu>
Message-ID: <407EAE14.5040405@haystack.mit.edu>
John Holt wrote:
> Putting record type information in header records seems reasonable. It
> does thrust the header record into a much more prominent role than
> previously, but that may be a good thing. Are you thinking of using
> just one header record, as we do now, or multiple header records, as
> some other radars have done? For example there could be a header record
> before each experiment if the file contains more than one experiment,
> or before each cycle. However one does it, there will be many CCYCLE
> lines - on the order of 200-300 in a 24-hour experiment.
According to the Cedar format, a header record is meant to describe a subset of
the records, and should be before or after the records it describes. So I have
no problem with the Cedar approach of inserting header records into the middle
of the Cedar file. Given the name "header", I would think it would be more
logical to put them before the records they describe.
From the Madrigal point of view, here's a simple way then to get (for example)
all azimuth scan records for plotting:
1. Pass once through the file, getting all header records (so where or how many
header records there are is irrelevant).
2. Parse the result for azimuth scan ranges.
3. Call isprint (or the underlying method createMaddata if you're working in C)
to get all desired data with RECNO as a filter, and the ranges as an argument,
since any number of ranges are allowed in a filter.
>
> The flexiblity will be important when we begin to deal with the sorts
> of things the AMISR will be able to do. I think it would be a good idea
> for us to have a small meeting of Madrigal people in Santa Fe to
> discuss some of these issues.
Sounds good to me. The more we standardize, the more I can make Madrigal do for
everyone.
Bill
--
Bill Rideout
MIT Haystack Observatory
Email: brideout@haystack.mit.edu
Phone: 781 981-5624
From brideout at haystack.mit.edu Fri Apr 23 11:19:20 2004
From: brideout at haystack.mit.edu (William Rideout)
Date: Mon Oct 23 17:53:01 2006
Subject: [OpenMadrigal-developers] script to convert postscript plots
to png and jpeg
In-Reply-To: <20040415110736.GA18129@peppar.cs.umu.se>
References: <405234C5.2050100@haystack.mit.edu> <20040415110736.GA18129@peppar.cs.umu.se>
Message-ID: <408933F8.4010902@haystack.mit.edu>
Christian Haggstrom wrote:
> The plots and images found among the experiments is often in Postscript
> format, but it's easier to display them as PNG or JPG in a web browser.
> Therefore I have made a python script to convert them on-the-fly using
> ghostscript.
>
Christian,
This is an excellent piece of work and a good addition to Madrigal, so I'd like
to add it as a part of the Madrigal distribution. I do have a few suggestions
to make it more consistent with Madrigal. If you'd like to make the following
changes, that would be great; otherwise I can do them - let me know what you want.
1. Since the core functionality of this code - converting graphic formats on
the fly and displaying links on the web - is something that could be used
elsewhere, I'd like to put all that generic functionality into a module in the
madpy API instead of in an executable. I'd like to create a module called
something like graphicConverter.py in madrigal/ui, and have it contain all the
functionality you provide as classes. This way python can access this
functionality without kicking off a separate process.
2. You can then create a very small executable that imports this new class,
parses the command line, and calls the needed methods. This method should be
created in the standard place for python executables: source/madpy/scripts/bin.
3. Madrigal stores all executables it calls in $MADROOT/bin, so during
installation your new executable would be put there. To call it from a tcl cgi
script, you'd just execute "/bin/getMadplot.py". This would avoid the
awkwardness of putting an executable in the CGI directory. See the tcl cgi
scripts for the standard way they find the value of $MADROOT: [madrigal cget
-madroot]. (Note you can't use getenv - the web server often does not have env
parameters set that users do - see my next comment).
4. How to handle the following problem in the standard Madrigal way:
> +# These seems to be neccesary on www.eiscat.com... ugly
> +os.environ['GS_FONTPATH'] = os.environ.get('GS_FONTPATH', '.')+':/usr/openwin/lib/X11/fonts/Type1/outline'
> +os.environ['GS_LIB'] = os.environ.get('GS_LIB', '.')+':/usr/openwin/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/Type3:/usr/local/share/ghostscript/8.00/lib/fonts'
> +
Web servers often don't have env variables set (which is why it works for you
without this line, but not the web server), so Madrigal uses the madrigal.cfg
file to deal with this issue. I'll add two new parameters to madrigal.cfg:
MAD_GS_FONTPATH and MAD_GS_LIB. So your class should have the lines:
os.environ['GS_FONTPATH'] = 'MAD_GS_FONTPATH'
os.environ['GS_LIB'] = 'MAD_GS_LIB'
During installation MAD_GS_FONTPATH and MAD_GS_LIB will be replaced by whatever
values the system admin set in the madrigal.cfg file.
5. Documentation - we do need to add documention to the python module in the
same format as the rest of Madrigal python code. See my modules in
source/madpy/madrigal for examples. I use happydoc to automatically create
documentation from comments in code, so if you could follow that format as close
as possible, that would be great.
That's it for changes. I did look at using the Python special interest group
project PIL (Python Imaging Library) as the converter instead of gs, but it
didn't seem to handle postscript, so I think your approach is best.
Again, thanks for the excellent contribution and let me know if you want to make
the above changes.
Bill
--
Bill Rideout
MIT Haystack Observatory
Email: brideout@haystack.mit.edu
Phone: 781 981-5624
From c00chm at cs.umu.se Fri Apr 23 18:39:38 2004
From: c00chm at cs.umu.se (Christian Haggstrom)
Date: Mon Oct 23 17:53:01 2006
Subject: [OpenMadrigal-developers] script to convert postscript plots to png and jpeg
In-Reply-To: <408933F8.4010902@haystack.mit.edu>
References: <405234C5.2050100@haystack.mit.edu> <20040415110736.GA18129@peppar.cs.umu.se> <408933F8.4010902@haystack.mit.edu>
Message-ID: <20040423223938.GA10634@peppar.cs.umu.se>
On Fri, Apr 23, 2004 at 11:19:20AM -0400, William Rideout wrote:
> Christian Haggstrom wrote:
>
> >The plots and images found among the experiments is often in Postscript
> >format, but it's easier to display them as PNG or JPG in a web browser.
> >Therefore I have made a python script to convert them on-the-fly using
> >ghostscript.
>
> Christian,
>
> This is an excellent piece of work and a good addition to Madrigal, so I'd
> like to add it as a part of the Madrigal distribution. I do have a few
> suggestions to make it more consistent with Madrigal. If you'd like to
> make the following changes, that would be great; otherwise I can do them -
> let me know what you want.
I fully agree with the five points you gave. However, I'm afraid I will not
have time to do this until I start work full-time for eiscat 7 June.
So, feel free to do make the changes yourself, and if you don't, I will do
them in the summer.
Best regards,
Christian
From brideout at haystack.mit.edu Tue Apr 27 16:38:34 2004
From: brideout at haystack.mit.edu (William Rideout)
Date: Mon Oct 23 17:53:01 2006
Subject: [OpenMadrigal-developers] script to convert postscript plots
to png and jpeg
In-Reply-To: <20040423223938.GA10634@peppar.cs.umu.se>
References: <405234C5.2050100@haystack.mit.edu> <20040415110736.GA18129@peppar.cs.umu.se> <408933F8.4010902@haystack.mit.edu> <20040423223938.GA10634@peppar.cs.umu.se>
Message-ID: <408EC4CA.50507@haystack.mit.edu>
Christian Haggstrom wrote:
>
> I fully agree with the five points you gave. However, I'm afraid I will not
> have time to do this until I start work full-time for eiscat 7 June.
>
> So, feel free to do make the changes yourself, and if you don't, I will do
> them in the summer.
>
Christian,
Madrigal 2.3 is just about to be released, so these changes will appear in the
next release of Madrigal. So I can wait for this summer, if that works out for
you.
Thanks again,
Bill
--
Bill Rideout
MIT Haystack Observatory
Email: brideout@haystack.mit.edu
Phone: 781 981-5624