Giter Site home page Giter Site logo

Comments (6)

kaustubhmote avatar kaustubhmote commented on July 17, 2024

I am assuming that the error is with the plotting function, where one of these two lines is failing:

ax['a'].plot(ppm_13C, f2proj)
ax['b'].plot(-f1proj, ppm_1H)

My best guess is that the udic that is being generated is not consistent with the data shape. Are the shapes of ppm_13C and f2_proj (or f1proj and ppm_1H) the same? If not, then there is some inconsistency while reading in the parameters and generating the universal dictionary. one place this could occur is if you use non-zero STSR and STSI values for processing in Topspin. If so, you should indicate that when generating a universal dictionary.

udic_2d = ng.bruker.guess_udic(dic_2d, data_2d, strip_fake=True)

Also, as far as I can see, this should also work without the intermediate conversion to nmrpipe formats (unless you need that for something else). You can generate the unit conversion object from a universal dictionary and data using:

uc_13C = ng.fileiobase.uc_from_udic(udic_2d, dim=1)
uc_1H = ng.fileiobase.uc_from_udic(udic_2d, dim=0)

from nmrglue.

carlosbornes avatar carlosbornes commented on July 17, 2024

Everything seems fine with the F2 dimension since the shape is the same

f2proj.shape
(2048,)
ppm_13C.shape
(2048,)

The F1, the calculated projection has double the number of points

f1proj.shape
(256,)
ppm_1H.shape
(128,)

I've tried to use

udic_2d = ng.bruker.guess_udic(dic_2d, data_2d, strip_fake=True)

but the problem persists. But anyway both STSR and STSI are zero.

from nmrglue.

kaustubhmote avatar kaustubhmote commented on July 17, 2024

It is unlikely that the amax function is giving the incorrect array size. So my guess is that the problem should be with the unit conversion. Can you confirm that the shape of data_pipe is incompatible with the shape of ppm_1H.

from nmrglue.

carlosbornes avatar carlosbornes commented on July 17, 2024

I believe it is. I was checking the dimension and

data_pipe.shape
(256, 2048)

But then when I run

uc_1H = ng.pipe.make_uc(dic_pipe, data_pipe, dim=0)
ppm_1H = uc_1H.ppm_scale()

The size is cut in half

ppm_1H.shape
(128,)

from nmrglue.

kaustubhmote avatar kaustubhmote commented on July 17, 2024

Does skipping the conversion back and forth from nmrpipe, and generating the unit conversion object from bruker data (as shown in this comment) give the same results? If yes, will it be possible to share the data for debugging this?

from nmrglue.

carlosbornes avatar carlosbornes commented on July 17, 2024

Not converting to NMRpipe solves the problem. For now its ok but maybe it would be worth it to solve this.

from nmrglue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.