Skip to content

Month: June 2012

plot to postscript file and to screen in same program

One might want to plot to screen, interactively adjust parameters, replot to screen, etc; and then when done fiddling; make a final postscript plot.  However, . . .

As far as I know, it is a little complicated to plot both to screen and to postscript.  One has to send essentially the same commands to each “device”, while also opening and closing them properly.

A good example of doing this is in combine_v7.0.pro, in /usr/share/astro/idlshare/local/recombo2008

————————————————————————————

A simpler version of this problem is the either/or problem – ask user whether she wants to plot to screen OR postscript.

A good example of this is profile_v4.5.pro [in its pro make_plots]

–Joel

Howto restore files from SDLT magtape

First shutdown Algol, then turn on both tape drives, then reboot Algol. This step is necessary because SCSI devices (such as the tape drives) can only be recognized at boot time.

When restoring files/dirs, supply the ‘-P’ arg to tar.  This is a workaround that causes tar to properly restore all symlinks. Otherwise random symlinks end up as zero-length files…

Also, when restoring files, cd to /root/tapebackup/restore/ and when issuing the ‘tar’ command, omit the leading ‘/’ and wrap the filename in single quotes, so that special chars in the filepath don’t get mis-interpreted.  Here’s an example:

[root@algol restore]# mt -f /dev/nst1 rewind
[root@algol restore]# tar xvPf /dev/nst1 'data/psrdata/usr3applications/p1391/vaxplot/temps_working/P1929+10/P1929+10_TMPfxd1.inp.Z'
/home /data/psrdata /usr/share/astro /etc/secret /docs Fri Apr 13 20:00:00 CDT 2012
Reading `/home /data/psrdata /usr/share/astro /etc/secret /docs Fri Apr 13 20:00:00 CDT 2012'
data/psrdata/usr3applications/p1391/vaxplot/temps_working/P1929+10/P1929+10_TMPfxd1.inp.Z
[root@algol restore]# ls
data
root@algol restore]# mt -f /dev/nst1 eject
[root@algol restore]#

Then copy the restored file from /root/tapebackup/restore to it’s final destination.