Menu

Acqknowlege sampling rate settings

Help
2014-12-01
2014-12-05
  • Victoria Lishak

    Victoria Lishak - 2014-12-01

    Hi Dr. Bach,
    I was having some trouble importing the acqknowlege 3.9 files into the SCRalyze. My imported files were consistently 4 times shorter than the original ones. I think the difference is due to confusion between waveform sampling rate and acquisition sampling rate in biopac/acqknowlege. Due to the settings I had, the acquisition sampling rate is 1000 samples/second, however, acqknowlege stores the skin conductance files at 250 samples per second (waveform sampling rate). I think when SCRalyze reads the sampling rate it reads it as 1000 samples/second instead of 250 i.e. it reads the acquisition sampling rate instead of waveform sampling rate. Is there a way to change where SCRalyze reads the sampling rate from and make sure it reads the waveform sampling rate and not the acquisition sampling rate? I tried to find the part of the code that indicates where to read the sampling rate from but could not locate it. It is possible that Alex Francisco who posted 2 posts below also had the same problem.
    Thank you very much,

    Vicky Lishak

     
  • Dominik Bach

    Dominik Bach - 2014-12-01

    Hi Vicky

    thanks for pointing out this problem, and it seems that Alex had the same issue. This is due to an external function "acqread.m" contained in the folder Import/acq, which in turn is based on a Biopac tech sheet in the same folder. This simply states that the "sample time" is stored in milliseconds which I assumed to be the sample time per channel, not across all channels.

    To resolve this and make sure the resolution does not mess up anything else, I would kindly ask you to send me a sample file, both in .acq and also in matlab export via AcqKnowledge if that's possible for you. This could really just be a short file with several channels. The problem is, the duration of the acquisition is not stored in the test files I got. Our own system uses a higher version of acq which cannot be imported with this function anyway.

    I'd be happy to fix this very quickly once you can send me the files.

    Best wishes
    Dom

     
  • Victoria Lishak

    Victoria Lishak - 2014-12-01

    Hi Dom,

    Thank you very much for your quick reply. I am attaching both files. I have 4 marker channels but i did not use them when I exported the file into matlab. The sampling rate is the same for all the channels except for the Skin conductance. I think it is some sort of default setting in biopac/acqknowlege.

    Thank you for your time,

    Vicky

     

    Last edit: Victoria Lishak 2014-12-01
  • Dominik Bach

    Dominik Bach - 2014-12-02

    Hi Vicky

    thanks, I believe I fixed it now. See updates on the repository (trunk and v2.1.8) and in the latest file download.

    I would be grateful if you could go to the trouble to export the acq file through the AcqKnowldge software as well and send it to me. This will benchmark if our import works the way it should. In any case, it recovers the channel-specific sample rates now (SCR 250 Hz, HR 1000 Hz), a feature of Acq version 3.7 and higher.

    Many thanks, and with best wishes
    Dom

     
  • Victoria Lishak

    Victoria Lishak - 2014-12-02

    Hi Dom,

    Thank you. I downloaded the newest version but the import does not seem to work. Maybe i am doing something wrong. It is showing the following error. I am also attaching the script that I saved.

    Thank you again and I am sorry if this is due to me ineptness with matlab.

    Importing D:\VickyPhd\SCRtestFolder\PAT\PassiveAvoidance01019.acq ... ??? Cell contents reference from a non-cell array object.

    Error in ==> scr_find_channel at 54
    if ~isempty(strfind(foo, namestrings{name}))

    Error in ==> scr_get_acq at 37
    chan = scr_find_channel(header.szCommentText, import{k}.type);

    Error in ==> scr_import at 118
    [data, sourceinfo, sts] = feval(settings.import.functions{datatypen},
    datafile, import);

     
  • Dominik Bach

    Dominik Bach - 2014-12-03

    Hi Vicky

    sorry - I uploaded the wrong files (these were for the upcoming version 3.0). It is fixed now, at least in my local version.

    Best
    Dom

     
  • Victoria Lishak

    Victoria Lishak - 2014-12-03

    Thank you for all your help! Here is the imported file I sent to you earlier.

    vicky

     
  • Dominik Bach

    Dominik Bach - 2014-12-04

    Thank you!

    It would be GREAT if you could also go to AcqKnowledge and EXPORT the dataset to matlab from within AcqKnowledge (rather than IMPORT it from within matlab), and attach it - this would give us a true benchmark dataset with which we can compare the manufacturer's procedures with our own ones.

    Best
    Dom

     
    • Victoria Lishak

      Victoria Lishak - 2014-12-04

      Hi Dom,

      Sorry i misunderstood you. Here is the file exported from Acqknowlege directly. It looks like it has 4Xmore data points for skin conductance - they seem to extrapolate values - i.e. the same value is repeated 4 times. I am not sure if this is an error on their part and if it has implications for data analysis with SCR. The lengths is identical in both files and the amount of data points in the SCR makes more sense than the one in the file exported from Acqknowlege. I am attaching both for comparison.

       

      Last edit: Victoria Lishak 2014-12-04
  • Dominik Bach

    Dominik Bach - 2014-12-05

    This is excellent, many thanks! Dom

     

Log in to post a comment.