Replies: 10 comments 11 replies
-
Would you be able to copy and paste the few lines you are using to try and load a .csdm object into this thread? The issue might lie there. Also, with regards to the
is equivalent to calling
For local files, you won't need a https url, just the path to whatever file. For example,
|
Beta Was this translation helpful? Give feedback.
-
your suggestion worked! I got a nice blank box ... no spectrum. The csdf file has an asci header, the data as binary. Are you expecting asci? |
Beta Was this translation helpful? Give feedback.
-
Cool I am at play ground with my grand kids but I will give your suggestions a quick shot.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Matthew Giammar ***@***.***>
Sent: Wednesday, May 31, 2023 9:13:38 AM
To: deepanshs/mrsimulator ***@***.***>
Cc: Paul Ellis ***@***.***>; Author ***@***.***>
Subject: Re: [deepanshs/mrsimulator] "host" (Discussion #263)
Remove the line setting the x limits. Matplotlib should automatically set the limits for whatever dataset you're plotting.
—
Reply to this email directly, view it on GitHub<#263 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A76PY3DLIDXRMZR67ESKYYDXI5GZFANCNFSM6AAAAAAYUQQFRE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Still having Fun ... I still cannot get my simulated spectrum to display ... it is not an issue with plot limits. The code now runs to completion ... but I am sure it is NOT executing the simulation or the fit. However, I am getting an error message: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/astropy/units/quantity.py:673: RuntimeWarning: divide by zero encountered in divide I am attaching the program and one of the plots ... The code: from doctest import master from mrsimulator import Site, SpectralDimension, SpinSystem, Simulator, spin_system initialize nmrglue converter objectax = plt.subplot(projection="csdm") read in the JEOL dataset fileexperiment = cp.load ("/Users/pdellis/Desktop/mrsim_fit/SnO_Transformed.csdf") ax[0].plot(experiment.real) standard deviation of noise from the datasetsigma = 0.6410905 Tin_119 = Site(
Dict = {'origin_offset': 'Hz', 'reference_offset': 'Hz', 'spectral_width': 'Hz', 'reference_offset': 'Hz', 'origin_offset': 'Hz'}, Use only the real part of the spectrumexperiment = experiment.real sim = Simulator(spin_systems = sys, methods=[bloch]) sim.config.decompose_spectrum = "spin_system" sim.run() relative_intensity_factor = experiment.max() / sim.methods[0].simulation.max() Post Simulation Processingprocessor = sp.SignalProcessor( Plot the spectrumplt.figure(figsize=(4.25, 3.0)) params = sf.make_LMFIT_params(sim, processor, include={"rotor_frequency"}) fit_parameters = sf.make_LMFIT_params(sim, processor) standard deviation of noise from the datasetfrom lmfit import Minimizer best_fit = sf.bestfit(sim, processor)[0].real Plot the spectrumplt.figure(figsize=(4.25, 3.0)) |
Beta Was this translation helpful? Give feedback.
-
Find attached a Jupyter Notebook (in a zip file) which runs a fit on the spectrum you provided. You can run this in Google Colab; the script will install the requisite libraries. Note that the fit is not great mostly because I have not had time to play around with the starting parameters. You are not seeing the simulated spectrum in the script above since the values for The sidebands in the spectrum also seem to have no width, that is, they are single points. Could you provide the raw JOEL time-domain dataset? Maybe there is an export discrepancy on their end or some pre-processing issue. |
Beta Was this translation helpful? Give feedback.
-
Oh Boy … thank you very much. I will send you the file in the morning … it is on another computer.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Matthew Giammar ***@***.***>
Sent: Thursday, June 8, 2023 7:22:07 PM
To: deepanshs/mrsimulator ***@***.***>
Cc: Paul Ellis ***@***.***>; Author ***@***.***>
Subject: Re: [deepanshs/mrsimulator] Importing and plotting CSDM data (Discussion #263)
Find attached a Jupyter Notebook (in a zip file) which runs a fit on the spectrum you provided. You can run this in Google Colab<https://colab.research.google.com/>; the script will install the requisite libraries. Note that the fit is not great mostly because I have not had time to play around with the starting parameters.
You are not seeing the simulated spectrum in the script above since the values for isotropic_chemical_shift and shielding_symmetric.zeta are still (presumably) in Hz. Mrsimulator does not accept these values in Hz; they must a ppm value. The simulated spectrum is therefore on the order of 10^6 ppm, far outside the spectral window of the experimental dataset, which is plotted first.
The sidebands in the spectrum also seem to have no width, that is, they are single points. Could you provide the raw JOEL time-domain dataset? Maybe there is an export discrepancy on their end or some pre-processing issue.
SnO_Fit.ipynb.zip<https://github.com/deepanshs/mrsimulator/files/11697001/SnO_Fit.ipynb.zip>
—
Reply to this email directly, view it on GitHub<#263 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A76PY3E5YSAZC4MF2EDFHLDXKJNB7ANCNFSM6AAAAAAYUQQFRE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Mathew …
I have attached the time domain file. I have my day tied up for a while I will send the raw data after lunch
Paul
From: Matthew Giammar ***@***.***>
Date: Thursday, June 8, 2023 at 7:22 PM
To: deepanshs/mrsimulator ***@***.***>
Cc: Paul Ellis ***@***.***>, Author ***@***.***>
Subject: Re: [deepanshs/mrsimulator] Importing and plotting CSDM data (Discussion #263)
Find attached a Jupyter Notebook (in a zip file) which runs a fit on the spectrum you provided. You can run this in Google Colab<https://colab.research.google.com/>; the script will install the requisite libraries. Note that the fit is not great mostly because I have not had time to play around with the starting parameters.
You are not seeing the simulated spectrum in the script above since the values for isotropic_chemical_shift and shielding_symmetric.zeta are still (presumably) in Hz. Mrsimulator does not accept these values in Hz; they must a ppm value. The simulated spectrum is therefore on the order of 10^6 ppm, far outside the spectral window of the experimental dataset, which is plotted first.
The sidebands in the spectrum also seem to have no width, that is, they are single points. Could you provide the raw JOEL time-domain dataset? Maybe there is an export discrepancy on their end or some pre-processing issue.
SnO_Fit.ipynb.zip<https://github.com/deepanshs/mrsimulator/files/11697001/SnO_Fit.ipynb.zip>
—
Reply to this email directly, view it on GitHub<#263 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A76PY3E5YSAZC4MF2EDFHLDXKJNB7ANCNFSM6AAAAAAYUQQFRE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Double darn … I will send right away.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Matthew Giammar ***@***.***>
Sent: Monday, June 26, 2023 8:13:31 AM
To: deepanshs/mrsimulator ***@***.***>
Cc: Paul Ellis ***@***.***>; Author ***@***.***>
Subject: Re: [deepanshs/mrsimulator] Importing and plotting CSDM data (Discussion #263)
Hi Paul,
I don't have the file SnO_Phased-1041.csdf, so I am unable to run the program. Are you able to attach it?
—
Reply to this email directly, view it on GitHub<#263 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A76PY3HPD5TVB7YE3B7WSQTXNF4GXANCNFSM6AAAAAAYUQQFRE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@pdellis01 Attached is a zip file with a notebook and a processed 1D static spectrum of your SnO CPMG dataset. The notebook sets up a static Method object to simulate the experimental spectrum and subsequently fits the dataset; the residuals don't look too bad. I think your issues are coming from trying to fit a spikelet pattern from a 1D echo train to a spinning sideband simulation. I don't know if this is possible, and mrsimulator is certainly not designed to handle such a case. Hopefully this notebook helps! |
Beta Was this translation helpful? Give feedback.
-
Mathew …
I can’t thank you enough …
Warmest regards …
Paul
From: Matthew Giammar ***@***.***>
Date: Tuesday, June 27, 2023 at 11:38 AM
To: deepanshs/mrsimulator ***@***.***>
Cc: Paul Ellis ***@***.***>, Mention ***@***.***>
Subject: Re: [deepanshs/mrsimulator] Importing and plotting CSDM data (Discussion #263)
@pdellis01<https://github.com/pdellis01> Attached is a zip file with a notebook and a processed 1D static spectrum of your SnO CPMG dataset. The notebook sets up a static Method object to simulate the experimental spectrum and subsequently fits the dataset; the residuals don't look too bad.
I think your issues are coming from trying to fit a spikelet pattern from a 1D echo train to a spinning sideband simulation. I don't know if this is possible, and mrsimulator is certainly not designed to handle such a case.
Hopefully this notebook helps!
SnO_fit_plus_dataset.zip<https://github.com/deepanshs/mrsimulator/files/11884553/SnO_fit_plus_dataset.zip>
—
Reply to this email directly, view it on GitHub<#263 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A76PY3G2TMQXE3KW7XFNJ4DXNL4UVANCNFSM6AAAAAAYUQQFRE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
In all of your examples for host you utilize a web site address ... my data set resides in a directory on my computer ... when I write a path to the file I receive an error message saying there is no such file or directory. Any suggestions on my error?
Beta Was this translation helpful? Give feedback.
All reactions