spike.Interactive package — spike 0.99.8-407 documentation

# spike.Interactive package

## Submodules

## spike.Interactive.FTICR_INTER module

A tool to display 2D FT-ICR data-sets

to be embedded in jupyter notebook

First version MAD jan 2019 preliminary and not fully tested !

class `spike.Interactive.FTICR_INTER.` `Calib`(data)

  Bases: `object`

  a simple tool to show and modify calibration cste

  `back`(event)
  `update`(event)

class `spike.Interactive.FTICR_INTER.` `MR`(name, report=True, Debug=False)

  Bases: `object`

  this class handles multiresolution datasets

  `col`(i)

    return a column with coordinate in index

  `colmz`(i)

    return a column with coordinate in m/z

  `compute_absmax`()

    computes largest point from smaller resolution, and propagates

  `load`()

    load from file

  `report`()

    report object content

  `row`(i)

    return a row with coordinate in index

  `rowmz`(i)

    return a row with coordinate in m/z

  `to_display`(zoom=((0, 10000000.0), (0, 10000000.0)), verbose=False)

    computes and return which dataset to display at a given zoom and scale level” in: zoom = ((F1low, F1up), (F2low,F2up)) - in m/z

    out: a tuple (data, zoomwindow), where data is a NPKData and zoomwindow an eventually recalibrated zoom window

    so, if DATA is an MR() object and Zoom a defined window in m/z ((F1low, F1up), (F2low,F2up)) the sequence:

    > datasel, zz = DATA.to_display(Zoom) datasel.display(zoom=zz, scale=…)

    will display the selected zone with the best possible resolution

class `spike.Interactive.FTICR_INTER.` `MR2`(name, figsize=None, report=True, show=True, Debug=False)

  Bases: `spike.Interactive.FTICR_INTER.MR_interact`

  `back`(*arg)
  `forw`(*arg)

class `spike.Interactive.FTICR_INTER.` `MR_interact`(name, figsize=None, report=True, show=True, Debug=False)

  Bases: `spike.Interactive.FTICR_INTER.MR`

  `I1D`()
  `back`(*arg)
  `bb`(name, desc, action, layout=None, tooltip='')

    build button

  `check_fig`()
  `check_fig1D`()
  `display`(zoom=None, scale=None, redraw=None)
  `display1D`()
  `down`(b, factor=1.44)
  `ext_box`()
  `forw`(*arg)
  `fullzoom`()
  `left`(b, factor=1.44)
  `reset`(b)
  `reset_track`()
  `right`(b, factor=1.44)
  `scale1`(b)
  `scaledown`(b)
  `scaleup`(b)
  `show`()

    actually show the graphical tool and the interactive spectrum

  `up`(b, factor=1.44)
  `update`()
  `zoom`
  `zoom_box`()
  `zoom_in`(b, factor=1.44)
    z_in: waft = wbef/factor => waft*factor = wbef
      dw = wbef/factor-wbef = wbef*(1-factor) dw = waft*factor*(1-factor)
  `zoom_out`(b, factor=1.44)

    z_in: dw = waft*factor*(1-factor) z_out:dw = wbef*(factor*(1-factor))

  `zoomwidth`()

class `spike.Interactive.FTICR_INTER.` `MSPeaker`(npkd, pkname)

  Bases: `object`

  a peak-picker for MS experiments

  `display`(event)

    interactive wrapper to peakpick

  `pickpeak`(event)

    interactive wrapper to peakpick

  `pkexport`(event)

    exports the peaklist to file

  `pklist`()

    creates peaklist

  `pkprint`(event)
  `pp`()

    do the peak-picking calling pp().centroid()

class `spike.Interactive.FTICR_INTER.` `SpforSuper`(i, name)

  Bases: `object`

  a holder for SuperImpose

  `display`()

class `spike.Interactive.FTICR_INTER.` `SuperImpose`(base=None, filetype='*.msh5', N=None)

  Bases: `object`

  a tool to superimpose spectra

  `Show`()
  `copy`(event)
  `display`(event)

## spike.Interactive.INTER module

A set of utilities to use spike in NMR or FTMS within jupyter

First version MAD june 2017 preliminary and not fully tested !

class `spike.Interactive.INTER.` `AvProc1D`(filename='')

  Bases: `object`

  Detailed 1D NMR Processing

  `apmin_select`(e)
  `apod`()
  `apod_select`(e)
  `display`()
  `load`()
  `process`(e)
  `show`()
  `show_apod`(e)

class `spike.Interactive.INTER.` `FileChooser`(base=None, filetype=['fid', 'ser'], mode='r', show=True)

  Bases: `object`

  a simple file chooser for Jupyter

  `basename`

    the basename of the chosen file

  `dirlist`()
  `dirname`

    the final dirname containing the chosen file

  `file`

    the chosen complete filename

  `filelist`()
  `nmrname`

    the final dirname containing the chosen file for TopSpin files

  `setdir`(e)
  `show`()
  `updir`(e)
  `wob`(e)

class `spike.Interactive.INTER.` `Phaser1D`(data)

  Bases: `object`

  An interactive phaser in 1D NMR

  > Phaser1D(spectrum)

  best when in %matplotlib inline

  `ob`(event)

    observe changes and start phasing

  `on_Apply`(b)
  `on_cancel`(b)
  `phase`()

    apply phase and display

  `ppivot`()

    converts from pivot values to centered ones

class `spike.Interactive.INTER.` `Phaser2D`(data)

  Bases: `object`

  An interactive phaser in 2D NMR

  > Phaser2D(spec)

  best when in %matplotlib inline

  `on_Apply`(b)
  `on_cancel`(b)
  `phase`(scale, F1p0, F1p1, F2p0, F2p1)

class `spike.Interactive.INTER.` `Show`(data)

  Bases: `object`

  An interactive display, 1D or 2D NMR
    Show(spectrum)
  `ob`(event)

    observe events and display

  `on_done`(b)

## Module contents