Monday, 29 July 2013

muttprint

$ lpstat -p


printer hp_hp_color_LaserJet_5550 is idle.  enabled since Mon Jul 29 18:41:51 2013
        Ready to print.


in .bashrc:

export PRINTER=hp_hp_color_LaserJet_5550

was critical.


pafec reference scripts: Resonance frequencies of a disk.


CONTROL
AXISYMMETRIC
CONTROL.END

PARAMETERS
'r' = 0.1
't' = 0.01

NODES
NODE X Y
1 0 <'r'>
2 <'t'> <'r'>
3 0 0
4 <'t'> 0

PAFBLOCKS
BLOCK TYPE ELEM GROUP PROP N1 N2 TOPO
1 1  36210 1 11 4 20 1 2 3 4

MODES.AND.FREQUENCIES
AUTO MODES
200 20

FULL.DYNAMICS.OUTPUT
TYPE START FINISH STEP
4 1 1E6 1

PLATES.AND.SHELLS
PLATE MATERIAL
11 4

END.OF.DATA

Results from PHASE 7:

FREQUENCY  PERCENTAGE
 NUMBER      ERROR
-----------------------
   1        0.00
   6        0.03
  11        0.09
  12        0.11

MODE  FREQUENCY
  1   0.0159008
  2   2211.8861122
  3   9009.1228360
  4   17691.5023129


This was used to demonstrate the approximate relation,

f0 \propto t sqrt(E) / (sqrt(rho) * r**2)

and the mode-shapes below.


Friday, 26 July 2013

Android

Build your first `app'.  Application, please.

https://developer.android.com/training/basics/firstapp/index.html

Mass

83 kg.  26/7/13

Wednesday, 24 July 2013

Spacing in ipython notebook subplots and default settings.

Spacing:
import matplotlib as m

m.rcParams['figure.subplot.hspace'] = 0.4 # 0.3 default.
m.rcParams['figure.subplot.wspace'] = 0.3 # 0.2 default.



Defaults:

At the start of each script use,

import ipythonNotebookConfig

where, ipythonNotebookConfig.py  contains:

import matplotlib as m
print 'The matplotlib rc file is', m.matplotlib_fname()


# Set default svg:  publish quality images.
from IPython.zmq.pylab import backend_inline
cfg = backend_inline.InlineBackendConfig.instance()
cfg.figure_format = 'svg' # 'png' / 'svg'



# Control saving:  keep the nice images for .pdf inclusion.
from IPython.zmq.pylab.backend_inline import InlineBackendConfig
InlineBackendConfig.instance().figure_format = 'svg'



print m.rcParams['figure.


# print m.rcParams['figure.figsize'] # default plot size
# m.rcParams['figure.figsize'] = (11, 7.7) # double it
# print m.rcParams['lines.linewidth'] # this gives 2 though I set 1.
m.rcParams['lines.linewidth'] = (1) # half it
#m.rcParams['savefig.dpi'] = 80 # changes displayed figure size
m.rcParams['axes.grid'] = True

scale=1
m.rcParams['legend.fontsize'] = 10/scale
m.rcParams['axes.labelsize'] = 12/scale
m.rcParams['figure.figsize'] = (12/scale, 8/scale)
m.rcParams['font.size'] = 10/scale # numbers
m.rcParams['legend.fontsize'] = 10/scale # numbers

# Affects all scaling.  Set scale linearly with this value.  80 looks good onscreen.
m.rcParams['savefig.dpi'] = 80 

m.rcParams['grid.linewidth'] = 0.5/scale
m.rcParams['lines.linewidth'] = 0.5/scale # data lines

# matplotlib.rcParams['legend.frameon'] = False
# Doing this screws the plot size, after I updated.

m.rcParams['axes.titlesize'] = 12./scale
m.rcParams['axes.titlesize'] = 12./scale

m.rcParams['grid.linestyle'] = '-'
m.rcParams['grid.color'] = '0.85'

# These prevent two line titles and axis labels overlapping.
m.rcParams['figure.subplot.hspace'] = 0.4 # 0.3 default.
m.rcParams['figure.subplot.wspace'] = 0.3 # 0.2 default.

# experimental from 
# http://nerdjusttyped.blogspot.co.uk/2010/07/type-1-fonts-and-matplotlib-figures.html
# This causes, `type 1 fonts' instead of the default type 3.
# Really, I'm trying to change from .png to .pdf plots.
m.rcParams['ps.useafm'] = True
m.rcParams['pdf.use14corefonts'] = True
m.rcParams['text.usetex'] = True

images in ipython notebook


subplot(221); title('19 degree flare. v22_y10-22-3')
imshow(imread('/home/me/Documents/acoustics/v22_y10-22-3-mesh.png'))



or, say:

def showImage(n=221, fn, title):
    """Convenience image display function"""
    subplot(n, frameon=False)
    title(title)
    ims = imread(fn)
    xticks([]); yticks([])

    imshow(ims)

showImage(221, 'myfile.png', 'This is my image!')

*Update*

The notebook now supports image inclusion via html:  this is better as the formatting is simple(r) and the functionality is built in.


Wednesday, 17 July 2013

femap

http://www.plm.automation.siemens.com/en_us/products/velocity/femap/free-femap.shtml

PIGS linux

cd ~/downloads/pafec/pigs/pafec/pigs88/run
./PIGSWIN.exe

or

pigs


Then load the BS with full filename path.

~/Documents/FT/pafec/commandsToGetPIGSworking.txt outlines the steps taken to get pigs up on linux.

Saturday, 13 July 2013

mplayer fav. command

mplayer -nosub -fs -geometry 1920x1200+0+0 -screenw 1920 -screenh 1200  -zoom  dir/*/*

linux audio

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC898 Analog [ALC898 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC898 Digital [ALC898 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC898 Analog [ALC898 Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1



$ cat /proc/asound/devices
  1:        : sequencer
  2: [ 0- 2]: digital audio capture
  3: [ 0- 1]: digital audio playback
  4: [ 0- 1]: digital audio capture
  5: [ 0- 0]: digital audio playback
  6: [ 0- 0]: digital audio capture
  7: [ 0- 0]: hardware dependent
  8: [ 0]   : control
  9: [ 1- 9]: digital audio playback
 10: [ 1- 8]: digital audio playback
 11: [ 1- 7]: digital audio playback
 12: [ 1- 3]: digital audio playback
 13: [ 1- 0]: hardware dependent
 14: [ 1]   : control
 33:        : timer


ms@ms:~$ arecord -L
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=PCH
    HDA Intel PCH, ALC898 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    Front speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Digital
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=1
    HDA Intel PCH, ALC898 Digital
    Direct sample mixing device
dmix:CARD=PCH,DEV=2
    HDA Intel PCH, ALC898 Analog
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
    HDA Intel PCH, ALC898 Digital
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=2
    HDA Intel PCH, ALC898 Analog
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC898 Digital
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=2
    HDA Intel PCH, ALC898 Analog
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, ALC898 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
    HDA Intel PCH, ALC898 Digital
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=2
    HDA Intel PCH, ALC898 Analog
    Hardware device with all software conversions
ms@ms:~$

ubuntu install initramfs unable to find a medium containing a live file system

Occurred with booting from usb drive with my Republic of Gamers Mobo, Maximus V Formula/ThunderFX (which I now regret buying).

Changing to a different USB port fixed this.

Friday, 12 July 2013

nvidia ubuntu 3D acceleration broken

Turned computer on.  Previously working.  Now not.  Reason unknown.  Login screen is in chunko-vision.  Fluxbox looks terrible.  Logging out and returning to the login screen restores normal resolution (WHY?!).  Logging into 3D Unity looks ok but I think is sluggish.

Now I have to spend some of the little free time I have dicking around trying to get this working again.

I had the nvidia closed source driver working ok.

So, some commands and results:

me@me:~$ sudo lshw -c video
[sudo] password for me:
  *-display              
       description: VGA compatible controller
       product: NVIDIA Corporation
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:f6000000-f6ffffff memory:e8000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff


me@me:~$ glxinfo | grep dire
Xlib:  extension "NV-GLX" missing on display ":0.0".
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)


me@me:~$ sudo nvidia-settings

You do not appear to be using the NVIDIA X driver.  Please edit your X configuration file (just run `nvidia-xconfig' as root), and restart the X server.

me@me:~$ sudo nvidia-xconfig

Using X configuration file: "/etc/X11/xorg.conf".
Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'


Portion of interest in xorg.conf:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "NoLogo" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection



me@me:~$ cat /etc/ld.so.conf.d/steam.conf
/usr/lib32
/usr/lib/i386-linux-gnu/mesa



ms@ms:~$ sudo vdpauinfo

display: :0.0   screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1


me@me:~$ lspci -v
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1189 (rev a1) (prog-if 00 [VGA controller])
        Subsystem: Giga-byte Technology Device 3542
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e8000000 (64-bit, prefetchable) [size=128M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        Expansion ROM at f7000000 [disabled] [size=512K]
        Capabilities:
        Kernel driver in use: nvidia

        Kernel modules: nvidia, nvidia_current, nvidia_experimental_310, nouveau, nvidiafb

(No mention of the specific graphics card and an unexpected noveau entry)

According to http://www.cyberciti.biz/faq/linux-tell-which-graphics-vga-card-installed/ there should be something about my card in there, in a line with `vga':

ms@ms:~$ lspci -v | grep vga

Not a thing.  More from that page:

me@me:~$ sudo update-pciids
[sudo] password for ms: 

Downloaded daily snapshot dated 2013-07-12 03:15:02

No change to the lspci vga output.

me@me:~$ sudo lshw -C video
  *-display               
       description: VGA compatible controller
       product: GK104 [GeForce GTX 670]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0

       resources: irq:16 memory:f6000000-f6ffffff memory:e8000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff

So lshw appears to detect the card but shows its clock to be at 33MHz?  Odd.

me@me:~$ sudo apt-get install mesa-utils

already installed.

$ glxinfo

name of display: :0.0
Xlib:  extension "NV-GLX" missing on display ":0.0".
display: :0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: NVIDIA Corporation

client glx version string: 1.4

Search for 

`Xlib:  extension "NV-GLX" missing on display ":0.0".'

http://askubuntu.com/questions/312680/nvidia-xlib-extension-nv-glx-missing-on-display-0-0-ubuntu-13-04
*snip* I eventually uninstalled everything and used bumblebee only (in case it helps you solve my problem or for people having a hard time installing their nvidia drivers).*snip*

Hmmm.  Following something from that page:


me@me:~$ nvidia-detector
none

Odd.  The page did not show a resolution and mentioned use of bumblebee.  I don't thing I used it:  apt-get doesn't know it.  My video was working fine a few days ago......

So I looked in /var/log/:

me@me~: ls -lha /var/log/Xorg*
This showed a new file and an old one (from a couple of weeks ago, when things were ok).  Differences:


[ 14438.354] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 14438.397] (II) Module glx: vendor="NVIDIA Corporation"
[ 14438.397]    compiled for 4.0.2, module version = 1.0.0
[ 14438.397]    Module class: X.Org Server Extension
[ 14438.397] (II) NVIDIA GLX Module  304.64  Tue Oct 30 11:18:32 PDT 2012

Changed to,

[    88.159] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    88.159] (II) Module glx: vendor="X.Org Foundation"
[    88.159]    compiled for 1.11.3, module version = 1.0.0
[    88.159]    ABI class: X.Org Server Extension, version 6.0
[    88.159] (==) AIGLX enabled

So it looks like the nvidia driver is not being loaded.  Later,


[ 14438.413] (II) LoadModule: "nvidia"
[ 14438.413] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 14438.438] (II) Module nvidia: vendor="NVIDIA Corporation"
[ 14438.438]    compiled for 4.0.2, module version = 1.0.0
[ 14438.438]    Module class: X.Org Video Driver
[ 14438.438] (II) NVIDIA dlloader X Driver  304.64  Tue Oct 30 10:59:51 PDT 2012
[ 14438.438] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 14438.438] (++) using VT number 7

changed to,

[    88.160] (II) LoadModule: "nvidia"
[    88.160] (WW) Warning, couldn't open module nvidia
[    88.160] (II) UnloadModule: "nvidia"
[    88.160] (II) Unloading nvidia
[    88.160] (EE) Failed to load module "nvidia" (module does not exist, 0)

More confirmation of a driver problem.  Later the broken one (the current one) showed,

[    88.160] (II) LoadModule: "nouveau"
[    88.160] (II) Loading /usr/lib/xorg/modules/drivers/nouveau_drv.so
[    88.160] (II) Module nouveau: vendor="X.Org Foundation"
[    88.160]    compiled for 1.11.3, module version = 0.0.16
[    88.160]    Module class: X.Org Video Driver
[    88.160]    ABI class: X.Org Video Driver, version 11.0

while the old, working log had no mention of nouveau.

OK.  I'm going to uninstall my video drivers as best I can and start this again.....  Nervous.  Back to unity and I'll turn off the video drivers.

me@me:~$ jockey-text -l
xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
xorg:nvidia_experimental_304 - NVIDIA accelerated graphics driver (**experimental** beta) (Proprietary, Disabled, Not in use)
xorg:nvidia_experimental_310 - NVIDIA accelerated graphics driver (**experimental** beta) (Proprietary, Enabled, In use


me@me:~$ sudo nvidia-xconfig

me@me:~ sudo restart lightdm
 
Other logs of interest:
 
/var/log/nvidia-installer.log (apr 14)
/var/log/jockey.log  
 
A reset:  No improvement and the nvidia driver is reported 
by unity settings as in use.  I removed it via the settings menu.  A reset
 and now resolution looks normal but /var/log/Xorg.0.log shows the same nvidia
complaints as above.  Why is it even being looked for now?  It seems that video drivers
are not well managed in ubuntu.  :(
 
me@me:~$ sudo nvidia-xconfig

WARNING: Unable to locate/open X configuration file.

New X configuration file written to '/etc/X11/xorg.conf'
 
That's new.  Before I removed the driver, there was a different complaint.  I checked the linux headers, they seem fine.
Restart again now the new xorg.conf has been written.
 
Oh good.  Back to low resolution.  :(  Checking the xorg log file, there is still no nvidia driver.  OK.  Re-enable via system settings gui.
 
 
=============================== Four hours later ===========================
 
Attempts to install Ubuntu 13 have failed.  The USB installer is fine. On reboot, system locks during release of initfs.  I tried different drive ports
and many different bios settings.  Going back to 12.
 
:(
 
What a waste of a day. 
 
ms@ms:~$ jockey-text --list | grep nvidia
xorg:nvidia_current - NVIDIA accelerated graphics driver (Proprietary, Disabled, Not in use)
xorg:nvidia_current_updates - NVIDIA accelerated graphics driver (post-release updates) (Proprietary, Disabled, Not in use)
xorg:nvidia_experimental_304 - NVIDIA accelerated graphics driver (**experimental** beta) (Proprietary, Disabled, Not in use)
xorg:nvidia_experimental_310 - NVIDIA accelerated graphics driver (**experimental** beta) (Proprietary, Enabled, In use)
 
 
 yet xorg.0.log still complains.
 
me@me:~$ modinfo nvidia_experimental_310
filename:       /lib/modules/3.2.0-49-generic/updates/dkms/nvidia_experimental_310.ko
alias:          char-major-195-*
version:        310.14
supported:      external
license:        NVIDIA
alias:          pci:v000010DEd00000E00sv*sd*bc04sc80i00*
alias:          pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*
alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
depends:        
vermagic:       3.2.0-49-generic SMP mod_unload modversions 
parm:           NVreg_Mobile:int
parm:           NVreg_ResmanDebugLevel:int
parm:           NVreg_RmLogonRC:int
parm:           NVreg_ModifyDeviceFiles:int
parm:           NVreg_DeviceFileUID:int
parm:           NVreg_DeviceFileGID:int
parm:           NVreg_DeviceFileMode:int
parm:           NVreg_RemapLimit:int
parm:           NVreg_UpdateMemoryTypes:int
parm:           NVreg_InitializeSystemMemoryAllocations:int
parm:           NVreg_RMEdgeIntrCheck:int
parm:           NVreg_UsePageAttributeTable:int
parm:           NVreg_EnableMSI:int
parm:           NVreg_MapRegistersEarly:int
parm:           NVreg_RegisterForACPIEvents:int
parm:           NVreg_CheckPCIConfigSpace:int
parm:           NVreg_RegistryDwords:charp
parm:           NVreg_RmMsg:charp
 
 
me@me:~$ cat /etc/X11/xorg.conf
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 304.48  (buildmeister@swio-display-x86-rhel47-05.nvidia.com)  Sun Sep  9 21:29:02 PDT 2012

Section "Monitor"
 Identifier     "Monitor0"
 VendorName     "Unknown"
 ModelName      "Unknown"
 HorizSync       28.0 - 33.0
 VertRefresh     43.0 - 72.0
 Option         "DPMS"
EndSection

Section "Screen"
 Identifier     "Screen0"
 Device         "Device0"
 Monitor        "Monitor0"
 DefaultDepth    24
 SubSection "Display"
  Depth       24
 EndSubSection
EndSection

Section "InputDevice"
 Identifier     "Mouse0"
 Driver         "mouse"
 Option         "Protocol" "auto"
 Option         "Device" "/dev/psaux"
 Option         "Emulate3Buttons" "no"
 Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
 Identifier     "Keyboard0"
 Driver         "kbd"
 # generated from default
EndSection

Section "ServerLayout"
 Identifier     "Layout0"
 Screen      0  "Screen0"
 InputDevice    "Keyboard0" "CoreKeyboard"
 InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Device"
 Identifier     "Device0"
 Driver         "nvidia"
 VendorName     "NVIDIA Corporation"
 Option "NoLogo" "True"
EndSection
 

=========================

Fix:  complete re-install from CD.  Reinstall from usb stick failed with 13 with `unable to write to /EFI'
or something.  12 installed and refused to boot.  Install from CD only!

Wednesday, 10 July 2013

Thursday, 4 July 2013

on my kindle I am root.

http://www.turnkeylinux.org/blog/kindle-root



amazing!

Copy files over as,

scp file root@192.168.1.80:/mnt/base-us/documents/


To update to include the new documents hold the power switch for a few seconds.  The screen goes blank.   Slide the switch again and the documents should be present.

Using %debug with ipython notebook!

:)

Run the notebook.  Get connection details with,

In [315]: connect_info


{ "stdin_port": 54645, "ip": "127.0.0.1", "hb_port": 37889, "key": "12dafc68-dff1-4e17-a4be-58fb059cc198", "shell_port": 52893, "iopub_port": 35633 } Paste the above JSON into a file, and connect with: $> ipython --existing or, if you are local, you can connect with just: $> ipython --existing kernel-0b0b2631-03c4-4d7b-8f7b-a18bc76e976d.json or even just: $> ipython --existing if this is the most recent IPython session you have started.

and open a second terminal. Connect to the existing notebook server with,

ipython qtconsole --existing kernel-0b0b2631-03c4-4d7b-8f7b-a18bc76e976d.json

and the new window pops up with %debug ability.

The easiest way, I found, was to type,


$ ipython qtconsole --existing

ipython header for document preparation and publication quality plotting.


# hideOutput
# Document generation.  If problem run from shell the commands one by one.
docroot = '/home/starnesm/projects/FT/ipython/'
a = '20130607-v9Transducer'

from reference import hideIpythonCells as hideIpythonCells
from IPython.zmq.pylab import backend_inline
from IPython.zmq.pylab.backend_inline import InlineBackendConfig
import subprocess as sub # for calling o/s commands like, `pdflatex'
from scipy.interpolate import interp1d
from reference import counter as counter # color cycling.

out, err = sub.PIPE, sub.STDOUT # for bash commands.

# Set the plot defaults to svg:  png is tough to make look good in latex.
cfg = backend_inline.InlineBackendConfig.instance()
cfg.figure_format = 'svg' # 'png' / 'svg'
InlineBackendConfig.instance().figure_format = 'svg'

coms = ['cd %s; ' % docroot]
coms[0] += 'nbconvert2.py latex_base --no-stdout --write=True %s.ipynb' % a # 0
coms.append('cp %s%sNoCode.tex %s%s_files/' % (docroot, a, docroot, a)) # 1
coms.append('for i in %s%s_files/*.pdf; do mv $i ${i%%.pdf}.svg; done' % (docroot, a)) # 2
coms.append('cd %s%s_files; pdflatex --shell-escape %sNoCode.tex' % (docroot, a, a)) # 3
    
# original form discards the output, making for difficult debug:
p = []
p.append(sub.call(['/bin/bash', '-c', coms[0]], stdout=out, stderr=err)) # convert
hideIpythonCells('%s%s' % (docroot, a)) # update
p.append(sub.call(['/bin/bash', '-c', coms[1]], stdout=out, stderr=err)) # copy
p.append(sub.call(['/bin/bash', '-c', coms[2]], stdout=out, stderr=err)) # rename
p.append(sub.call(['/bin/bash', '-c', coms[3]], stdout=out, stderr=err)) # compile