-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds total spectra extraction #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still failing
Do we plan on further developing this PR? If so, I can take over. |
I think @jranek maybe needed something similar, and Avery might have gone to office hours for something related? If no one needs it though, fine to close this branch |
@jranek just wanted to get some ideas from you regarding this setup. Adam used a slightly different setup to start off with. I modified it so instead of taking the total mass spectra across all pixels, it would delineate the spectra across individual pixels. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alex-l-kong, I went to test these files to see if it gives a per-pixel spectra output; however, it immediately crashes due to memory error regardless of (1) the bin file size, (2) the number of FOVs I pass through, or (3) the spectra range specified in the panel df
@alex-l-kong this looks great!! As a suggestion, I think it's worth converting the tof ranges back to m/z for ease of plotting the spectra. For example, def _tof2mass(tof_range: np.ndarray, mass_offset: float, mass_gain: float,
time_res: float) -> np.ndarray:
"""Convert array of time of flight values to equivalent m/z
Args:
toff_arr (array_like):
Array of time of flight values
mass_offset (float):
Mass offset for parabolic transformation
mass_gain (float):
Mass gain for parabolic transformation
time_res (float):
Time resolution for scaling parabolic transformation
Returns:
array_like:
Array of m/z values; indicies paried to `toff_arr`
"""
return (((time_res * tof_range) - mass_offset) / mass_gain)**2 The mass range interval can be in the return statement or appended as metadata in the |
Changes are added. Lmk how this new version looks @jranek. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!!
Adds total spectra extraction. This will help validate that ionpath's default mass calibration parameters are within tolerance.