Hello,
Thank you for writing this very useful package. I have a few questions regarding the package.
(1) I have been trying to calibrate some ita files from our IONTOF V using your sf, k0 = E.auto_mass_cal(fitting_peaks=["C","CH","CH2", "CHS"]) function and get the following set of errors:. Could you please explain why this is happening? The files I am using can be opened and plotted using your other commands.
MissingBlock Traceback (most recent call last)
in
1 fig, ax = plt.subplots(2, 2, figsize=(21,6))
----> 2 sf, k0 = E.auto_mass_cal(fitting_peaks=["C","CH","CH2","CHS"])
3 E.show_spectrum_around(12, ax=ax[0,1], sf=sf, k0=k0);
c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\ITM.py in auto_mass_cal(self, t, S, pos, debug, error, Range, fitting_peaks, apply, **kargs)
410 time_width = 1e10self.root.goto('propend/Instrument.LMIG.Chopper.Width').get_key_value()['float']
411 if t is None or S is None:
--> 412 t, S = self.get_spectrum(time=True)
413 N = np.prod(list(self.size['pixels'].values())) * self.Nscan
414 mask = S > N0.01/time_width
c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\ITM.py in get_spectrum(self, sf, k0, scale, time, error, **kargs)
598 """
599 RAW = zlib.decompress(self.root.goto(
--> 600 'filterdata/TofCorrection/Spectrum/Reduced Data/IITFSpecArray/'+['CorrectedData','Data'][kargs.get('uncorrected',False)]).value)
601 if scale is None:
602 scale = self.scale
c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\Block.py in goto(self, path, lazy)
543 p = e['name']
544 idx = e['id']
--> 545 s = s.goto_item(p, idx, lazy=lazy)
546 return s
547
c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\Block.py in goto_item(self, name, idx, lazy)
486 name: name of the children's block
487 """
--> 488 Idx = self.get_index(name, idx, lazy=lazy)
489 self.f.seek(Idx)
490 return Block(self.f, parent=self)
c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\Block.py in get_index(self, name, idx, lazy)
513 return l['bidx']
514 i+=1
--> 515 raise MissingBlock(self, name, idx)
516
517 def goto(self, path, lazy=False):
MissingBlock: Missing block "root/filterdata" with index 0
(2) Alternatively, is there a different manual method or mass calibration? I have attempted using the spectra tool but the window opens but my file doesn't load. These same files load when using your other commands for plotting the spectra so I am unsure what the issue it. I get errors like this:
Traceback (most recent call last):
File "c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\matplotlib\cbook_init_.py", line 216, in process
func(*args, **kwargs)
File "c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\tools\spectra.py", line 223, in on_motion
self.refresh()
File "c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\tools\spectra.py", line 62, in refresh
self.yAxisScaleChanged()
File "c:\users\sen\appdata\local\programs\python\python37\lib\site-packages\pySPM\tools\spectra.py", line 116, in yAxisScaleChanged
(3) Lastly, I have many ITA and ITM spectra/image files where I didn't do any creation of peak lists on SurfaceLab. I want to be able to chose peaks and reconstruct the corresponding images. Is there a way to do this using PySPM? Most of your image examples involve files that already had peak lists created.
I am using this package because I currently don't have access to SurfaceLab anymore for data analysis and would very much appreciate your help.
Thank you,
Shohini