Skip to content
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

Testing: New FIDAfft function and upgrades to allow MNS #111

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

truonp
Copy link
Contributor

@truonp truonp commented Aug 24, 2023

FIDAfft, calcppm, getgamma helper functions created.

MNS functionality only for GE, TWIX, and niimrs so far since that's the only filetypes I have to test with. Other formats are set up with the capability, but are defaulted to 1H

truonp added 30 commits July 31, 2023 14:38
New helper function which will replace all FFT'ing needs.

Previously was hard coded to each function, now this single function will be called. Makes it easier to update and ensures cohesiveness across all functions.
Some cleanup
Changing to get hzppm from txfrq instead of calculating from gamma and Bo
Update io_CSIwritelcm.m
Update op_alignrcvrs.m
Update op_averaging.m
Changed the fftshift in the inverse fft command to inverse ifftshift as well. This will made to accommodate cases of odd-number of point spectra. Should have same effect as fftshift with even-number of point spectra.
Updating with FIDAfft function. Removing check for cases of odd-number spectra. Previously, in those cases had to circshift by 1. However, since FIDAfft now uses ifftshift to transform freq domain data into time domain, this is no longer an issue.
Updated to get the conjugate of the outputs. This is how GELoad in Osprey is set up.

This way all FFT and ppm commands will be consistent and give correct outputs.
Update to use FIDAfft.
Adding condition if input structure does not have "gamma" field
New helper function: calculates the ppm array. This is to ensure consistency between all functions
Update to use calcppm helper function
Helper function that gets the matching gamma for the inputted nucleus
Update op_takecoils.m
Update op_matchLW.m
Update op_makeECArtifact.m
Update op_addphase.m
Update op_combinesubspecs.m
Update op_addphaseSubspec.m
Update op_complexConj.m
Update to use FIDAfft, calcppm. Added getgamma function. Adding gamma and nucleus to output structure.
Updating to use FIDAfft
Update to use FIDAfft
Renaming anything "gamma" to "gyromag"
Renaming "gamma" variable to "gyromag" since gamma is also a function in MATAB

Update getgyromag.m

Changing name from "getgamma" to "getgyromag"

Create getgamma.m

Update function call to match name

Update getgyromag.m

update function call to match name

Delete getgyromag.m

Removing

Update getgamma.m

Moving everything back to getgamma
Moving back to using gamma instead of gyromag
Moving back to using gamma instead of gyromag. Getting exact gyromag ratio of 1H via getgamma function
Updating to use FIDAfft. Setting default condition for gamma, in case structure does not have it.

Updating to use gamma instead of hard-coded 42.577
Update to use getgamma
Update to use FIDAfft and calcppm
Update to use FIDAfft and calcppm. Hard coded nucleus to '1H', to use getgamma. Opportunity to upgrade to MNS in the future.
Update to use FIDAfft and calcppm. Hard coded nucleus to '1H', to use getgamma. Opportunity to upgrade to MNS in the future.
Update op_addNoise.m
Update op_alignISIS.m
Update op_alignAverages_fd.m
Using new function, FIDAfft, to get specs.

Adding in hardcode for 1H - nucleus, gamma

Update io_loadspec_bruk.m

Using new function, FIDAfft, to get specs.

Adding in hardcode for 1H - nucleus, gamma

Update io_loadspec_twix.m

Using new function, FIDAfft, to get specs.

Update io_loadspec_bruk.m

Update to use FIDAfft and calcppm.

Update io_loadspec_bruk.m

Now grabs the nucleus from the "methods" file. Using getgamma to save gamma value.

Update io_loadspec_GE.m

minor comment update

Update io_loadspec_data.m

Updated to use FIDAfft , get gamma, and calcppm.

Update io_loadspec_data.m

Adding in output fields

Update io_loadspec_twix.m

Cleanup

Update io_CSIload_twix.m

Updating to use getgamma

Update io_loadspec_niimrs.m

Updated to use getgamma and calcppm functions

Update io_loadjmrui.m

Moving where nucleus and gamma are declared

Update io_loadspec_IMA.m

Update to use FIDAfft, getgamma, and calcppm. Including gamma, filename, hdr, and nucleus in output structure.

Update io_readjmrui.m

Update to use FIDAfft

Update io_loadspec_irBruk.m

Update to use FIDAfft, getgamma, and calcppm. Hard coded to use '1H' as nucleus.

Including nucleus, gamma, hdr (left blank), and filename (inDir) in output structure.

Update io_loadspec_rda.m

Update to use FIDAfft, getgamma, and calcppm. Hard coded to use '1H' as nucleus.

Including nucleus, gamma, hdr, and filename in output structure.

Update io_loadspec_sdat.m

Update to use FIDAfft, getgamma, and calcppm. Hard coded to use '1H' as nucleus.

Including nucleus, gamma, hdr, and filename in output structure.

Update io_loadspec_varian.m

Update to use FIDAfft, getgamma, and calcppm. Hard coded to use '1H' as nucleus.

Including nucleus, gamma, hdr, and filename in output structure.
Update to use FIDAfft
Update to use FIDAfft, and calcppm. Added catch condition to default to '1H' if the field "gamma" isn't present.
truonp added 11 commits August 9, 2023 19:24
Update op_alignScans_fd.m
Update op_CSIRemoveLipids.m
Update op_CSISpecReg.m
Update op_alignMPSubspecs.m
Update op_alignMPSubspecs_fd.m
Update op_alignScans.m
Update to use FIDAfft
Update to use FIDAfft. Included condition to use "gamma" in structure if exists, otherwise default to 1H
Update to use FIDAfft and calcppm. If it exists, uses "gamma" in the structure, otherwise default to 1H
Update to use FIDAfft and calcppm. If exists, uses "gamma" from structure, otherwise default to 1H.

Update op_timerange.m
Update op_zerotrim.m
Update op_zeropad.m
Update op_makeFreqDrift.m
Update op_takesubspec.m
Update op_takeextras.m
Update op_takeaverages.m
Update op_subtractScans.m
Update op_rmworstaverage.m
Update op_rmNworstaverages.m
Update op_rmbadaverages.m
Update op_phaseAlignAverages_fd.m
Update op_phaseAlignAverages.m
Update op_movef0.m
Update op_median.m
Update op_makePhaseDrift.m
Update op_freqAlignAverages.m
Update op_dccorr.m
Update op_fourStepCombine.m
Update op_freqAlignAverages_fd.m
Update op_freqshift.m
Update op_freqshiftSubspec.m
Update op_unfilter.m
Update op_ecc.m
Update op_filter.m
Used previous gyromag variable, switching back to gamma
Adding it additional ppmmin/max initialized values to include 31P. Other nuclei will be updated in the future.
Adding in checks:
If coils already combined, no longer combining.

If only 1 coil detected exit without running, and update output flag.
"hdr_ext.ResonantNucleus " is loaded in as a cell, need to have it as string.

Added in Bo calculation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant