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)[source]¶ Bases:
objecta simple tool to show and modify calibration cste
-
class
spike.Interactive.FTICR_INTER.MR(name, report=True, Debug=False)[source]¶ Bases:
objectthis class handles multiresolution datasets
-
to_display(zoom=((0, 10000000.0), (0, 10000000.0)), verbose=False)[source]¶ 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.MR_interact(name, figsize=None, report=True, show=True, Debug=False)[source]¶ Bases:
spike.Interactive.FTICR_INTER.MR-
property
zoom¶
-
zoom_in(b, factor=1.44)[source]¶ - z_in: waft = wbef/factor => waft*factor = wbef
dw = wbef/factor-wbef = wbef*(1-factor) dw = waft*factor*(1-factor)
-
property
-
class
spike.Interactive.FTICR_INTER.MSPeaker(npkd, pkname)[source]¶ Bases:
objecta peak-picker for MS experiments
spike.Interactive.FTICR_INTER_v2 module¶
A tool to display FT-ICR data-sets
to be embedded in jupyter notebook
MAD Sept 2019
This version requires ipympl (see: https://github.com/matplotlib/jupyter-matplotlib ) and the notebook to be opened with %matplotlib widget
-
class
spike.Interactive.FTICR_INTER_v2.Calib(data)[source]¶ Bases:
objecta simple tool to show and modify calibration cste
-
class
spike.Interactive.FTICR_INTER_v2.MR(name, report=True, Debug=False)[source]¶ Bases:
objectthis class handles multiresolution datasets
-
to_display(zoom=((0, 10000000.0), (0, 10000000.0)), verbose=False)[source]¶ 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_v2.MR_interact(name, figsize=None, report=True, show=True, Debug=False)[source]¶
-
class
spike.Interactive.FTICR_INTER_v2.MS2Dscene(show=True, root='/')[source]¶ Bases:
ipywidgets.widgets.widget_box.HBoxa widget to set all MS tools into one screen
-
class
spike.Interactive.FTICR_INTER_v2.MSPeaker(npkd, pkname)[source]¶ Bases:
objecta peak-picker for MS experiments
spike.Interactive.INTER (copy) module¶
A set of utilities to use spike in NMR or FTMS within jupyter
First version MAD june 2017 definitive ? version MAD october 2019
-
class
spike.Interactive.INTER.AvProc1D(filename='')[source]¶ Bases:
objectDetailed 1D NMR Processing
-
class
spike.Interactive.INTER.FileChooser(base=None, filetype=['fid', 'ser'], mode='r', show=True)[source]¶ Bases:
objecta simple file chooser for Jupyter - obsolete - not used
-
property
basename¶ the basename of the chosen file
-
property
dirname¶ the final dirname containing the chosen file
-
property
file¶ the chosen complete filename
-
property
nmrname¶ the final dirname containing the chosen file for TopSpin files
-
property
-
class
spike.Interactive.INTER.NMRIntegrate(data, figsize=None, reverse_scroll=False, show=True)[source]¶ Bases:
spike.Interactive.INTER.Show1Dan integrator for NMR experiments
-
class
spike.Interactive.INTER.NMRPeaker1D(data, figsize=None, reverse_scroll=False, show=True)[source]¶ Bases:
spike.Interactive.INTER.Show1Da peak-picker for NMR experiments
-
class
spike.Interactive.INTER.Phaser1D(data, figsize=None, title=None, reverse_scroll=False, show=True)[source]¶ Bases:
spike.Interactive.INTER.Show1DAn interactive phaser in 1D NMR
Phaser1D(spectrum)
requires %matplotlib widget
-
class
spike.Interactive.INTER.Phaser2D(data)[source]¶ Bases:
objectAn interactive phaser in 2D NMR
Phaser2D(spec)
best when in %matplotlib inline
-
class
spike.Interactive.INTER.Show1D(data, title=None, figsize=None, reverse_scroll=False, show=True)[source]¶ Bases:
ipywidgets.widgets.widget_box.HBox- An interactive display, 1D NMR
Show1D(spectrum)
to be developped for peaks and integrals
-
class
spike.Interactive.INTER.Show1Dplus(data, base='/DATA', N=9, figsize=None, title=None, reverse_scroll=False)[source]¶
-
class
spike.Interactive.INTER.Show2D(data, title=None, figsize=None)[source]¶ Bases:
objectA display for 2D NMR with a scale cursor Show2D(spectrum) where spectrum is a NPKData object - special display for DOSY.
-
class
spike.Interactive.INTER.baseline1D(data, figsize=None, reverse_scroll=False, show=True)[source]¶
-
spike.Interactive.INTER.hidecode(initial='show', message=True)[source]¶ this func adds a button to hide/show the code on a jupyter page initial is either ‘show’ or ‘hide’ inspired from: https://stackoverflow.com/questions/27934885/how-to-hide-code-from-cells-in-ipython-notebook-visualized-with-nbviewer/28073228#28073228
spike.Interactive.INTER VIEUX module¶
spike.Interactive.INTER module¶
A set of utilities to use spike in NMR or FTMS within jupyter
First version MAD june 2017 definitive ? version MAD october 2019
-
class
spike.Interactive.INTER.AvProc1D(filename='')[source] Bases:
objectDetailed 1D NMR Processing
-
apmin_select(e)[source]
-
apod()[source]
-
apod_select(e)[source]
-
display()[source]
-
load()[source]
-
process(e)[source]
-
show()[source]
-
show_apod(e)[source]
-
-
class
spike.Interactive.INTER.FileChooser(base=None, filetype=['fid', 'ser'], mode='r', show=True)[source] Bases:
objecta simple file chooser for Jupyter - obsolete - not used
-
property
basename the basename of the chosen file
-
dirlist()[source]
-
property
dirname the final dirname containing the chosen file
-
property
file the chosen complete filename
-
filelist()[source]
-
property
nmrname the final dirname containing the chosen file for TopSpin files
-
setdir(e)[source]
-
show()[source]
-
updir(e)[source]
-
wob(e)[source]
-
property
-
class
spike.Interactive.INTER.NMRIntegrate(data, figsize=None, reverse_scroll=False, show=True)[source] Bases:
spike.Interactive.INTER.Show1Dan integrator for NMR experiments
-
disp(zoom=False)[source] refresh display from event - if zoom is True, display only in xbound
-
int()[source] do the automatic integration from peaks and parameters
-
integrate(event)[source]
-
ob(event)[source] observe events and display
-
on_add(b)[source]
-
on_cancel(b)[source]
-
on_done(b)[source]
-
on_rem(b)[source]
-
peak_and_integrate(event)[source]
-
print(event)[source]
-
set_value(b)[source]
-
show()[source]
-
-
class
spike.Interactive.INTER.NMRPeaker1D(data, figsize=None, reverse_scroll=False, show=True)[source] Bases:
spike.Interactive.INTER.Show1Da peak-picker for NMR experiments
-
disp()[source] interactive wrapper to peakpick
-
ob(event)[source] observe events and display
-
on_add(b)[source]
-
on_cancel(b)[source]
-
on_done(b)[source]
-
on_rem(b)[source]
-
on_setcalib(e)[source]
-
pickpeak(event)[source] interactive wrapper to peakpick
-
pklist()[source] creates peaklist for printing or exporting
-
pkprint(event)[source]
-
pp()[source] do the peak-picking calling pp().centroid()
-
show()[source]
-
-
class
spike.Interactive.INTER.Phaser1D(data, figsize=None, title=None, reverse_scroll=False, show=True)[source] Bases:
spike.Interactive.INTER.Show1DAn interactive phaser in 1D NMR
Phaser1D(spectrum)
requires %matplotlib widget
-
ctopivot(p0, p1)[source] convert from centered to pivot values
-
ob(event)[source] observe changes and start phasing
-
on_Apply(b)[source]
-
on_cancel(b)[source]
-
on_movepivot(event)[source]
-
phase()[source] apply phase and display
-
ppivot()[source] converts from pivot values to centered ones
-
show()[source]
-
-
class
spike.Interactive.INTER.Phaser2D(data)[source] Bases:
objectAn interactive phaser in 2D NMR
Phaser2D(spec)
best when in %matplotlib inline
-
close()[source]
-
display(todisplay=None)[source] display either the current data or the one provided - red and blue
-
ob(event)[source] observe changes and start phasing
-
on_Apply(b)[source]
-
on_cancel(b)[source]
-
phase()[source] compute phase and display
-
-
class
spike.Interactive.INTER.Show1D(data, title=None, figsize=None, reverse_scroll=False, show=True)[source] Bases:
ipywidgets.widgets.widget_box.HBox- An interactive display, 1D NMR
Show1D(spectrum)
to be developped for peaks and integrals
-
disp()[source]
-
ob(event)[source] observe events and display
-
on_done(b)[source]
-
on_reset(b)[source]
-
scale_up(step)[source]
-
set_on_redraw()[source]
-
class
spike.Interactive.INTER.Show1Dplus(data, base='/DATA', N=9, figsize=None, title=None, reverse_scroll=False)[source] Bases:
spike.Interactive.INTER.Show1D-
copy(event)[source]
-
disp(zoom=False)[source] refresh display - if zoom is True, display only in xbound
-
on_done(e)[source]
-
-
class
spike.Interactive.INTER.Show2D(data, title=None, figsize=None)[source] Bases:
objectA display for 2D NMR with a scale cursor Show2D(spectrum) where spectrum is a NPKData object - special display for DOSY.
-
disp(new=False)[source]
-
ob(event)[source] observe events and display
-
on_done(b)[source]
-
-
class
spike.Interactive.INTER.SpforSuper(i, name)[source] Bases:
objecta holder for SuperImpose
-
display(unit='ppm')[source]
-
-
class
spike.Interactive.INTER.baseline1D(data, figsize=None, reverse_scroll=False, show=True)[source] Bases:
spike.Interactive.INTER.Show1D-
close()[source] close all widget
-
corrected()[source]
-
correction()[source] returns the correction to apply as a numpy array
-
disp()[source] compute and display the spectrum
-
on_auto(e)[source] automatically set baseline points
-
on_cancel(e)[source]
-
on_done(e)[source]
-
on_set(e)[source] add baseline points at selector
-
on_unset(e)[source] remove baseline points closest from selector
-
selpos()[source] returns selector pos in ppm
-
show()[source] create the widget and display the spectrum
-
smoothed()[source] returns a smoothed version of the data
-
-
class
spike.Interactive.INTER.baseline2D_F2(data, figsize=None)[source] Bases:
spike.Interactive.INTER.baseline1D-
on_done(e)[source]
-
-
spike.Interactive.INTER.hidecode(initial='show', message=True)[source] this func adds a button to hide/show the code on a jupyter page initial is either ‘show’ or ‘hide’ inspired from: https://stackoverflow.com/questions/27934885/how-to-hide-code-from-cells-in-ipython-notebook-visualized-with-nbviewer/28073228#28073228
-
spike.Interactive.INTER.jsalert(msg)[source] send a javascript alert
spike.Interactive.ipyfilechooser module¶
-
class
spike.Interactive.ipyfilechooser.FileChooser(path='/home/mad/Documents/spike/spike_make_sphinx', filename='', show_hidden=False, **kwargs)[source]¶ Bases:
ipywidgets.widgets.widget_box.VBox-
property
default¶ Get the default value
-
property
default_filename¶ Get the default_filename value
-
property
default_path¶ Get the default_path value
-
property
nmrname¶
-
property
rows¶ Get current number of rows
-
property
selected¶ Get selected value
-
property
selected_filename¶ Get the selected_filename
-
property
selected_path¶ Get selected_path value
Get current number of rows
-
property
-
spike.Interactive.ipyfilechooser.get_dir_contents(path, hidden=False)[source]¶ Get directory contents