Commit 9d246c8a authored by Lars Yunker's avatar Lars Yunker
Browse files

Merge branch '48-failure-to-load-isospec-cripples-the-package' into 'master'

Resolve "failure to load isospec cripples the package"

Closes #48

See merge request !43
parents 9b72a899 d53f844b
Pipeline #275311302 passed with stages
in 3 minutes and 40 seconds
__version__ = '2.2.5'
__version__ = '2.2.6'
from .multiplicative import isotope_pattern_multiplicative
from .combinatoric import isotope_pattern_combinatoric, isotope_pattern_hybrid
from .simulated import gaussian_isotope_pattern
from .isospec import isotope_pattern_isospec
from .bar import bar_isotope_pattern, VALID_DROPMETHODS, VALID_GROUP_METHODS
try:
from .isospec import isotope_pattern_isospec
except ImportError as e:
import warnings
warnings.warn(f'failed to import isospec: {e}')
isotope_pattern_isospec = None
# valid isotope pattern generation methods
VALID_IPMETHODS = [
'combinatorics',
'multiplicative',
'hybrid',
'isospec', # uses isospecpy package
# 'cuda',
]
if isotope_pattern_isospec is not None:
VALID_IPMETHODS.append('isospec')
__all__ = [
'VALID_IPMETHODS',
......
......@@ -61,7 +61,8 @@ class IPMolecule(Molecule):
dropmethod=None,
emptyspec=True,
groupmethod='weighted',
ipmethod='isospec',
# default to isospec if possible
ipmethod='isospec' if isotope_pattern_isospec is not None else 'multiplicative',
keepall=False,
npeaks=5000,
resolution=5000,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment