Import data and assignin a special sampling frequency using script

Hi teams,
how to import data and assignin a special sampling frequency using script?
Thanks very much

I guess you are talking about import EEG recordings from a simple text file or .mat file with no metadata at all, and you need to specify the time manually, right?

When you do this from the interface, it asks you the orientation of the data matrix, the sampling frequency, etc. To specify these parameters from a script, you need to edit the Brainstorm variable ImportEegRawOptions. Example:

OPTIONS = bst_get('ImportEegRawOptions');
OPTIONS.SamplingRate = 500;
bst_set('ImportEegRawOptions', OPTIONS);

And then you can use the process Import > Import recordings > Import MEG/EEG: Time, and generate a script, like you would with any other file.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting