vimms icon indicating copy to clipboard operation
vimms copied to clipboard

mz_tol and rt_tol are not scan parameters

Open joewandy opened this issue 5 years ago • 3 comments

They're actually used for Top-N dynamic exclusion window, so should be removed from scan_params (when making ms2 scans)

https://github.com/sdrogers/vimms/blob/master/vimms/Controller/base.py#L72

joewandy avatar Sep 03 '20 16:09 joewandy

Any suggestion as to where they should go?

sdrogers avatar Sep 03 '20 19:09 sdrogers

These are just used for DEW exclusion, right? In which case they just belong to the TopN controllers? Or do they get picked up elsewhere?

sdrogers avatar Sep 11 '20 10:09 sdrogers

Another spaghetti 🍝 code, sorry.

I started an initial attempt to get rid of these DYNAMIC_EXCLUSION_MZ_TOL and DYNAMIC_EXCLUSION_RT_TOL parameters in the TopN controller. See this commit. That was the easy part.

Then I realised DYNAMIC_EXCLUSION_RT_TOL is actually used inside the simulated mass spec. It is stored to the self.current_DEW property of the mass spec.

        next_DEW = next_scan_param.get(ScanParameters.DYNAMIC_EXCLUSION_RT_TOL)
        ...
        if next_DEW is not None:
            self.current_DEW = next_DEW

which in turn is used for time sampling ...

        current_DEW = self.current_DEW
        current_scan_duration = self._increase_time(current_level, current_N, current_DEW, next_scan_param)
        scan.scan_duration = current_scan_duration

Will fix this as part of issue #46.

joewandy avatar Sep 11 '20 10:09 joewandy