GithubHelp home page GithubHelp logo

Comments (9)

Edouard2laire avatar Edouard2laire commented on June 27, 2024

Hi Francois,

Thanks for that. yes I think we will delete them after PR #123 is merged.

Can you confirm me that calling nst_format_channel with only one output (eg channel_label= nst_format_channel(isrc, idet, measure) ) will still work or we need to make change in the code to "discard" the second output ?

edit: I just made the test to be sure, and indeed it's working so we won't have side effect in nirstorm.

from nirstorm.

ftadel avatar ftadel commented on June 27, 2024

Can you confirm me that calling nst_format_channel with only one output (eg channel_label= nst_format_channel(isrc, idet, measure) ) will still work or we need to make change in the code to "discard" the second output ?

The modified function from Brainstorm would work with Nirstorm (it never hurts to add returned parameters).
But having Nirstorm+Brainstorm both in the path may cause the SNIRF reader in Brainstorm to stop working (as it doesn't have the missing returned parameter)

from nirstorm.

thomas-vincent avatar thomas-vincent commented on June 27, 2024

It is better to isolate everything needed to load snirf in brainstorm and not depend on nirstorm.
There may be some issues if they stay there since the same functions in nirstom will shade them.

If you really need to share the functions, then the functions in question should be moved in brainstorm.
But as I can see, it is very basic short functions, I think you can fork their content.
Everything in brainstorm/external should be removed and integrated where needed in brainstorm io.

from nirstorm.

Edouard2laire avatar Edouard2laire commented on June 27, 2024

I don't have a clear opinion on that subject but I see 3 options here :

  • First, as suggested by Thomas, we remove the function from the brainstorm external folder and put them and the files where they are called so (out_data_snirf.m and in_data_snirf.m). This solution leads to have 3 copy of the functions.

  • Second, as suggested by Francois, we remove the function from NIRSTORM repository and keep them in brainstorm. That lead to only one copy of the function but make that the NISTORM code is spread between two repository which can cause trouble is guess (like if someone update nirstorm but use an old version of brainstorm)

  • Third, a compromise solution, we leave the two versions as is but keep them synchronized. So here we change nst_format_channel accordingly to the change I made in brainstorm. That leads to have 2 copy of the functions but I guess that a trouble we can accept to still have the code present both in NIRSTORM and Brainstorm repository without any shadowing :)

Which solution do you think is the best @thomas-vincent and @ftadel ?
hs. There is also another alternative which is to only keep those 4 functions in nistorm and to force the installation of nirstorm when importing/exporting snirf data but I am pretty sure it's the worst solution haha

from nirstorm.

thomas-vincent avatar thomas-vincent commented on June 27, 2024

from nirstorm.

ftadel avatar ftadel commented on June 27, 2024

Then should I move the 4 nst_* functions from brainstorm3/external/nirstorm to brainstorm3/toolbox/io/private and consider we'll keep working with two separate copies?
(this way, it shouldn't even interfere with other versions of the same functions in a different folder in the path)

Make sure you add the extra returned parameter to the nirstorm version, just in case..

from nirstorm.

Edouard2laire avatar Edouard2laire commented on June 27, 2024

One needs a modification (additional returned parameter):
https://github.com/brainstorm-tools/brainstorm3/blob/master/external/nirstorm/nst_format_channel.m

Done in #127 .

Then should I move the 4 nst_* functions from brainstorm3/external/nirstorm to brainstorm3/toolbox/io/private and consider we'll keep working with two separate copies?
(this way, it shouldn't even interfere with other versions of the same functions in a different folder in the path)

I don't know. will the snirf importation still work this way ?

from nirstorm.

ftadel avatar ftadel commented on June 27, 2024

Then should I move the 4 nst_* functions from brainstorm3/external/nirstorm to brainstorm3/toolbox/io/private and consider we'll keep working with two separate copies?
(this way, it shouldn't even interfere with other versions of the same functions in a different folder in the path)

I don't know. will the snirf importation still work this way ?

I don't know, this is up to you (@thomas-vincent @Edouard2laire) to decide. In the meantime, I moved these functions toolbox/io/private so that the SNIRF reader in Brainstorm does not interfere with Nirstorm (and vice versa). Just keep in mind that it would be better if these functions are updated in Brainstorm if you modify them in Nirstorm.
brainstorm-tools/brainstorm3@1b89539

from nirstorm.

Edouard2laire avatar Edouard2laire commented on June 27, 2024

Thx. I am closing this issue then :)

from nirstorm.

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.