laserkelvin / PySpecTools

Routines for rotational spectroscopy analysis written in Python 3
MIT License
31 stars 5 forks source link

bug: analysis.correlate_experiments() #20

Open aowen-uwmad opened 4 years ago

aowen-uwmad commented 4 years ago

Was unable to use the analysis.correlate_experiments() due to a NameError. Line 1003 referenced in the traceback is the only occurrence of isin_array in analysis.py module, so either it was defined in a different module and not called correctly, or is not defined at all. The experiments passed were test-of-concept using the same data set, but with different thresholds for the peak finding. The experiment sessions seem to work fine otherwise.

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-27-a7140606d294> in <module>
----> 1 analysis.correlate_experiments((pyrimidinetest,pyrimidine))

...\Anaconda\envs\pst\lib\site-packages\pyspectools\spectra\analysis.py in correlate_experiments(experiments, thres_prox, index)
   1001                     experiment.line_lists["Peaks"].frequencies
   1002                 )
-> 1003                 mask = isin_array(base_freqs, comp_freqs, thres_prox)
   1004                 # Convert to boolean mask
   1005                 mask.dtype = bool

NameError: name 'isin_array' is not defined
laserkelvin commented 4 years ago

Yup this function is currently broken and needs to be fixed: its functionality is supposed to be for comparing frequency coincidences between experiments, which is particularly useful for figuring out unknown molecules appearing in select reactions or conditions. Do you have an immediate use for this?

aowen-uwmad commented 4 years ago

I do not have an immediate use. I was curious what it outputted to make sure #21 wasn't already addressed.

laserkelvin commented 4 years ago

In that case, I suggest keeping this open: I think the function will be of use, but probably better if someone has an immediate use case work on developing it.