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

Change of format #42

Open
lpatiny opened this issue May 5, 2020 · 5 comments
Open

Change of format #42

lpatiny opened this issue May 5, 2020 · 5 comments
Assignees

Comments

@lpatiny
Copy link
Member

lpatiny commented May 5, 2020

Today for series 2D we have

    [
      [
        [
          127.5, 83.7, 75.9, 63.9,
           55.9, 43.9, 39.9,   38,
           36.8,   36, 34.8, 31.9,
             29,   28,   18,   17,
           15.9, 13.9
        ],
        [
            58,  33, 227,   31,   38,
           948,  73, 451,   42, 1017,
           258, 905,  42, 1908, 5593,
          1444, 147,  60
        ]
      ],

An array (the time) of array (2 values, mass, intensity) of array (the mass values and the intensity values).

I would like to change this to

    [
      { 
       x :  [
          127.5, 83.7, 75.9, 63.9,
           55.9, 43.9, 39.9,   38,
           36.8,   36, 34.8, 31.9,
             29,   28,   18,   17,
           15.9, 13.9
        ],
       y : [
            58,  33, 227,   31,   38,
           948,  73, 451,   42, 1017,
           258, 905,  42, 1908, 5593,
          1444, 147,  60
        ],
      },

This will allow me to add a third parameter (third dimension) that is in this case the msms. We have indeed mass spectra of GC / MS / MS

This would be of course a major release and will also require major release of jcampconverter and mzdata.

@targos Is this ok for you ?
@josoriom This should solve your problem as well.

@lpatiny lpatiny self-assigned this May 5, 2020
@targos
Copy link
Member

targos commented May 5, 2020

What does GC/MS/MS data look like?

@lpatiny
Copy link
Member Author

lpatiny commented May 5, 2020

You have our normal view with GC and MS but you can click on some of the MS peaks (the main peaks of the MS) and you get the corresponding mass spectrum of this mass peak.

@targos
Copy link
Member

targos commented May 5, 2020

Wouldn't it be better to have a Series3D class?
I don't object to changing the shape of the Series2D but that seems not directly related

@targos
Copy link
Member

targos commented May 5, 2020

I'm not asking how it looks like in an interface, but what how is the data (you only showed how you want the data to be for GC/MS in the original post)

@lpatiny
Copy link
Member Author

lpatiny commented May 5, 2020

Indeed x/y object is not related to this problem.

Data is indeed Series3D

The format would look for 3D like:

  [
      { 
       x :  [
          127.5, 83.7, 75.9, 63.9,
           55.9, 43.9, 39.9,   38,
           36.8,   36, 34.8, 31.9,
             29,   28,   18,   17,
           15.9, 13.9
        ],
       y : [
            58,  33, 227,   31,   38,
           948,  73, 451,   42, 1017,
           258, 905,  42, 1908, 5593,
          1444, 147,  60
        ],
        ms: {
           data: [
              {x:[], y:[]},
         ]
      },

And therefore would be compatible with the functions of Series2D. There would be only this new ms property.

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

No branches or pull requests

2 participants